36
January, 2004
Developer’s Manual
Intel XScale® Core
Developer’s Manual
Programming Model
This feature allows software to issue PLDs speculatively. For example,
Example 2-3 on page 2-36
places a PLD instruction early in the loop. This PLD is used to fetch data for the next loop
iteration. In this example, the list is terminated with a node that has a null pointer. When execution
reaches the end of the list, the PLD on address 0x0 will not cause a fault. Rather, it will be ignored
and the loop will terminate normally.
2.3.4.6
Debug Events
Debug events are covered in
Section 9.5, “Debug Exceptions” on page 9-126
.
Example 2-3. Speculatively issuing PLD
;; R0 points to a node in a linked list. A node has the following layout:
;; Offset
Contents
;;----------------------------------
;;
0
data
;;
4
pointer to next node
;; This code computes the sum of all nodes in a list. The sum is placed into R9.
;;
MOV R9, #0
; Clear accumulator
sumList:
LDR R1, [R0, #4]
; R1 gets pointer to next node
LDR R3, [R0]
; R3 gets data from current node
PLD [R1]
; Speculatively start load of next node
ADD R9, R9, R3
; Add into accumulator
MOVS R0, R1
; Advance to next node. At end of list?
BNE sumList
; If not then loop