| OLD | NEW |
| 1 @hex: | 1 @hex: |
| 2 # Test handling of different sizes for instruction bswap. | 2 # Test handling of different sizes for instruction bswap. |
| 3 # 32-bit example | |
| 4 0f c8 | 3 0f c8 |
| 5 # 64-bit example | |
| 6 48 0f c8 | |
| 7 # Bad case, we should not parse 16-bit operands | |
| 8 66 0f c8 | |
| 9 | |
| 10 @dis: | 4 @dis: |
| 11 0: 0f c8 bswap %eax | 5 0: 0f c8 bswap %eax |
| 12 2: 48 0f c8 bswap %rax | |
| 13 5: 66 0f c8 bswap %ax | |
| 14 @rdfa_output: | 6 @rdfa_output: |
| 15 5: [0] unrecognized instruction | 7 return code: 0 |
| 8 @spec: |
| 9 SAFE |
| 10 ---------------------------------------------------------------------- |
| 11 @hex: |
| 12 48 0f c8 |
| 13 @dis: |
| 14 0:»48 0f c8 » bswap %rax |
| 15 @rdfa_output: |
| 16 return code: 0 |
| 17 @spec: |
| 18 SAFE |
| 19 ---------------------------------------------------------------------- |
| 20 @hex: |
| 21 # Bad case, we should not parse 16-bit operands |
| 22 # (because bswap's behavior is undefined) |
| 23 66 0f c8 |
| 24 @dis: |
| 25 0:»66 0f c8 » bswap %ax |
| 26 @rdfa_output: |
| 27 0: [0] unrecognized instruction |
| 16 return code: 1 | 28 return code: 1 |
| 29 @spec: |
| 30 0: ('bswap is only allowed with 32-bit and 64-bit operands', Instruction(0x0:
66 0f c8 bswap %ax)) |
| OLD | NEW |