Niccolò Izzo | 585a86b | 2022-09-23 19:38:31 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Purpose: test example, verify the soundness of the vector compare words |
| 3 | * operation. |
| 4 | * |
| 5 | * Vector word comparison between 0x1234567887654321 and 0x1234567800000000 |
| 6 | * should result in 0b11110000 in binary, or 0xf0 in hex. |
| 7 | */ |
| 8 | |
| 9 | .text |
| 10 | .globl _start |
| 11 | |
| 12 | _start: |
| 13 | { |
| 14 | r0 = #0x87654321 |
| 15 | r1 = #0x12345678 |
| 16 | } |
| 17 | { |
| 18 | r2 = #0x00000000 |
| 19 | r3 = #0x12345678 |
| 20 | } |
| 21 | { |
| 22 | p2 = vcmpw.eq(r1:0, r3:2) |
| 23 | } |
| 24 | { |
| 25 | r4 = p2 |
| 26 | } |
| 27 | { |
| 28 | p0 = cmp.eq(r4, #0xf0); if (p0.new) jump:t pass |
| 29 | jump fail |
| 30 | } |