Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. bytefns.c
  5. Abstract:
  6. Instuctions which operate on BYTES
  7. Author:
  8. 29-Jun-1995 BarryBo
  9. Revision History:
  10. --*/
  11. #include <nt.h>
  12. #include <ntrtl.h>
  13. #include <nturtl.h>
  14. #include <windows.h>
  15. #include <stdio.h>
  16. #include "cpuassrt.h"
  17. #include "threadst.h"
  18. #include "instr.h"
  19. #include "decoderp.h"
  20. #include "bytefns.h"
  21. ASSERTNAME;
  22. // set up to include common functions
  23. #define MSB 0x80
  24. #define MANGLENAME(x) x ## 8
  25. #define MOD_RM mod_rm_reg8
  26. #define UTYPE unsigned char
  27. #define STYPE signed char
  28. #define GET_VAL GET_BYTE
  29. #define PUT_VAL PUT_BYTE
  30. #define OPNAME(x) OP_ ## x ## 8
  31. #define LOCKOPNAME(x) OP_SynchLock ## x ## 8
  32. #define DISPATCHCOMMON(fn) DISPATCH(fn ## 8)
  33. #define CALLFRAGCOMMON0(fn) CALLFRAG0( fn ## 8 )
  34. #define CALLFRAGCOMMON1(fn, pop1) CALLFRAG1( fn ## 8 , pop1)
  35. #define CALLFRAGCOMMON2(fn, pop1, op2) CALLFRAG2( fn ## 8 , pop1, op2)
  36. #define AREG GP_AL
  37. #define BREG GP_BL
  38. #define CREG GP_CL
  39. #define DREG GP_DL
  40. #define DEREF(Op) DEREF8(Op)
  41. // include the common functions
  42. #include "common.c"
  43. // create the mod_rm_reg8() decoder function
  44. #define MOD11_RM000 GP_AL
  45. #define MOD11_RM001 GP_CL
  46. #define MOD11_RM010 GP_DL
  47. #define MOD11_RM011 GP_BL
  48. #define MOD11_RM100 GP_AH
  49. #define MOD11_RM101 GP_CH
  50. #define MOD11_RM110 GP_DH
  51. #define MOD11_RM111 GP_BH
  52. #define REG000 GP_AL
  53. #define REG001 GP_CL
  54. #define REG010 GP_DL
  55. #define REG011 GP_BL
  56. #define REG100 GP_AH
  57. #define REG101 GP_CH
  58. #define REG110 GP_DH
  59. #define REG111 GP_BH
  60. #define MOD_RM_DECODER mod_rm_reg8
  61. #include "modrm.c"