summaryrefslogtreecommitdiff
path: root/src/jit/gentree.h
diff options
context:
space:
mode:
authorSaeHie Park <saehie.park@samsung.com>2017-01-09 10:39:54 +0900
committerSaeHie Park <saehie.park@samsung.com>2017-02-07 09:02:00 +0900
commit5df45286968775ffccaf01669eba7c8baa9923e1 (patch)
tree139d7e41e020159d1fac2ed72943312a9cd08a5a /src/jit/gentree.h
parent65b9cb35226c5395be531554e207bb4e2096092f (diff)
downloadcoreclr-5df45286968775ffccaf01669eba7c8baa9923e1.tar.gz
coreclr-5df45286968775ffccaf01669eba7c8baa9923e1.tar.bz2
coreclr-5df45286968775ffccaf01669eba7c8baa9923e1.zip
[x86/Linux] Stack align 16 bytes for JIT code
Change JIT code to align stack in 16 byte used in modern compiler
Diffstat (limited to 'src/jit/gentree.h')
-rw-r--r--src/jit/gentree.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/jit/gentree.h b/src/jit/gentree.h
index 10ba4b09a5..da61debf27 100644
--- a/src/jit/gentree.h
+++ b/src/jit/gentree.h
@@ -4546,6 +4546,9 @@ struct GenTreePhiArg : public GenTreeLclVarCommon
struct GenTreePutArgStk : public GenTreeUnOp
{
unsigned gtSlotNum; // Slot number of the argument to be passed on stack
+#if defined(UNIX_X86_ABI)
+ unsigned gtPadAlign; // Number of padding slots for stack alignment
+#endif
#if FEATURE_FASTTAILCALL
bool putInIncomingArgArea; // Whether this arg needs to be placed in incoming arg area.
@@ -4561,6 +4564,9 @@ struct GenTreePutArgStk : public GenTreeUnOp
DEBUGARG(bool largeNode = false))
: GenTreeUnOp(oper, type DEBUGARG(largeNode))
, gtSlotNum(slotNum)
+#if defined(UNIX_X86_ABI)
+ , gtPadAlign(0)
+#endif
, putInIncomingArgArea(_putInIncomingArgArea)
#ifdef FEATURE_PUT_STRUCT_ARG_STK
, gtPutArgStkKind(Kind::Invalid)
@@ -4582,6 +4588,9 @@ struct GenTreePutArgStk : public GenTreeUnOp
DEBUGARG(bool largeNode = false))
: GenTreeUnOp(oper, type, op1 DEBUGARG(largeNode))
, gtSlotNum(slotNum)
+#if defined(UNIX_X86_ABI)
+ , gtPadAlign(0)
+#endif
, putInIncomingArgArea(_putInIncomingArgArea)
#ifdef FEATURE_PUT_STRUCT_ARG_STK
, gtPutArgStkKind(Kind::Invalid)
@@ -4603,6 +4612,9 @@ struct GenTreePutArgStk : public GenTreeUnOp
DEBUGARG(GenTreePtr callNode = NULL) DEBUGARG(bool largeNode = false))
: GenTreeUnOp(oper, type DEBUGARG(largeNode))
, gtSlotNum(slotNum)
+#if defined(UNIX_X86_ABI)
+ , gtPadAlign(0)
+#endif
#ifdef FEATURE_PUT_STRUCT_ARG_STK
, gtPutArgStkKind(Kind::Invalid)
, gtNumSlots(numSlots)
@@ -4622,6 +4634,9 @@ struct GenTreePutArgStk : public GenTreeUnOp
DEBUGARG(GenTreePtr callNode = NULL) DEBUGARG(bool largeNode = false))
: GenTreeUnOp(oper, type, op1 DEBUGARG(largeNode))
, gtSlotNum(slotNum)
+#if defined(UNIX_X86_ABI)
+ , gtPadAlign(0)
+#endif
#ifdef FEATURE_PUT_STRUCT_ARG_STK
, gtPutArgStkKind(Kind::Invalid)
, gtNumSlots(numSlots)
@@ -4640,6 +4655,18 @@ struct GenTreePutArgStk : public GenTreeUnOp
return gtSlotNum * TARGET_POINTER_SIZE;
}
+#if defined(UNIX_X86_ABI)
+ unsigned getArgPadding()
+ {
+ return gtPadAlign;
+ }
+
+ void setArgPadding(unsigned padAlign)
+ {
+ gtPadAlign = padAlign;
+ }
+#endif
+
#ifdef FEATURE_PUT_STRUCT_ARG_STK
unsigned getArgSize()
{