Bug 803084 - Port bug 789753 to mingw-w64 builds r=m_kato DONTBUILD
authorJacek Caban <jacek@codeweavers.com>
Fri, 19 Oct 2012 13:17:05 +0200
changeset 110896 57431b8b1ae93bd42fcac9ea1bc3317c1bedd87b
parent 110895 907385f76803514ac59444775177f9d059d9d77a
child 110897 2030c47a8e69afb3f88c55d19bbf0dee7734c8c1
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersm_kato
bugs803084, 789753
milestone19.0a1
Bug 803084 - Port bug 789753 to mingw-w64 builds r=m_kato DONTBUILD
js/src/methodjit/TrampolineMingwX64.s
--- a/js/src/methodjit/TrampolineMingwX64.s
+++ b/js/src/methodjit/TrampolineMingwX64.s
@@ -33,16 +33,42 @@ JaegerTrampoline:
     push    r15
     # .PUSHREG r15
     push    rdi
     # .PUSHREG rdi
     push    rsi
     # .PUSHREG rsi
     push    rbx
     # .PUSHREG rbx
+    sub     rsp, 16*10+8
+    # .ALLOCSTACK 168
+    # .SAVEXMM128 only supports 16 byte alignment offset
+    movdqa  xmmword ptr [rsp], xmm6
+    # .SAVEXMM128 xmm6, 0
+    movdqa  xmmword ptr [rsp+16], xmm7
+    # .SAVEXMM128 xmm7, 16
+    movdqa  xmmword ptr [rsp+16*2], xmm8
+    # .SAVEXMM128 xmm8, 32
+    movdqa  xmmword ptr [rsp+16*3], xmm9
+    # .SAVEXMM128 xmm9, 48
+    movdqa  xmmword ptr [rsp+16*4], xmm10
+    # .SAVEXMM128 xmm10, 64
+    movdqa  xmmword ptr [rsp+16*5], xmm11
+    # .SAVEXMM128 xmm11, 80
+    movdqa  xmmword ptr [rsp+16*6], xmm12
+    # .SAVEXMM128 xmm12, 96
+    movdqa  xmmword ptr [rsp+16*7], xmm13
+    # .SAVEXMM128 xmm13, 112
+    movdqa  xmmword ptr [rsp+16*8], xmm14
+    # .SAVEXMM128 xmm14, 128
+    movdqa  xmmword ptr [rsp+16*9], xmm15
+    # .SAVEXMM128 xmm15, 144
+    # stack aligment  for Win64 ABI
+    sub     rsp, 8
+    # .ALLOCSTACK 8
     # .ENDPROLOG
 
     # Load mask registers
     mov     r13, 0xffff800000000000
     mov     r14, 0x7fffffffffff
 
     # Build the JIT frame.
     # rcx = cx
@@ -83,17 +109,27 @@ JaegerTrampoline:
 JaegerTrampolineReturn:
     # .ENDPROLOG
     or      rsi, rdi
     mov     qword ptr [rbx + 0x30], rsi
     sub     rsp, 0x20
     lea     rcx, [rsp+0x20]
     call    PopActiveVMFrame
 
-    add     rsp, 0x68+0x20
+    add     rsp, 0x68+0x20+8+16*10+8
+    movdqa  xmm6, xmmword ptr [rsp-16*10-8]
+    movdqa  xmm7, xmmword ptr [rsp-16*9-8]
+    movdqa  xmm8, xmmword ptr [rsp-16*8-8]
+    movdqa  xmm9, xmmword ptr [rsp-16*7-8]
+    movdqa  xmm10, xmmword ptr [rsp-16*6-8]
+    movdqa  xmm11, xmmword ptr [rsp-16*5-8]
+    movdqa  xmm12, xmmword ptr [rsp-16*4-8]
+    movdqa  xmm13, xmmword ptr [rsp-16*3-8]
+    movdqa  xmm14, xmmword ptr [rsp-16*2-8]
+    movdqa  xmm15, xmmword ptr [rsp-16*1-8]
     pop     rbx
     pop     rsi
     pop     rdi
     pop     r15
     pop     r14
     pop     r13
     pop     r12
     pop     rbp
@@ -116,17 +152,27 @@ JaegerThrowpoline:
     test    rax, rax
     je      throwpoline_exit
     add     rsp, 0x20
     jmp     rax
 
 throwpoline_exit:
     lea     rcx, [rsp+0x20]
     call    PopActiveVMFrame
-    add     rsp, 0x68+0x20
+    add     rsp, 0x68+0x20+8+16*10+8
+    movdqa  xmm6, xmmword ptr [rsp-16*10-8]
+    movdqa  xmm7, xmmword ptr [rsp-16*9-8]
+    movdqa  xmm8, xmmword ptr [rsp-16*8-8]
+    movdqa  xmm9, xmmword ptr [rsp-16*7-8]
+    movdqa  xmm10, xmmword ptr [rsp-16*6-8]
+    movdqa  xmm11, xmmword ptr [rsp-16*5-8]
+    movdqa  xmm12, xmmword ptr [rsp-16*4-8]
+    movdqa  xmm13, xmmword ptr [rsp-16*3-8]
+    movdqa  xmm14, xmmword ptr [rsp-16*2-8]
+    movdqa  xmm15, xmmword ptr [rsp-16*1-8]
     pop     rbx
     pop     rsi
     pop     rdi
     pop     r15
     pop     r14
     pop     r13
     pop     r12
     pop     rbp
@@ -155,17 +201,27 @@ JaegerInterpoline:
     test    rax, rax
     je      interpoline_exit
     add     rsp, 0x20
     jmp     rax
 
 interpoline_exit:
     lea     rcx, [rsp+0x20]
     call    PopActiveVMFrame
-    add     rsp, 0x68+0x20
+    add     rsp, 0x68+0x20+8+16*10+8
+    movdqa  xmm6, xmmword ptr [rsp-16*10-8]
+    movdqa  xmm7, xmmword ptr [rsp-16*9-8]
+    movdqa  xmm8, xmmword ptr [rsp-16*8-8]
+    movdqa  xmm9, xmmword ptr [rsp-16*7-8]
+    movdqa  xmm10, xmmword ptr [rsp-16*6-8]
+    movdqa  xmm11, xmmword ptr [rsp-16*5-8]
+    movdqa  xmm12, xmmword ptr [rsp-16*4-8]
+    movdqa  xmm13, xmmword ptr [rsp-16*3-8]
+    movdqa  xmm14, xmmword ptr [rsp-16*2-8]
+    movdqa  xmm15, xmmword ptr [rsp-16*1-8]
     pop     rbx
     pop     rsi
     pop     rdi
     pop     r15
     pop     r14
     pop     r13
     pop     r12
     pop     rbp