21 #include "x86emu/prim_asm.h" 32 #define ALL_FLAGS (F_CF | F_PF | F_AF | F_ZF | F_SF | F_OF) 34 #define VAL_START_BINARY(parm_type, res_type, dmax, smax, dincr, sincr) \ 38 ulong flags, inflags; \ 39 int f, failed = false; \ 40 char buf1[80], buf2[80]; \ 41 for (d = 0; d < dmax; d += dincr) \ 43 for (s = 0; s < smax; s += sincr) \ 45 M.x86.R_EFLG = inflags = flags = def_flags; \ 46 for (f = 0; f < 2; f++) \ 48 #define VAL_TEST_BINARY(name) \ 49 r_asm = name##_asm(&flags, d, s); \ 51 if (r != r_asm || M.x86.R_EFLG != flags) \ 53 if (failed || trace) \ 55 #define VAL_TEST_BINARY_VOID(name) \ 56 name##_asm(&flags, d, s); \ 59 if (M.x86.R_EFLG != flags) \ 61 if (failed || trace) \ 63 #define VAL_FAIL_BYTE_BYTE_BINARY(name) \ 67 "0x%02X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", r, #name, d, s, \ 68 print_flags(buf1, inflags), print_flags(buf2, M.x86.R_EFLG)); \ 70 "0x%02X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", r_asm, \ 71 #name "_asm", d, s, print_flags(buf1, inflags), \ 72 print_flags(buf2, flags)); 74 #define VAL_FAIL_WORD_WORD_BINARY(name) \ 78 "0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", r, #name, d, s, \ 79 print_flags(buf1, inflags), print_flags(buf2, M.x86.R_EFLG)); \ 81 "0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", r_asm, \ 82 #name "_asm", d, s, print_flags(buf1, inflags), \ 83 print_flags(buf2, flags)); 85 #define VAL_FAIL_LONG_LONG_BINARY(name) \ 89 "0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", r, #name, d, s, \ 90 print_flags(buf1, inflags), print_flags(buf2, M.x86.R_EFLG)); \ 92 "0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", r_asm, \ 93 #name "_asm", d, s, print_flags(buf1, inflags), \ 94 print_flags(buf2, flags)); 96 #define VAL_END_BINARY() \ 98 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ 109 printk("passed\n"); \ 112 #define VAL_BYTE_BYTE_BINARY(name) \ 113 printk("Validating %s ... ", #name); \ 114 VAL_START_BINARY(u8, u8, 0xFF, 0xFF, 1, 1) \ 115 VAL_TEST_BINARY(name) \ 116 VAL_FAIL_BYTE_BYTE_BINARY(name) \ 119 #define VAL_WORD_WORD_BINARY(name) \ 120 printk("Validating %s ... ", #name); \ 121 VAL_START_BINARY(u16, u16, 0xFF00, 0xFF00, 0x100, 0x100) \ 122 VAL_TEST_BINARY(name) \ 123 VAL_FAIL_WORD_WORD_BINARY(name) \ 126 #define VAL_LONG_LONG_BINARY(name) \ 127 printk("Validating %s ... ", #name); \ 128 VAL_START_BINARY(u32, u32, 0xFF000000, 0xFF000000, 0x1000000, 0x1000000) \ 129 VAL_TEST_BINARY(name) \ 130 VAL_FAIL_LONG_LONG_BINARY(name) \ 133 #define VAL_VOID_BYTE_BINARY(name) \ 134 printk("Validating %s ... ", #name); \ 135 VAL_START_BINARY(u8, u8, 0xFF, 0xFF, 1, 1) \ 136 VAL_TEST_BINARY_VOID(name) \ 137 VAL_FAIL_BYTE_BYTE_BINARY(name) \ 140 #define VAL_VOID_WORD_BINARY(name) \ 141 printk("Validating %s ... ", #name); \ 142 VAL_START_BINARY(u16, u16, 0xFF00, 0xFF00, 0x100, 0x100) \ 143 VAL_TEST_BINARY_VOID(name) \ 144 VAL_FAIL_WORD_WORD_BINARY(name) \ 147 #define VAL_VOID_LONG_BINARY(name) \ 148 printk("Validating %s ... ", #name); \ 149 VAL_START_BINARY(u32, u32, 0xFF000000, 0xFF000000, 0x1000000, 0x1000000) \ 150 VAL_TEST_BINARY_VOID(name) \ 151 VAL_FAIL_LONG_LONG_BINARY(name) \ 154 #define VAL_BYTE_ROTATE(name) \ 155 printk("Validating %s ... ", #name); \ 156 VAL_START_BINARY(u8, u8, 0xFF, 8, 1, 1) \ 157 VAL_TEST_BINARY(name) \ 158 VAL_FAIL_BYTE_BYTE_BINARY(name) \ 161 #define VAL_WORD_ROTATE(name) \ 162 printk("Validating %s ... ", #name); \ 163 VAL_START_BINARY(u16, u16, 0xFF00, 16, 0x100, 1) \ 164 VAL_TEST_BINARY(name) \ 165 VAL_FAIL_WORD_WORD_BINARY(name) \ 168 #define VAL_LONG_ROTATE(name) \ 169 printk("Validating %s ... ", #name); \ 170 VAL_START_BINARY(u32, u32, 0xFF000000, 32, 0x1000000, 1) \ 171 VAL_TEST_BINARY(name) \ 172 VAL_FAIL_LONG_LONG_BINARY(name) \ 175 #define VAL_START_TERNARY( \ 176 parm_type, res_type, dmax, smax, dincr, sincr, maxshift) \ 181 u32 flags, inflags; \ 182 int f, failed = false; \ 183 char buf1[80], buf2[80]; \ 184 for (d = 0; d < dmax; d += dincr) \ 186 for (s = 0; s < smax; s += sincr) \ 188 for (shift = 0; shift < maxshift; shift += 1) \ 190 M.x86.R_EFLG = inflags = flags = def_flags; \ 191 for (f = 0; f < 2; f++) \ 193 #define VAL_TEST_TERNARY(name) \ 194 r_asm = name##_asm(&flags, d, s, shift); \ 195 r = name(d, s, shift); \ 196 if (r != r_asm || M.x86.R_EFLG != flags) \ 198 if (failed || trace) \ 200 #define VAL_FAIL_WORD_WORD_TERNARY(name) \ 204 "0x%04X = %-15s(0x%04X,0x%04X,%d), flags = %s -> %s\n", r, #name, d, \ 205 s, shift, print_flags(buf1, inflags), \ 206 print_flags(buf2, M.x86.R_EFLG)); \ 208 "0x%04X = %-15s(0x%04X,0x%04X,%d), flags = %s -> %s\n", r_asm, \ 209 #name "_asm", d, s, shift, print_flags(buf1, inflags), \ 210 print_flags(buf2, flags)); 212 #define VAL_FAIL_LONG_LONG_TERNARY(name) \ 216 "0x%08X = %-15s(0x%08X,0x%08X,%d), flags = %s -> %s\n", r, #name, d, \ 217 s, shift, print_flags(buf1, inflags), \ 218 print_flags(buf2, M.x86.R_EFLG)); \ 220 "0x%08X = %-15s(0x%08X,0x%08X,%d), flags = %s -> %s\n", r_asm, \ 221 #name "_asm", d, s, shift, print_flags(buf1, inflags), \ 222 print_flags(buf2, flags)); 224 #define VAL_END_TERNARY() \ 226 M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ 240 printk("passed\n"); \ 243 #define VAL_WORD_ROTATE_DBL(name) \ 244 printk("Validating %s ... ", #name); \ 245 VAL_START_TERNARY(u16, u16, 0xFF00, 0xFF00, 0x100, 0x100, 16) \ 246 VAL_TEST_TERNARY(name) \ 247 VAL_FAIL_WORD_WORD_TERNARY(name) \ 250 #define VAL_LONG_ROTATE_DBL(name) \ 251 printk("Validating %s ... ", #name); \ 253 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; \ 261 u32 flags, inflags; \ 262 int f, failed = false; \ 263 char buf1[80], buf2[80]; \ 264 for (d = 0; d < max; d += incr) \ 266 M.x86.R_EFLG = inflags = flags = def_flags; \ 267 for (f = 0; f < 2; f++) \ 269 #define VAL_TEST_UNARY(name) \ 270 r_asm = name##_asm(&flags, d); \ 272 if (r != r_asm || M.x86.R_EFLG != flags) \ 276 #define VAL_FAIL_BYTE_UNARY(name) \ 279 "0x%02X = %-15s(0x%02X), flags = %s -> %s\n", r, #name, d, \ 280 print_flags(buf1, inflags), print_flags(buf2, M.x86.R_EFLG)); \ 282 "0x%02X = %-15s(0x%02X), flags = %s -> %s\n", r_asm, #name "_asm", d, \ 283 print_flags(buf1, inflags), print_flags(buf2, flags)); 285 #define VAL_FAIL_WORD_UNARY(name) \ 288 "0x%04X = %-15s(0x%04X), flags = %s -> %s\n", r, #name, d, \ 289 print_flags(buf1, inflags), print_flags(buf2, M.x86.R_EFLG)); \ 291 "0x%04X = %-15s(0x%04X), flags = %s -> %s\n", r_asm, #name "_asm", d, \ 292 print_flags(buf1, inflags), print_flags(buf2, flags)); 294 #define VAL_FAIL_LONG_UNARY(name) \ 297 "0x%08X = %-15s(0x%08X), flags = %s -> %s\n", r, #name, d, \ 298 print_flags(buf1, inflags), print_flags(buf2, M.x86.R_EFLG)); \ 300 "0x%08X = %-15s(0x%08X), flags = %s -> %s\n", r_asm, #name "_asm", d, \ 301 print_flags(buf1, inflags), print_flags(buf2, flags)); 303 #define VAL_END_UNARY() \ 305 M.x86.R_EFLG = inflags = flags = def_flags | ALL_FLAGS; \ 313 printk("passed\n"); \ 316 #define VAL_BYTE_UNARY(name) \ 317 printk("Validating %s ... ", #name); \ 318 VAL_START_UNARY(u8, 0xFF, 0x1) \ 319 VAL_TEST_UNARY(name) \ 320 VAL_FAIL_BYTE_UNARY(name) \ 323 #define VAL_WORD_UNARY(name) \ 324 printk("Validating %s ... ", #name); \ 325 VAL_START_UNARY(u16, 0xFF00, 0x100) \ 326 VAL_TEST_UNARY(name) \ 327 VAL_FAIL_WORD_UNARY(name) \ 330 #define VAL_WORD_BYTE_UNARY(name) \ 331 printk("Validating %s ... ", #name); \ 332 VAL_START_UNARY(u16, 0xFF, 0x1) \ 333 VAL_TEST_UNARY(name) \ 334 VAL_FAIL_WORD_UNARY(name) \ 337 #define VAL_LONG_UNARY(name) \ 338 printk("Validating %s ... ", #name); \ 339 VAL_START_UNARY(u32, 0xFF000000, 0x1000000) \ 340 VAL_TEST_UNARY(name) \ 341 VAL_FAIL_LONG_UNARY(name) \ 344 #define VAL_BYTE_MUL(name) \ 345 printk("Validating %s ... ", #name); \ 349 u32 flags, inflags; \ 350 int f, failed = false; \ 351 char buf1[80], buf2[80]; \ 352 for (d = 0; d < 0xFF; d += 1) \ 354 for (s = 0; s < 0xFF; s += 1) \ 356 M.x86.R_EFLG = inflags = flags = def_flags; \ 357 for (f = 0; f < 2; f++) \ 359 name##_asm(&flags, &r_asm, d, s); \ 363 if (r != r_asm || M.x86.R_EFLG != flags) \ 365 if (failed || trace) \ 370 "0x%04X = %-15s(0x%02X,0x%02X), flags = %s -> " \ 372 r, #name, d, s, print_flags(buf1, inflags), \ 373 print_flags(buf2, M.x86.R_EFLG)); \ 375 "0x%04X = %-15s(0x%02X,0x%02X), flags = %s -> " \ 377 r_asm, #name "_asm", d, s, \ 378 print_flags(buf1, inflags), \ 379 print_flags(buf2, flags)); \ 381 M.x86.R_EFLG = inflags = flags = \ 382 def_flags | (ALL_FLAGS & ~F_OF); \ 393 printk("passed\n"); \ 396 #define VAL_WORD_MUL(name) \ 397 printk("Validating %s ... ", #name); \ 400 u16 r_lo, r_asm_lo; \ 401 u16 r_hi, r_asm_hi; \ 402 u32 flags, inflags; \ 403 int f, failed = false; \ 404 char buf1[80], buf2[80]; \ 405 for (d = 0; d < 0xFF00; d += 0x100) \ 407 for (s = 0; s < 0xFF00; s += 0x100) \ 409 M.x86.R_EFLG = inflags = flags = def_flags; \ 410 for (f = 0; f < 2; f++) \ 412 name##_asm(&flags, &r_asm_lo, &r_asm_hi, d, s); \ 417 if (r_lo != r_asm_lo || r_hi != r_asm_hi || \ 418 M.x86.R_EFLG != flags) \ 420 if (failed || trace) \ 425 "0x%04X:0x%04X = %-15s(0x%04X,0x%04X), flags = " \ 427 r_hi, r_lo, #name, d, s, \ 428 print_flags(buf1, inflags), \ 429 print_flags(buf2, M.x86.R_EFLG)); \ 431 "0x%04X:0x%04X = %-15s(0x%04X,0x%04X), flags = " \ 433 r_asm_hi, r_asm_lo, #name "_asm", d, s, \ 434 print_flags(buf1, inflags), \ 435 print_flags(buf2, flags)); \ 437 M.x86.R_EFLG = inflags = flags = \ 438 def_flags | (ALL_FLAGS & ~F_OF); \ 449 printk("passed\n"); \ 452 #define VAL_LONG_MUL(name) \ 453 printk("Validating %s ... ", #name); \ 456 u32 r_lo, r_asm_lo; \ 457 u32 r_hi, r_asm_hi; \ 458 u32 flags, inflags; \ 459 int f, failed = false; \ 460 char buf1[80], buf2[80]; \ 461 for (d = 0; d < 0xFF000000; d += 0x1000000) \ 463 for (s = 0; s < 0xFF000000; s += 0x1000000) \ 465 M.x86.R_EFLG = inflags = flags = def_flags; \ 466 for (f = 0; f < 2; f++) \ 468 name##_asm(&flags, &r_asm_lo, &r_asm_hi, d, s); \ 471 r_lo = M.x86.R_EAX; \ 472 r_hi = M.x86.R_EDX; \ 473 if (r_lo != r_asm_lo || r_hi != r_asm_hi || \ 474 M.x86.R_EFLG != flags) \ 476 if (failed || trace) \ 481 "0x%08X:0x%08X = %-15s(0x%08X,0x%08X), flags = " \ 483 r_hi, r_lo, #name, d, s, \ 484 print_flags(buf1, inflags), \ 485 print_flags(buf2, M.x86.R_EFLG)); \ 487 "0x%08X:0x%08X = %-15s(0x%08X,0x%08X), flags = " \ 489 r_asm_hi, r_asm_lo, #name "_asm", d, s, \ 490 print_flags(buf1, inflags), \ 491 print_flags(buf2, flags)); \ 493 M.x86.R_EFLG = inflags = flags = \ 494 def_flags | (ALL_FLAGS & ~F_OF); \ 505 printk("passed\n"); \ 508 #define VAL_BYTE_DIV(name) \ 509 printk("Validating %s ... ", #name); \ 512 u8 r_quot, r_rem, r_asm_quot, r_asm_rem; \ 513 u32 flags, inflags; \ 514 int f, failed = false; \ 515 char buf1[80], buf2[80]; \ 516 for (d = 0; d < 0xFF00; d += 0x100) \ 518 for (s = 1; s < 0xFF; s += 1) \ 520 M.x86.R_EFLG = inflags = flags = def_flags; \ 521 for (f = 0; f < 2; f++) \ 526 r_quot = M.x86.R_AL; \ 527 r_rem = M.x86.R_AH; \ 528 if (M.x86.intr & INTR_SYNCH) \ 530 name##_asm(&flags, &r_asm_quot, &r_asm_rem, d, s); \ 531 if (r_quot != r_asm_quot || r_rem != r_asm_rem || \ 532 M.x86.R_EFLG != flags) \ 534 if (failed || trace) \ 539 "0x%02X:0x%02X = %-15s(0x%04X,0x%02X), flags = " \ 541 r_quot, r_rem, #name, d, s, \ 542 print_flags(buf1, inflags), \ 543 print_flags(buf2, M.x86.R_EFLG)); \ 545 "0x%02X:0x%02X = %-15s(0x%04X,0x%02X), flags = " \ 547 r_asm_quot, r_asm_rem, #name "_asm", d, s, \ 548 print_flags(buf1, inflags), \ 549 print_flags(buf2, flags)); \ 551 M.x86.R_EFLG = inflags = flags = \ 552 def_flags | (ALL_FLAGS & ~F_OF); \ 563 printk("passed\n"); \ 566 #define VAL_WORD_DIV(name) \ 567 printk("Validating %s ... ", #name); \ 570 u16 r_quot, r_rem, r_asm_quot, r_asm_rem; \ 571 u32 flags, inflags; \ 572 int f, failed = false; \ 573 char buf1[80], buf2[80]; \ 574 for (d = 0; d < 0xFF000000; d += 0x1000000) \ 576 for (s = 0x100; s < 0xFF00; s += 0x100) \ 578 M.x86.R_EFLG = inflags = flags = def_flags; \ 579 for (f = 0; f < 2; f++) \ 582 M.x86.R_AX = d & 0xFFFF; \ 583 M.x86.R_DX = d >> 16; \ 585 r_quot = M.x86.R_AX; \ 586 r_rem = M.x86.R_DX; \ 587 if (M.x86.intr & INTR_SYNCH) \ 590 &flags, &r_asm_quot, &r_asm_rem, d & 0xFFFF, d >> 16, \ 592 if (r_quot != r_asm_quot || r_rem != r_asm_rem || \ 593 M.x86.R_EFLG != flags) \ 595 if (failed || trace) \ 600 "0x%04X:0x%04X = %-15s(0x%08X,0x%04X), flags = " \ 602 r_quot, r_rem, #name, d, s, \ 603 print_flags(buf1, inflags), \ 604 print_flags(buf2, M.x86.R_EFLG)); \ 606 "0x%04X:0x%04X = %-15s(0x%08X,0x%04X), flags = " \ 608 r_asm_quot, r_asm_rem, #name "_asm", d, s, \ 609 print_flags(buf1, inflags), \ 610 print_flags(buf2, flags)); \ 612 M.x86.R_EFLG = inflags = flags = \ 613 def_flags | (ALL_FLAGS & ~F_OF); \ 624 printk("passed\n"); \ 627 #define VAL_LONG_DIV(name) \ 628 printk("Validating %s ... ", #name); \ 631 u32 r_quot, r_rem, r_asm_quot, r_asm_rem; \ 632 u32 flags, inflags; \ 633 int f, failed = false; \ 634 char buf1[80], buf2[80]; \ 635 for (d = 0; d < 0xFF000000; d += 0x1000000) \ 637 for (s = 0x100; s < 0xFF00; s += 0x100) \ 639 M.x86.R_EFLG = inflags = flags = def_flags; \ 640 for (f = 0; f < 2; f++) \ 646 r_quot = M.x86.R_EAX; \ 647 r_rem = M.x86.R_EDX; \ 648 if (M.x86.intr & INTR_SYNCH) \ 650 name##_asm(&flags, &r_asm_quot, &r_asm_rem, d, 0, s); \ 651 if (r_quot != r_asm_quot || r_rem != r_asm_rem || \ 652 M.x86.R_EFLG != flags) \ 654 if (failed || trace) \ 659 "0x%08X:0x%08X = %-15s(0x%08X:0x%08X,0x%08X), " \ 660 "flags = %s -> %s\n", \ 661 r_quot, r_rem, #name, 0, d, s, \ 662 print_flags(buf1, inflags), \ 663 print_flags(buf2, M.x86.R_EFLG)); \ 665 "0x%08X:0x%08X = %-15s(0x%08X:0x%08X,0x%08X), " \ 666 "flags = %s -> %s\n", \ 667 r_asm_quot, r_asm_rem, #name "_asm", 0, d, s, \ 668 print_flags(buf1, inflags), \ 669 print_flags(buf2, flags)); \ 671 M.x86.R_EFLG = inflags = flags = \ 672 def_flags | (ALL_FLAGS & ~F_OF); \ 683 printk("passed\n"); \ 686 void printk(
const char *fmt, ...)
689 va_start(argptr, fmt);
690 vfprintf(stdout, fmt, argptr);
695 char *print_flags(
char *buf, ulong flags)
697 char *separator =
"";
702 StringConcat(buf, separator);
703 StringConcat(buf,
"CF");
708 StringConcat(buf, separator);
709 StringConcat(buf,
"PF");
714 StringConcat(buf, separator);
715 StringConcat(buf,
"AF");
720 StringConcat(buf, separator);
721 StringConcat(buf,
"ZF");
726 StringConcat(buf, separator);
727 StringConcat(buf,
"SF");
732 StringConcat(buf, separator);
733 StringConcat(buf,
"OF");
736 if (separator[0] == 0)
737 StringCopy(buf,
"None");
748 ByteSet(&M, 0,
sizeof(M));
749 def_flags = get_flags_asm() & ~ALL_FLAGS;
751 VAL_WORD_UNARY(aaa_word);
752 VAL_WORD_UNARY(aas_word);
754 VAL_WORD_UNARY(aad_word);
755 VAL_WORD_UNARY(aam_word);
757 VAL_BYTE_BYTE_BINARY(adc_byte);
758 VAL_WORD_WORD_BINARY(adc_word);
759 VAL_LONG_LONG_BINARY(adc_long);
761 VAL_BYTE_BYTE_BINARY(add_byte);
762 VAL_WORD_WORD_BINARY(add_word);
763 VAL_LONG_LONG_BINARY(add_long);
765 VAL_BYTE_BYTE_BINARY(and_byte);
766 VAL_WORD_WORD_BINARY(and_word);
767 VAL_LONG_LONG_BINARY(and_long);
769 VAL_BYTE_BYTE_BINARY(cmp_byte);
770 VAL_WORD_WORD_BINARY(cmp_word);
771 VAL_LONG_LONG_BINARY(cmp_long);
773 VAL_BYTE_UNARY(daa_byte);
774 VAL_BYTE_UNARY(das_byte);
776 VAL_BYTE_UNARY(dec_byte);
777 VAL_WORD_UNARY(dec_word);
778 VAL_LONG_UNARY(dec_long);
780 VAL_BYTE_UNARY(inc_byte);
781 VAL_WORD_UNARY(inc_word);
782 VAL_LONG_UNARY(inc_long);
784 VAL_BYTE_BYTE_BINARY(or_byte);
785 VAL_WORD_WORD_BINARY(or_word);
786 VAL_LONG_LONG_BINARY(or_long);
788 VAL_BYTE_UNARY(neg_byte);
789 VAL_WORD_UNARY(neg_word);
790 VAL_LONG_UNARY(neg_long);
792 VAL_BYTE_UNARY(not_byte);
793 VAL_WORD_UNARY(not_word);
794 VAL_LONG_UNARY(not_long);
796 VAL_BYTE_ROTATE(rcl_byte);
797 VAL_WORD_ROTATE(rcl_word);
798 VAL_LONG_ROTATE(rcl_long);
800 VAL_BYTE_ROTATE(rcr_byte);
801 VAL_WORD_ROTATE(rcr_word);
802 VAL_LONG_ROTATE(rcr_long);
804 VAL_BYTE_ROTATE(rol_byte);
805 VAL_WORD_ROTATE(rol_word);
806 VAL_LONG_ROTATE(rol_long);
808 VAL_BYTE_ROTATE(ror_byte);
809 VAL_WORD_ROTATE(ror_word);
810 VAL_LONG_ROTATE(ror_long);
812 VAL_BYTE_ROTATE(shl_byte);
813 VAL_WORD_ROTATE(shl_word);
814 VAL_LONG_ROTATE(shl_long);
816 VAL_BYTE_ROTATE(shr_byte);
817 VAL_WORD_ROTATE(shr_word);
818 VAL_LONG_ROTATE(shr_long);
820 VAL_BYTE_ROTATE(sar_byte);
821 VAL_WORD_ROTATE(sar_word);
822 VAL_LONG_ROTATE(sar_long);
824 VAL_WORD_ROTATE_DBL(shld_word);
825 VAL_LONG_ROTATE_DBL(shld_long);
827 VAL_WORD_ROTATE_DBL(shrd_word);
828 VAL_LONG_ROTATE_DBL(shrd_long);
830 VAL_BYTE_BYTE_BINARY(sbb_byte);
831 VAL_WORD_WORD_BINARY(sbb_word);
832 VAL_LONG_LONG_BINARY(sbb_long);
834 VAL_BYTE_BYTE_BINARY(sub_byte);
835 VAL_WORD_WORD_BINARY(sub_word);
836 VAL_LONG_LONG_BINARY(sub_long);
838 VAL_BYTE_BYTE_BINARY(xor_byte);
839 VAL_WORD_WORD_BINARY(xor_word);
840 VAL_LONG_LONG_BINARY(xor_long);
842 VAL_VOID_BYTE_BINARY(test_byte);
843 VAL_VOID_WORD_BINARY(test_word);
844 VAL_VOID_LONG_BINARY(test_long);
846 VAL_BYTE_MUL(imul_byte);
847 VAL_WORD_MUL(imul_word);
848 VAL_LONG_MUL(imul_long);
850 VAL_BYTE_MUL(mul_byte);
851 VAL_WORD_MUL(mul_word);
852 VAL_LONG_MUL(mul_long);
854 VAL_BYTE_DIV(idiv_byte);
855 VAL_WORD_DIV(idiv_word);
856 VAL_LONG_DIV(idiv_long);
858 VAL_BYTE_DIV(div_byte);
859 VAL_WORD_DIV(div_word);
860 VAL_LONG_DIV(div_long);