rbtree: add rb_search_exact()
[nasm.git] / test / k_test.asm
blobd5f346bf8f9474ed1a5327b8cfca369dfc2f1cf3
1 bits 64
2 default rel
4 %use altreg
6 section .text
8 bar equ 0xcc
10 ;; Each instruction group separated by blank should encode identially
12 ;; k_mov kreg size_suffix size_name gpr big_gpr
13 %macro k_mov 5
14 kmov%2 %1,[foo]
15 kmov %1,%3 [foo]
16 kmov %3 [foo],%1
18 kmov%2 [foo],%1
19 kmov %3 [foo],%1
20 kmov [foo],%3 %1
21 kmov %3 [foo],%1
23 kmov%2 %1,%1
24 kmov %3 %1,%1
25 kmov %1,%3 %1
27 kmov%2 %1,%4
28 kmov%2 %1,%5
29 kmov %1,%4
30 kmov %3 %1,%4
31 kmov %3 %1,%5
32 kmov %1,%3 %4
33 %ifidni %4,%5
34 kmov %1,%5
35 %endif
37 kmov%2 %5,%1
38 %ifidni %4,%5
39 kmov %5,%1
40 %endif
41 kmov %5,%3 %1
43 %endmacro
45 %pragma list options +bempf
47 ;; k_rr op kreg size_suffix size_name
48 %macro k_rr 4
49 %1%3 %2,%2
50 %1 %4 %2,%2
51 %1 %2,%4 %2
53 %endmacro
55 ;; k_rri op kreg size_suffix size_name
56 %macro k_rrr 4
57 %1%3 %2,%2,%2
58 %1 %4 %2,%2,%2
59 %1 %2,%4 %2,%2
60 %1 %2,%2,%4 %2
62 %endmacro
64 ;; k_rri op kreg size_suffix size_name
65 %macro k_rri 4
66 %1%3 %2,%2,bar
67 %1 %4 %2,%2,bar
68 %1 %2,%4 %2,bar
70 %endmacro
72 %define size_b byte
73 %define size_w word
74 %define size_d dword
75 %define size_q qword
77 %define gpr_b b
78 %define gpr_w w
79 %define gpr_d d
80 %define gpr_q
82 %define bgpr_b d
83 %define bgpr_w d
84 %define bgpr_d d
85 %define bgpr_q
87 ;; k_test size_suffix regno
88 %macro k_test 2
89 k_mov k%2,%1,size_%1,%[r %+ %2 %+ gpr_%1],%[r %+ %2 %+ bgpr_%1]
90 k_rrr kadd,k%2,%1,size_%1
91 k_rrr kand,k%2,%1,size_%1
92 k_rrr kandn,k%2,%1,size_%1
93 k_rrr kand,k%2,%1,size_%1
94 k_rr knot,k%2,%1,size_%1
95 k_rrr kor,k%2,%1,size_%1
96 k_rr kortest,k%2,%1,size_%1
97 k_rri kshiftl,k%2,%1,size_%1
98 k_rri kshiftr,k%2,%1,size_%1
99 k_rr ktest,k%2,%1,size_%1
100 k_rrr kxnor,k%2,%1,size_%1
101 k_rrr kxor,k%2,%1,size_%1
102 %endmacro
104 %assign nreg 0
105 %define kreg k %+ nreg
106 %rep 8
108 k_test b,nreg
109 k_test w,nreg
110 k_test d,nreg
111 k_test q,nreg
113 kunpckbw kreg,kreg,kreg
114 kunpck word kreg,kreg,kreg
115 kunpck kreg,byte kreg,kreg
116 kunpck kreg,kreg,byte kreg
117 kunpck word kreg,byte kreg,kreg
118 kunpck word kreg,kreg,byte kreg
120 kunpckwd kreg,kreg,kreg
121 kunpck dword kreg,kreg,kreg
122 kunpck kreg,word kreg,kreg
123 kunpck kreg,kreg,word kreg
124 kunpck dword kreg,word kreg,kreg
125 kunpck dword kreg,kreg,word kreg
127 kunpckdq kreg,kreg,kreg
128 kunpck qword kreg,kreg,kreg
129 kunpck kreg,dword kreg,kreg
130 kunpck kreg,kreg,dword kreg
131 kunpck qword kreg,dword kreg,kreg
132 kunpck qword kreg,kreg,dword kreg
134 %assign nreg nreg+1
135 %endrep
137 section .bss
139 foo resq 1