[x86/Linux] 16-byte aligned TheUMEntryPrestub (#10376)
authorJonghyun Park <parjong@gmail.com>
Wed, 22 Mar 2017 22:25:19 +0000 (07:25 +0900)
committerJan Vorlicek <janvorli@microsoft.com>
Wed, 22 Mar 2017 22:25:19 +0000 (23:25 +0100)
src/vm/i386/umthunkstub.S

index 7f0250368b49194812227d2c23bbefa52f13fe34..98f96ef6ec3cee1eb56f52eddfd409fc8c7145f6 100644 (file)
 // eax = UMEntryThunk*
 //
 NESTED_ENTRY TheUMEntryPrestub, _TEXT, UnhandledExceptionHandlerUnix
+#define STK_ALIGN_PADDING 8
+    sub     esp, STK_ALIGN_PADDING
     push    eax  // UMEntryThunk*
+    CHECK_STACK_ALIGNMENT
     call    C_FUNC(TheUMEntryPrestubWorker)
-    add     esp, 4
-    // eax = PCODE
+    add     esp, (4 + STK_ALIGN_PADDING)
 
+    // eax = PCODE
     jmp     eax     // Tail Jmp
+#undef STK_ALIGN_PADDING
 NESTED_END TheUMEntryPrestub, _TEXT
 
 //