WHILERW
While free of read-after-write conflicts.
This instruction checks two addresses for a conflict or overlap between address ranges of the form [addr,addr+VL÷8), where VL is the accessible vector length in bits, that could result in a loop-carried dependency through memory due to the use of these addresses by contiguous load and store instructions within the same iteration of a loop. Generate a predicate whose elements are true while the addresses cannot conflict within the same iteration, and false thereafter. Sets the First (N), None (Z), !Last (C) condition flags based on the predicate result, and the V flag to zero.
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | size | 1 | Rm | 0 | 0 | 1 | 1 | 0 | 0 | Rn | 1 | Pd |
if !HaveSVE2() then UNDEFINED; integer esize = 8 << UInt(size); integer n = UInt(Rn); integer m = UInt(Rm); integer d = UInt(Pd);
Assembler Symbols
<Pd> |
Is the name of the destination scalable predicate register, encoded in the "Pd" field. |
<T> |
Is the size specifier,
encoded in
size:
|
<Xn> |
Is the 64-bit name of the first source general-purpose register, encoded in the "Rn" field. |
<Xm> |
Is the 64-bit name of the second source general-purpose register, encoded in the "Rm" field. |
Operation
CheckSVEEnabled(); integer elements = VL DIV esize; bits(PL) mask = Ones(PL); bits(64) src1 = X[n]; bits(64) src2 = X[m]; integer operand1 = UInt(src1); integer operand2 = UInt(src2); bits(PL) result; integer diff = Abs(operand2 - operand1) DIV (esize DIV 8); for e = 0 to elements-1 if diff == 0 || e < diff then ElemP[result, e, esize] = '1'; else ElemP[result, e, esize] = '0'; PSTATE.<N,Z,C,V> = PredTest(mask, result, esize); P[d] = result;
Operational information
If PSTATE.DIT is 1:
- The execution time of this instruction is independent of:
- The values of the data supplied in any of its registers.
- The values of the NZCV flags.
- The response of this instruction to asynchronous exceptions does not vary based on:
- The values of the data supplied in any of its registers.
- The values of the NZCV flags.