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.

85 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. dwordfns.c
  5. Abstract:
  6. Instuctions which operate on 32-bit DWORDS
  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 "dwordfns.h"
  21. ASSERTNAME;
  22. // set up to include common functions
  23. #define GET_REG get_reg32
  24. #define MANGLENAME(x) x ## 32
  25. #define MSB 0x80000000
  26. #define MOD_RM mod_rm_reg32
  27. #define UTYPE unsigned long
  28. #define STYPE signed long
  29. #define GET_VAL GET_LONG
  30. #define PUT_VAL PUT_LONG
  31. #define PUSH_VAL PUSH_LONG
  32. #define POP_VAL POP_LONG
  33. #define OPNAME(x) OP_ ## x ## 32
  34. #define LOCKOPNAME(x) OP_SynchLock ## x ## 32
  35. #define DISPATCHCOMMON(fn) DISPATCH(fn ## 32)
  36. #define CALLFRAGCOMMON0(fn) CALLFRAG0( fn ## 32 )
  37. #define CALLFRAGCOMMON1(fn, pop1) CALLFRAG1( fn ## 32 , pop1)
  38. #define CALLFRAGCOMMON2(fn, pop1, op2) CALLFRAG2( fn ## 32 , pop1, op2)
  39. #define AREG GP_EAX
  40. #define BREG GP_EBX
  41. #define CREG GP_ECX
  42. #define DREG GP_EDX
  43. #define SPREG GP_ESP
  44. #define BPREG GP_EBP
  45. #define SIREG GP_ESI
  46. #define DIREG GP_EDI
  47. #define DEREF(Op) DEREF32(Op)
  48. // include the common functions with 8/16/32 flavors
  49. #include "common.c"
  50. // include the common functions with 16/32 flavors
  51. #include "comm1632.c"
  52. // create the mod_rm_reg32() decoder function
  53. #define MOD11_RM000 GP_EAX
  54. #define MOD11_RM001 GP_ECX
  55. #define MOD11_RM010 GP_EDX
  56. #define MOD11_RM011 GP_EBX
  57. #define MOD11_RM100 GP_ESP
  58. #define MOD11_RM101 GP_EBP
  59. #define MOD11_RM110 GP_ESI
  60. #define MOD11_RM111 GP_EDI
  61. #define REG000 GP_EAX
  62. #define REG001 GP_ECX
  63. #define REG010 GP_EDX
  64. #define REG011 GP_EBX
  65. #define REG100 GP_ESP
  66. #define REG101 GP_EBP
  67. #define REG110 GP_ESI
  68. #define REG111 GP_EDI
  69. #define MOD_RM_DECODER mod_rm_reg32
  70. #include "modrm.c"