1 /****************************************************************************
3 * Realmode X86 Emulator Library
5 * Copyright (C) 1996-1999 SciTech Software, Inc.
6 * Copyright (C) David Mosberger-Tang
7 * Copyright (C) 1999 Egbert Eich
9 * ========================================================================
11 * Permission to use, copy, modify, distribute, and sell this software and
12 * its documentation for any purpose is hereby granted without fee,
13 * provided that the above copyright notice appear in all copies and that
14 * both that copyright notice and this permission notice appear in
15 * supporting documentation, and that the name of the authors not be used
16 * in advertising or publicity pertaining to distribution of the software
17 * without specific, written prior permission. The authors makes no
18 * representations about the suitability of this software for any purpose.
19 * It is provided "as is" without express or implied warranty.
21 * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
22 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
23 * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
24 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
25 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
26 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27 * PERFORMANCE OF THIS SOFTWARE.
29 * ========================================================================
31 * Language: Watcom C 10.6 or later
32 * Environment: 32-bit DOS
33 * Developer: Kendall Bennett
35 * Description: Program to validate the x86 emulator library for
36 * correctness. We run the emulator primitive operations
37 * functions against the real x86 CPU, and compare the result
38 * and flags to ensure correctness.
40 * We use inline assembler to compile and build this program.
42 ****************************************************************************/
49 #include "x86emu/prim_asm.h"
51 /*-------------------------- Implementation -------------------------------*/
56 #define ALL_FLAGS (F_CF | F_PF | F_AF | F_ZF | F_SF | F_OF)
58 #define VAL_START_BINARY(parm_type,res_type,dmax,smax,dincr,sincr) \
62 ulong flags,inflags; \
63 int f,failed = false; \
64 char buf1[80],buf2[80]; \
65 for (d = 0; d < dmax; d += dincr) { \
66 for (s = 0; s < smax; s += sincr) { \
67 M.x86.R_EFLG = inflags = flags = def_flags; \
68 for (f = 0; f < 2; f++) {
70 #define VAL_TEST_BINARY(name) \
71 r_asm = name##_asm(&flags,d,s); \
73 if (r != r_asm || M.x86.R_EFLG != flags) \
75 if (failed || trace) {
77 #define VAL_TEST_BINARY_VOID(name) \
78 name##_asm(&flags,d,s); \
81 if (M.x86.R_EFLG != flags) \
83 if (failed || trace) {
85 #define VAL_FAIL_BYTE_BYTE_BINARY(name) \
88 printk("0x%02X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", \
89 r, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
90 printk("0x%02X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", \
91 r_asm, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags));
93 #define VAL_FAIL_WORD_WORD_BINARY(name) \
96 printk("0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", \
97 r, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
98 printk("0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", \
99 r_asm, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags));
101 #define VAL_FAIL_LONG_LONG_BINARY(name) \
104 printk("0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", \
105 r, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
106 printk("0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", \
107 r_asm, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags));
109 #define VAL_END_BINARY() \
111 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \
122 printk("passed\n"); \
125 #define VAL_BYTE_BYTE_BINARY(name) \
126 printk("Validating %s ... ", #name); \
127 VAL_START_BINARY(u8,u8,0xFF,0xFF,1,1) \
128 VAL_TEST_BINARY(name) \
129 VAL_FAIL_BYTE_BYTE_BINARY(name) \
132 #define VAL_WORD_WORD_BINARY(name) \
133 printk("Validating %s ... ", #name); \
134 VAL_START_BINARY(u16,u16,0xFF00,0xFF00,0x100,0x100) \
135 VAL_TEST_BINARY(name) \
136 VAL_FAIL_WORD_WORD_BINARY(name) \
139 #define VAL_LONG_LONG_BINARY(name) \
140 printk("Validating %s ... ", #name); \
141 VAL_START_BINARY(u32,u32,0xFF000000,0xFF000000,0x1000000,0x1000000) \
142 VAL_TEST_BINARY(name) \
143 VAL_FAIL_LONG_LONG_BINARY(name) \
146 #define VAL_VOID_BYTE_BINARY(name) \
147 printk("Validating %s ... ", #name); \
148 VAL_START_BINARY(u8,u8,0xFF,0xFF,1,1) \
149 VAL_TEST_BINARY_VOID(name) \
150 VAL_FAIL_BYTE_BYTE_BINARY(name) \
153 #define VAL_VOID_WORD_BINARY(name) \
154 printk("Validating %s ... ", #name); \
155 VAL_START_BINARY(u16,u16,0xFF00,0xFF00,0x100,0x100) \
156 VAL_TEST_BINARY_VOID(name) \
157 VAL_FAIL_WORD_WORD_BINARY(name) \
160 #define VAL_VOID_LONG_BINARY(name) \
161 printk("Validating %s ... ", #name); \
162 VAL_START_BINARY(u32,u32,0xFF000000,0xFF000000,0x1000000,0x1000000) \
163 VAL_TEST_BINARY_VOID(name) \
164 VAL_FAIL_LONG_LONG_BINARY(name) \
167 #define VAL_BYTE_ROTATE(name) \
168 printk("Validating %s ... ", #name); \
169 VAL_START_BINARY(u8,u8,0xFF,8,1,1) \
170 VAL_TEST_BINARY(name) \
171 VAL_FAIL_BYTE_BYTE_BINARY(name) \
174 #define VAL_WORD_ROTATE(name) \
175 printk("Validating %s ... ", #name); \
176 VAL_START_BINARY(u16,u16,0xFF00,16,0x100,1) \
177 VAL_TEST_BINARY(name) \
178 VAL_FAIL_WORD_WORD_BINARY(name) \
181 #define VAL_LONG_ROTATE(name) \
182 printk("Validating %s ... ", #name); \
183 VAL_START_BINARY(u32,u32,0xFF000000,32,0x1000000,1) \
184 VAL_TEST_BINARY(name) \
185 VAL_FAIL_LONG_LONG_BINARY(name) \
188 #define VAL_START_TERNARY(parm_type,res_type,dmax,smax,dincr,sincr,maxshift)\
194 int f,failed = false; \
195 char buf1[80],buf2[80]; \
196 for (d = 0; d < dmax; d += dincr) { \
197 for (s = 0; s < smax; s += sincr) { \
198 for (shift = 0; shift < maxshift; shift += 1) { \
199 M.x86.R_EFLG = inflags = flags = def_flags; \
200 for (f = 0; f < 2; f++) {
202 #define VAL_TEST_TERNARY(name) \
203 r_asm = name##_asm(&flags,d,s,shift); \
204 r = name(d,s,shift); \
205 if (r != r_asm || M.x86.R_EFLG != flags) \
207 if (failed || trace) {
209 #define VAL_FAIL_WORD_WORD_TERNARY(name) \
212 printk("0x%04X = %-15s(0x%04X,0x%04X,%d), flags = %s -> %s\n", \
213 r, #name, d, s, shift, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
214 printk("0x%04X = %-15s(0x%04X,0x%04X,%d), flags = %s -> %s\n", \
215 r_asm, #name"_asm", d, s, shift, print_flags(buf1,inflags), print_flags(buf2,flags));
217 #define VAL_FAIL_LONG_LONG_TERNARY(name) \
220 printk("0x%08X = %-15s(0x%08X,0x%08X,%d), flags = %s -> %s\n", \
221 r, #name, d, s, shift, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
222 printk("0x%08X = %-15s(0x%08X,0x%08X,%d), flags = %s -> %s\n", \
223 r_asm, #name"_asm", d, s, shift, print_flags(buf1,inflags), print_flags(buf2,flags));
225 #define VAL_END_TERNARY() \
227 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \
241 printk("passed\n"); \
244 #define VAL_WORD_ROTATE_DBL(name) \
245 printk("Validating %s ... ", #name); \
246 VAL_START_TERNARY(u16,u16,0xFF00,0xFF00,0x100,0x100,16) \
247 VAL_TEST_TERNARY(name) \
248 VAL_FAIL_WORD_WORD_TERNARY(name) \
251 #define VAL_LONG_ROTATE_DBL(name) \
252 printk("Validating %s ... ", #name); \
253 VAL_START_TERNARY(u32,u32,0xFF000000,0xFF000000,0x1000000,0x1000000,32) \
254 VAL_TEST_TERNARY(name) \
255 VAL_FAIL_LONG_LONG_TERNARY(name) \
258 #define VAL_START_UNARY(parm_type,max,incr) \
260 parm_type d,r,r_asm; \
262 int f,failed = false; \
263 char buf1[80],buf2[80]; \
264 for (d = 0; d < max; d += incr) { \
265 M.x86.R_EFLG = inflags = flags = def_flags; \
266 for (f = 0; f < 2; f++) {
268 #define VAL_TEST_UNARY(name) \
269 r_asm = name##_asm(&flags,d); \
271 if (r != r_asm || M.x86.R_EFLG != flags) { \
274 #define VAL_FAIL_BYTE_UNARY(name) \
276 printk("0x%02X = %-15s(0x%02X), flags = %s -> %s\n", \
277 r, #name, d, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
278 printk("0x%02X = %-15s(0x%02X), flags = %s -> %s\n", \
279 r_asm, #name"_asm", d, print_flags(buf1,inflags), print_flags(buf2,flags));
281 #define VAL_FAIL_WORD_UNARY(name) \
283 printk("0x%04X = %-15s(0x%04X), flags = %s -> %s\n", \
284 r, #name, d, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
285 printk("0x%04X = %-15s(0x%04X), flags = %s -> %s\n", \
286 r_asm, #name"_asm", d, print_flags(buf1,inflags), print_flags(buf2,flags));
288 #define VAL_FAIL_LONG_UNARY(name) \
290 printk("0x%08X = %-15s(0x%08X), flags = %s -> %s\n", \
291 r, #name, d, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
292 printk("0x%08X = %-15s(0x%08X), flags = %s -> %s\n", \
293 r_asm, #name"_asm", d, print_flags(buf1,inflags), print_flags(buf2,flags));
295 #define VAL_END_UNARY() \
297 M.x86.R_EFLG = inflags = flags = def_flags | ALL_FLAGS; \
305 printk("passed\n"); \
308 #define VAL_BYTE_UNARY(name) \
309 printk("Validating %s ... ", #name); \
310 VAL_START_UNARY(u8,0xFF,0x1) \
311 VAL_TEST_UNARY(name) \
312 VAL_FAIL_BYTE_UNARY(name) \
315 #define VAL_WORD_UNARY(name) \
316 printk("Validating %s ... ", #name); \
317 VAL_START_UNARY(u16,0xFF00,0x100) \
318 VAL_TEST_UNARY(name) \
319 VAL_FAIL_WORD_UNARY(name) \
322 #define VAL_WORD_BYTE_UNARY(name) \
323 printk("Validating %s ... ", #name); \
324 VAL_START_UNARY(u16,0xFF,0x1) \
325 VAL_TEST_UNARY(name) \
326 VAL_FAIL_WORD_UNARY(name) \
329 #define VAL_LONG_UNARY(name) \
330 printk("Validating %s ... ", #name); \
331 VAL_START_UNARY(u32,0xFF000000,0x1000000) \
332 VAL_TEST_UNARY(name) \
333 VAL_FAIL_LONG_UNARY(name) \
336 #define VAL_BYTE_MUL(name) \
337 printk("Validating %s ... ", #name); \
342 int f,failed = false; \
343 char buf1[80],buf2[80]; \
344 for (d = 0; d < 0xFF; d += 1) { \
345 for (s = 0; s < 0xFF; s += 1) { \
346 M.x86.R_EFLG = inflags = flags = def_flags; \
347 for (f = 0; f < 2; f++) { \
348 name##_asm(&flags,&r_asm,d,s); \
352 if (r != r_asm || M.x86.R_EFLG != flags) \
354 if (failed || trace) { \
357 printk("0x%04X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", \
358 r, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
359 printk("0x%04X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", \
360 r_asm, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \
362 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \
373 printk("passed\n"); \
376 #define VAL_WORD_MUL(name) \
377 printk("Validating %s ... ", #name); \
383 int f,failed = false; \
384 char buf1[80],buf2[80]; \
385 for (d = 0; d < 0xFF00; d += 0x100) { \
386 for (s = 0; s < 0xFF00; s += 0x100) { \
387 M.x86.R_EFLG = inflags = flags = def_flags; \
388 for (f = 0; f < 2; f++) { \
389 name##_asm(&flags,&r_asm_lo,&r_asm_hi,d,s); \
394 if (r_lo != r_asm_lo || r_hi != r_asm_hi || M.x86.R_EFLG != flags)\
396 if (failed || trace) { \
399 printk("0x%04X:0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", \
400 r_hi,r_lo, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
401 printk("0x%04X:0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", \
402 r_asm_hi,r_asm_lo, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \
404 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \
415 printk("passed\n"); \
418 #define VAL_LONG_MUL(name) \
419 printk("Validating %s ... ", #name); \
425 int f,failed = false; \
426 char buf1[80],buf2[80]; \
427 for (d = 0; d < 0xFF000000; d += 0x1000000) { \
428 for (s = 0; s < 0xFF000000; s += 0x1000000) { \
429 M.x86.R_EFLG = inflags = flags = def_flags; \
430 for (f = 0; f < 2; f++) { \
431 name##_asm(&flags,&r_asm_lo,&r_asm_hi,d,s); \
434 r_lo = M.x86.R_EAX; \
435 r_hi = M.x86.R_EDX; \
436 if (r_lo != r_asm_lo || r_hi != r_asm_hi || M.x86.R_EFLG != flags)\
438 if (failed || trace) { \
441 printk("0x%08X:0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", \
442 r_hi,r_lo, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
443 printk("0x%08X:0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", \
444 r_asm_hi,r_asm_lo, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \
446 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \
457 printk("passed\n"); \
460 #define VAL_BYTE_DIV(name) \
461 printk("Validating %s ... ", #name); \
464 u8 r_quot,r_rem,r_asm_quot,r_asm_rem; \
466 int f,failed = false; \
467 char buf1[80],buf2[80]; \
468 for (d = 0; d < 0xFF00; d += 0x100) { \
469 for (s = 1; s < 0xFF; s += 1) { \
470 M.x86.R_EFLG = inflags = flags = def_flags; \
471 for (f = 0; f < 2; f++) { \
475 r_quot = M.x86.R_AL; \
476 r_rem = M.x86.R_AH; \
477 if (M.x86.intr & INTR_SYNCH) \
479 name##_asm(&flags,&r_asm_quot,&r_asm_rem,d,s); \
480 if (r_quot != r_asm_quot || r_rem != r_asm_rem || M.x86.R_EFLG != flags) \
482 if (failed || trace) { \
485 printk("0x%02X:0x%02X = %-15s(0x%04X,0x%02X), flags = %s -> %s\n", \
486 r_quot, r_rem, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
487 printk("0x%02X:0x%02X = %-15s(0x%04X,0x%02X), flags = %s -> %s\n", \
488 r_asm_quot, r_asm_rem, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \
490 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \
501 printk("passed\n"); \
504 #define VAL_WORD_DIV(name) \
505 printk("Validating %s ... ", #name); \
508 u16 r_quot,r_rem,r_asm_quot,r_asm_rem; \
510 int f,failed = false; \
511 char buf1[80],buf2[80]; \
512 for (d = 0; d < 0xFF000000; d += 0x1000000) { \
513 for (s = 0x100; s < 0xFF00; s += 0x100) { \
514 M.x86.R_EFLG = inflags = flags = def_flags; \
515 for (f = 0; f < 2; f++) { \
517 M.x86.R_AX = d & 0xFFFF; \
518 M.x86.R_DX = d >> 16; \
520 r_quot = M.x86.R_AX; \
521 r_rem = M.x86.R_DX; \
522 if (M.x86.intr & INTR_SYNCH) \
524 name##_asm(&flags,&r_asm_quot,&r_asm_rem,d & 0xFFFF,d >> 16,s);\
525 if (r_quot != r_asm_quot || r_rem != r_asm_rem || M.x86.R_EFLG != flags) \
527 if (failed || trace) { \
530 printk("0x%04X:0x%04X = %-15s(0x%08X,0x%04X), flags = %s -> %s\n", \
531 r_quot, r_rem, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
532 printk("0x%04X:0x%04X = %-15s(0x%08X,0x%04X), flags = %s -> %s\n", \
533 r_asm_quot, r_asm_rem, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \
535 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \
546 printk("passed\n"); \
549 #define VAL_LONG_DIV(name) \
550 printk("Validating %s ... ", #name); \
553 u32 r_quot,r_rem,r_asm_quot,r_asm_rem; \
555 int f,failed = false; \
556 char buf1[80],buf2[80]; \
557 for (d = 0; d < 0xFF000000; d += 0x1000000) { \
558 for (s = 0x100; s < 0xFF00; s += 0x100) { \
559 M.x86.R_EFLG = inflags = flags = def_flags; \
560 for (f = 0; f < 2; f++) { \
565 r_quot = M.x86.R_EAX; \
566 r_rem = M.x86.R_EDX; \
567 if (M.x86.intr & INTR_SYNCH) \
569 name##_asm(&flags,&r_asm_quot,&r_asm_rem,d,0,s); \
570 if (r_quot != r_asm_quot || r_rem != r_asm_rem || M.x86.R_EFLG != flags) \
572 if (failed || trace) { \
575 printk("0x%08X:0x%08X = %-15s(0x%08X:0x%08X,0x%08X), flags = %s -> %s\n", \
576 r_quot, r_rem, #name, 0, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \
577 printk("0x%08X:0x%08X = %-15s(0x%08X:0x%08X,0x%08X), flags = %s -> %s\n", \
578 r_asm_quot, r_asm_rem, #name"_asm", 0, d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \
580 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \
591 printk("passed\n"); \
595 printk(const char *fmt
, ...)
599 va_start(argptr
, fmt
);
600 vfprintf(stdout
, fmt
, argptr
);
606 print_flags(char *buf
, ulong flags
)
608 char *separator
= "";
612 strcat(buf
, separator
);
617 strcat(buf
, separator
);
622 strcat(buf
, separator
);
627 strcat(buf
, separator
);
632 strcat(buf
, separator
);
637 strcat(buf
, separator
);
641 if (separator
[0] == 0)
654 memset(&M
, 0, sizeof(M
));
655 def_flags
= get_flags_asm() & ~ALL_FLAGS
;
657 VAL_WORD_UNARY(aaa_word
);
658 VAL_WORD_UNARY(aas_word
);
660 VAL_WORD_UNARY(aad_word
);
661 VAL_WORD_UNARY(aam_word
);
663 VAL_BYTE_BYTE_BINARY(adc_byte
);
664 VAL_WORD_WORD_BINARY(adc_word
);
665 VAL_LONG_LONG_BINARY(adc_long
);
667 VAL_BYTE_BYTE_BINARY(add_byte
);
668 VAL_WORD_WORD_BINARY(add_word
);
669 VAL_LONG_LONG_BINARY(add_long
);
671 VAL_BYTE_BYTE_BINARY(and_byte
);
672 VAL_WORD_WORD_BINARY(and_word
);
673 VAL_LONG_LONG_BINARY(and_long
);
675 VAL_BYTE_BYTE_BINARY(cmp_byte
);
676 VAL_WORD_WORD_BINARY(cmp_word
);
677 VAL_LONG_LONG_BINARY(cmp_long
);
679 VAL_BYTE_UNARY(daa_byte
);
680 VAL_BYTE_UNARY(das_byte
); /* Fails for 0x9A (out of range anyway) */
682 VAL_BYTE_UNARY(dec_byte
);
683 VAL_WORD_UNARY(dec_word
);
684 VAL_LONG_UNARY(dec_long
);
686 VAL_BYTE_UNARY(inc_byte
);
687 VAL_WORD_UNARY(inc_word
);
688 VAL_LONG_UNARY(inc_long
);
690 VAL_BYTE_BYTE_BINARY(or_byte
);
691 VAL_WORD_WORD_BINARY(or_word
);
692 VAL_LONG_LONG_BINARY(or_long
);
694 VAL_BYTE_UNARY(neg_byte
);
695 VAL_WORD_UNARY(neg_word
);
696 VAL_LONG_UNARY(neg_long
);
698 VAL_BYTE_UNARY(not_byte
);
699 VAL_WORD_UNARY(not_word
);
700 VAL_LONG_UNARY(not_long
);
702 VAL_BYTE_ROTATE(rcl_byte
);
703 VAL_WORD_ROTATE(rcl_word
);
704 VAL_LONG_ROTATE(rcl_long
);
706 VAL_BYTE_ROTATE(rcr_byte
);
707 VAL_WORD_ROTATE(rcr_word
);
708 VAL_LONG_ROTATE(rcr_long
);
710 VAL_BYTE_ROTATE(rol_byte
);
711 VAL_WORD_ROTATE(rol_word
);
712 VAL_LONG_ROTATE(rol_long
);
714 VAL_BYTE_ROTATE(ror_byte
);
715 VAL_WORD_ROTATE(ror_word
);
716 VAL_LONG_ROTATE(ror_long
);
718 VAL_BYTE_ROTATE(shl_byte
);
719 VAL_WORD_ROTATE(shl_word
);
720 VAL_LONG_ROTATE(shl_long
);
722 VAL_BYTE_ROTATE(shr_byte
);
723 VAL_WORD_ROTATE(shr_word
);
724 VAL_LONG_ROTATE(shr_long
);
726 VAL_BYTE_ROTATE(sar_byte
);
727 VAL_WORD_ROTATE(sar_word
);
728 VAL_LONG_ROTATE(sar_long
);
730 VAL_WORD_ROTATE_DBL(shld_word
);
731 VAL_LONG_ROTATE_DBL(shld_long
);
733 VAL_WORD_ROTATE_DBL(shrd_word
);
734 VAL_LONG_ROTATE_DBL(shrd_long
);
736 VAL_BYTE_BYTE_BINARY(sbb_byte
);
737 VAL_WORD_WORD_BINARY(sbb_word
);
738 VAL_LONG_LONG_BINARY(sbb_long
);
740 VAL_BYTE_BYTE_BINARY(sub_byte
);
741 VAL_WORD_WORD_BINARY(sub_word
);
742 VAL_LONG_LONG_BINARY(sub_long
);
744 VAL_BYTE_BYTE_BINARY(xor_byte
);
745 VAL_WORD_WORD_BINARY(xor_word
);
746 VAL_LONG_LONG_BINARY(xor_long
);
748 VAL_VOID_BYTE_BINARY(test_byte
);
749 VAL_VOID_WORD_BINARY(test_word
);
750 VAL_VOID_LONG_BINARY(test_long
);
752 VAL_BYTE_MUL(imul_byte
);
753 VAL_WORD_MUL(imul_word
);
754 VAL_LONG_MUL(imul_long
);
756 VAL_BYTE_MUL(mul_byte
);
757 VAL_WORD_MUL(mul_word
);
758 VAL_LONG_MUL(mul_long
);
760 VAL_BYTE_DIV(idiv_byte
);
761 VAL_WORD_DIV(idiv_word
);
762 VAL_LONG_DIV(idiv_long
);
764 VAL_BYTE_DIV(div_byte
);
765 VAL_WORD_DIV(div_word
);
766 VAL_LONG_DIV(div_long
);