1! RUN: llvm-mc %s -arch=sparc   -show-encoding | FileCheck %s
2! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s
3
4        ! CHECK: ldsb [%i0+%l6], %o2  ! encoding: [0xd4,0x4e,0x00,0x16]
5        ldsb [%i0 + %l6], %o2
6        ! CHECK: ldsb [%i0+32], %o2   ! encoding: [0xd4,0x4e,0x20,0x20]
7        ldsb [%i0 + 32], %o2
8        ! CHECK: ldsb [%g1], %o4      ! encoding: [0xd8,0x48,0x40,0x00]
9        ldsb [%g1], %o4
10        ! CHECK: ldsba [%i0+%l6] 131, %o2  ! encoding: [0xd4,0xce,0x10,0x76]
11        ldsba [%i0 + %l6] 131, %o2
12
13        ! CHECK: ldsh [%i0+%l6], %o2  ! encoding: [0xd4,0x56,0x00,0x16]
14        ldsh [%i0 + %l6], %o2
15        ! CHECK: ldsh [%i0+32], %o2   ! encoding: [0xd4,0x56,0x20,0x20]
16        ldsh [%i0 + 32], %o2
17        ! CHECK: ldsh [%g1], %o4      ! encoding: [0xd8,0x50,0x40,0x00]
18        ldsh [%g1], %o4
19        ! CHECK: ldsha [%i0+%l6] 131, %o2 ! encoding: [0xd4,0xd6,0x10,0x76]
20        ldsha [%i0 + %l6] 131, %o2
21
22        ! CHECK: ldub [%i0+%l6], %o2  ! encoding: [0xd4,0x0e,0x00,0x16]
23        ldub [%i0 + %l6], %o2
24        ! CHECK: ldub [%i0+32], %o2   ! encoding: [0xd4,0x0e,0x20,0x20]
25        ldub [%i0 + 32], %o2
26        ! CHECK: ldub [%g1], %o2      ! encoding: [0xd4,0x08,0x40,0x00]
27        ldub [%g1], %o2
28        ! CHECK: lduba [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x8e,0x10,0x76]
29        lduba [%i0 + %l6] 131, %o2
30
31        ! CHECK: lduh [%i0+%l6], %o2  ! encoding: [0xd4,0x16,0x00,0x16]
32        lduh [%i0 + %l6], %o2
33        ! CHECK: lduh [%i0+32], %o2   ! encoding: [0xd4,0x16,0x20,0x20]
34        lduh [%i0 + 32], %o2
35        ! CHECK: lduh [%g1], %o2      ! encoding: [0xd4,0x10,0x40,0x00]
36        lduh [%g1], %o2
37        ! CHECK: lduha [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x96,0x10,0x76]
38        lduha [%i0 + %l6] 131, %o2
39
40        ! CHECK: ld [%i0+%l6], %o2    ! encoding: [0xd4,0x06,0x00,0x16]
41        ld [%i0 + %l6], %o2
42        ! CHECK: ld [%i0+32], %o2     ! encoding: [0xd4,0x06,0x20,0x20]
43        ld [%i0 + 32], %o2
44        ! CHECK: ld [%g1], %o2        ! encoding: [0xd4,0x00,0x40,0x00]
45        ld [%g1], %o2
46        ! CHECK: lda [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
47        lda [%i0 + %l6] 131, %o2
48
49        ! CHECK: ldd [%i0+%l6], %o2    ! encoding: [0xd4,0x1e,0x00,0x16]
50        ldd [%i0 + %l6], %o2
51        ! CHECK: ldd [%i0+32], %o2     ! encoding: [0xd4,0x1e,0x20,0x20]
52        ldd [%i0 + 32], %o2
53        ! CHECK: ldd [%g1], %o2        ! encoding: [0xd4,0x18,0x40,0x00]
54        ldd [%g1], %o2
55        ! CHECK: ldda [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x9e,0x10,0x76]
56        ldda [%i0 + %l6] 131, %o2
57
58        ! CHECK: stb %o2, [%i0+%l6]   ! encoding: [0xd4,0x2e,0x00,0x16]
59        stb %o2, [%i0 + %l6]
60        ! CHECK: stb %o2, [%i0+32]    ! encoding: [0xd4,0x2e,0x20,0x20]
61        stb %o2, [%i0 + 32]
62        ! CHECK: stb %o2, [%g1]       ! encoding: [0xd4,0x28,0x40,0x00]
63        stb %o2, [%g1]
64        ! CHECK: stba %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xae,0x10,0x76]
65        stba %o2, [%i0 + %l6] 131
66
67        ! CHECK: sth %o2, [%i0+%l6]   ! encoding: [0xd4,0x36,0x00,0x16]
68        sth %o2, [%i0 + %l6]
69        ! CHECK: sth %o2, [%i0+32]    ! encoding: [0xd4,0x36,0x20,0x20]
70        sth %o2, [%i0 + 32]
71        ! CHECK: sth %o2, [%g1]       ! encoding: [0xd4,0x30,0x40,0x00]
72        sth %o2, [%g1]
73        ! CHECK: stha %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xb6,0x10,0x76]
74        stha %o2, [%i0 + %l6] 131
75
76        ! CHECK: st %o2, [%i0+%l6]    ! encoding: [0xd4,0x26,0x00,0x16]
77        st %o2, [%i0 + %l6]
78        ! CHECK: st %o2, [%i0+32]     ! encoding: [0xd4,0x26,0x20,0x20]
79        st %o2, [%i0 + 32]
80        ! CHECK: st %o2, [%g1]        ! encoding: [0xd4,0x20,0x40,0x00]
81        st %o2, [%g1]
82        ! CHECK: sta %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xa6,0x10,0x76]
83        sta %o2, [%i0 + %l6] 131
84
85        ! CHECK: std %o2, [%i0+%l6]    ! encoding: [0xd4,0x3e,0x00,0x16]
86        std %o2, [%i0 + %l6]
87        ! CHECK: std %o2, [%i0+32]     ! encoding: [0xd4,0x3e,0x20,0x20]
88        std %o2, [%i0 + 32]
89        ! CHECK: std %o2, [%g1]        ! encoding: [0xd4,0x38,0x40,0x00]
90        std %o2, [%g1]
91        ! CHECK: stda %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xbe,0x10,0x76]
92        stda %o2, [%i0 + %l6] 131
93
94        ! CHECK:  flush %g1+%g2         ! encoding: [0x81,0xd8,0x40,0x02]
95        flush %g1 + %g2
96        ! CHECK:  flush %g1+8           ! encoding: [0x81,0xd8,0x60,0x08]
97        flush %g1 + 8
98        ! CHECK:  flush %g1             ! encoding: [0x81,0xd8,0x40,0x00]
99        flush %g1
100        ! Not specified in manual, but accepted by gas.
101        ! CHECK:  flush %g0             ! encoding: [0x81,0xd8,0x00,0x00]
102        flush
103