|
| 1 | +! RUN: not llvm-mc %s -arch=sparc -show-encoding 2>&1 | FileCheck %s --check-prefix=V8 |
| 2 | +! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s --check-prefix=V9 |
| 3 | + |
| 4 | +! V8: error: instruction requires a CPU feature not currently enabled |
| 5 | +! V8-NEXT: setx 1, %g1, %o1 |
| 6 | +! V9: mov 1, %o1 ! encoding: [0x92,0x10,0x20,0x01] |
| 7 | +setx 1, %g1, %o1 |
| 8 | + |
| 9 | +! V8: error: instruction requires a CPU feature not currently enabled |
| 10 | +! V8-NEXT: setx (0+1), %g1, %o1 |
| 11 | +! V9: mov 1, %o1 ! encoding: [0x92,0x10,0x20,0x01] |
| 12 | +setx (0+1), %g1, %o1 |
| 13 | + |
| 14 | +! V8: error: instruction requires a CPU feature not currently enabled |
| 15 | +! V8-NEXT: setx -1, %g1, %o1 |
| 16 | +! V9: mov -1, %o1 ! encoding: [0x92,0x10,0x3f,0xff] |
| 17 | +setx -1, %g1, %o1 |
| 18 | + |
| 19 | +! V8: error: instruction requires a CPU feature not currently enabled |
| 20 | +! V8-NEXT: setx (0-1), %g1, %o1 |
| 21 | +! V9: mov -1, %o1 ! encoding: [0x92,0x10,0x3f,0xff] |
| 22 | +setx (0-1), %g1, %o1 |
| 23 | + |
| 24 | +! V8: error: instruction requires a CPU feature not currently enabled |
| 25 | +! V8-NEXT: setx 0xffffffff, %g1, %o1 |
| 26 | +! V9: sethi %hi(4294967295), %o1 ! encoding: [0x13,0b00AAAAAA,A,A] |
| 27 | +! V9: ! fixup A - offset: 0, value: %hi(4294967295), kind: fixup_sparc_hi22 |
| 28 | +! V9: or %o1, %lo(4294967295), %o1 ! encoding: [0x92,0x12,0b011000AA,A] |
| 29 | +! V9: ! fixup A - offset: 0, value: %lo(4294967295), kind: fixup_sparc_lo10 |
| 30 | +setx 0xffffffff, %g1, %o1 |
| 31 | + |
| 32 | +! V8: error: instruction requires a CPU feature not currently enabled |
| 33 | +! V8-NEXT: setx (0xffff0000+0x0000ffff), %g1, %o1 |
| 34 | +! V9: sethi %hi(4294967295), %o1 ! encoding: [0x13,0b00AAAAAA,A,A] |
| 35 | +! V9: ! fixup A - offset: 0, value: %hi(4294967295), kind: fixup_sparc_hi22 |
| 36 | +! V9: or %o1, %lo(4294967295), %o1 ! encoding: [0x92,0x12,0b011000AA,A] |
| 37 | +! V9: ! fixup A - offset: 0, value: %lo(4294967295), kind: fixup_sparc_lo10 |
| 38 | +setx (0xffff0000+0x0000ffff), %g1, %o1 |
| 39 | + |
| 40 | +! V8: error: instruction requires a CPU feature not currently enabled |
| 41 | +! V8-NEXT: setx 0x0123456789abcdef, %g1, %o0 |
| 42 | +! V9: sethi %hi(81985529216486895), %o0 ! encoding: [0x11,0b00AAAAAA,A,A] |
| 43 | +! V9: ! fixup A - offset: 0, value: %hi(81985529216486895), kind: fixup_sparc_hi22 |
| 44 | +! V9: or %o0, %lo(81985529216486895), %o0 ! encoding: [0x90,0x12,0b001000AA,A] |
| 45 | +! V9: ! fixup A - offset: 0, value: %lo(81985529216486895), kind: fixup_sparc_lo10 |
| 46 | +! V9: sethi %hh(81985529216486895), %g1 ! encoding: [0x03,0b00AAAAAA,A,A] |
| 47 | +! V9: ! fixup A - offset: 0, value: %hh(81985529216486895), kind: fixup_sparc_hh |
| 48 | +! V9: or %g1, %hm(81985529216486895), %g1 ! encoding: [0x82,0x10,0b011000AA,A] |
| 49 | +! V9: ! fixup A - offset: 0, value: %hm(81985529216486895), kind: fixup_sparc_hm |
| 50 | +! V9: sllx %g1, 32, %g1 ! encoding: [0x83,0x28,0x70,0x20] |
| 51 | +! V9: or %g1, %o0, %o0 ! encoding: [0x90,0x10,0x40,0x08] |
| 52 | +setx 0x0123456789abcdef, %g1, %o0 |
| 53 | + |
| 54 | +! V8: error: instruction requires a CPU feature not currently enabled |
| 55 | +! V8-NEXT: setx (0x0123456700000000+0x0000000089abcdef), %g1, %o0 |
| 56 | +! V9: sethi %hi(81985529216486895), %o0 ! encoding: [0x11,0b00AAAAAA,A,A] |
| 57 | +! V9: ! fixup A - offset: 0, value: %hi(81985529216486895), kind: fixup_sparc_hi22 |
| 58 | +! V9: or %o0, %lo(81985529216486895), %o0 ! encoding: [0x90,0x12,0b001000AA,A] |
| 59 | +! V9: ! fixup A - offset: 0, value: %lo(81985529216486895), kind: fixup_sparc_lo10 |
| 60 | +! V9: sethi %hh(81985529216486895), %g1 ! encoding: [0x03,0b00AAAAAA,A,A] |
| 61 | +! V9: ! fixup A - offset: 0, value: %hh(81985529216486895), kind: fixup_sparc_hh |
| 62 | +! V9: or %g1, %hm(81985529216486895), %g1 ! encoding: [0x82,0x10,0b011000AA,A] |
| 63 | +! V9: ! fixup A - offset: 0, value: %hm(81985529216486895), kind: fixup_sparc_hm |
| 64 | +! V9: sllx %g1, 32, %g1 ! encoding: [0x83,0x28,0x70,0x20] |
| 65 | +! V9: or %g1, %o0, %o0 ! encoding: [0x90,0x10,0x40,0x08] |
| 66 | +setx (0x0123456700000000+0x0000000089abcdef), %g1, %o0 |
| 67 | + |
| 68 | +! V8: error: instruction requires a CPU feature not currently enabled |
| 69 | +! V8-NEXT: setx (.BB1-.BB0), %g1, %o0 |
| 70 | +! V9: sethi %hi(.BB1-.BB0), %o0 ! encoding: [0x11,0b00AAAAAA,A,A] |
| 71 | +! V9: ! fixup A - offset: 0, value: %hi(.BB1-.BB0), kind: fixup_sparc_hi22 |
| 72 | +! V9: or %o0, %lo(.BB1-.BB0), %o0 ! encoding: [0x90,0x12,0b001000AA,A] |
| 73 | +! V9: ! fixup A - offset: 0, value: %lo(.BB1-.BB0), kind: fixup_sparc_lo10 |
| 74 | +! V9: sethi %hh(.BB1-.BB0), %g1 ! encoding: [0x03,0b00AAAAAA,A,A] |
| 75 | +! V9: ! fixup A - offset: 0, value: %hh(.BB1-.BB0), kind: fixup_sparc_hh |
| 76 | +! V9: or %g1, %hm(.BB1-.BB0), %g1 ! encoding: [0x82,0x10,0b011000AA,A] |
| 77 | +! V9: ! fixup A - offset: 0, value: %hm(.BB1-.BB0), kind: fixup_sparc_hm |
| 78 | +! V9: sllx %g1, 32, %g1 ! encoding: [0x83,0x28,0x70,0x20] |
| 79 | +! V9: or %g1, %o0, %o0 ! encoding: [0x90,0x10,0x40,0x08] |
| 80 | +setx (.BB1-.BB0), %g1, %o0 |
0 commit comments