summaryrefslogtreecommitdiff
path: root/src/vm/i386/cgencpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/i386/cgencpu.h')
-rw-r--r--src/vm/i386/cgencpu.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/vm/i386/cgencpu.h b/src/vm/i386/cgencpu.h
index 99f4eb498f..2e47a6af90 100644
--- a/src/vm/i386/cgencpu.h
+++ b/src/vm/i386/cgencpu.h
@@ -86,6 +86,10 @@ BOOL Runtime_Test_For_SSE2();
#define JUMP_ALLOCATE_SIZE 8 // # bytes to allocate for a jump instruction
#define BACK_TO_BACK_JUMP_ALLOCATE_SIZE 8 // # bytes to allocate for a back to back jump instruction
+#ifdef WIN64EXCEPTIONS
+#define USE_INDIRECT_CODEHEADER
+#endif // WIN64EXCEPTIONS
+
#define HAS_COMPACT_ENTRYPOINTS 1
// Needed for PInvoke inlining in ngened images
@@ -150,12 +154,22 @@ typedef INT32 StackElemType;
// This represents some of the FramedMethodFrame fields that are
// stored at negative offsets.
//--------------------------------------------------------------------
+#define ENUM_ARGUMENT_AND_SCRATCH_REGISTERS() \
+ ARGUMENT_AND_SCRATCH_REGISTER(Eax) \
+ ARGUMENT_AND_SCRATCH_REGISTER(Ecx) \
+ ARGUMENT_AND_SCRATCH_REGISTER(Edx)
+
+#define ENUM_CALLEE_SAVED_REGISTERS() \
+ CALLEE_SAVED_REGISTER(Edi) \
+ CALLEE_SAVED_REGISTER(Esi) \
+ CALLEE_SAVED_REGISTER(Ebx) \
+ CALLEE_SAVED_REGISTER(Ebp)
+
typedef DPTR(struct CalleeSavedRegisters) PTR_CalleeSavedRegisters;
struct CalleeSavedRegisters {
- INT32 edi;
- INT32 esi;
- INT32 ebx;
- INT32 ebp;
+#define CALLEE_SAVED_REGISTER(regname) INT32 regname;
+ ENUM_CALLEE_SAVED_REGISTERS();
+#undef CALLEE_SAVED_REGISTER
};
//--------------------------------------------------------------------
@@ -194,6 +208,7 @@ struct ArgumentRegisters {
struct REGDISPLAY;
typedef REGDISPLAY *PREGDISPLAY;
+#ifndef WIN64EXCEPTIONS
// Sufficient context for Try/Catch restoration.
struct EHContext {
INT32 Eax;
@@ -242,6 +257,7 @@ struct EHContext {
Eip = 0;
}
};
+#endif // !WIN64EXCEPTIONS
#define ARGUMENTREGISTERS_SIZE sizeof(ArgumentRegisters)