Sparc: support the "set" synthetic instruction.
[oota-llvm.git] / test / MC / Sparc / sparc-synthetic-instructions.s
1 ! RUN: llvm-mc %s -arch=sparc   -show-encoding | FileCheck %s
2 ! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s
3
4 ! Section A.3 Synthetic Instructions
5         ! CHECK: sethi %hi(40000), %g1            ! encoding: [0x03,0b00AAAAAA,A,A]
6         ! CHECK:                                  !   fixup A - offset: 0, value: %hi(40000), kind: fixup_sparc_hi22
7         ! CHECK: or %g1, %lo(40000), %g1          ! encoding: [0x82,0x10,0b011000AA,A]
8         ! CHECK:                                  !   fixup A - offset: 0, value: %lo(40000), kind: fixup_sparc_lo10
9         set 40000, %g1
10         ! CHECK: mov      %lo(1), %g1             ! encoding: [0x82,0x10,0b001000AA,A]
11         ! CHECK:                                  !   fixup A - offset: 0, value: %lo(1), kind: fixup_sparc_lo10
12         set 1, %g1
13
14         ! CHECK: sethi %hi(32768), %g1            ! encoding: [0x03,0b00AAAAAA,A,A]
15         ! CHECK:                                  !   fixup A - offset: 0, value: %hi(32768), kind: fixup_sparc_hi22
16         set 32768, %g1
17