Bug 1527471 - part 2 - generate unwind data for xptcall aarch64 windows routines; r=dmajor
authorNathan Froyd <froydnj@mozilla.com>
Thu, 14 Feb 2019 20:34:53 +0000
changeset 459556 cd3c6c72d196abccc70291624de8f19d764e963c
parent 459555 a64ba70e327ad4005b2969b803cebde563b0e9cc
child 459557 dc7e72c71d3a8ec6ec1e6410ad3177f26b1d2ca7
push id35563
push userccoroiu@mozilla.com
push dateSat, 16 Feb 2019 09:36:04 +0000
treeherdermozilla-central@1cfd69d05aa1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1527471
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527471 - part 2 - generate unwind data for xptcall aarch64 windows routines; r=dmajor Differential Revision: https://phabricator.services.mozilla.com/D19820
xpcom/reflect/xptcall/md/win32/xptcinvoke_asm_aarch64.asm
xpcom/reflect/xptcall/md/win32/xptcstubs_asm_aarch64.asm
--- a/xpcom/reflect/xptcall/md/win32/xptcinvoke_asm_aarch64.asm
+++ b/xpcom/reflect/xptcall/md/win32/xptcinvoke_asm_aarch64.asm
@@ -1,25 +1,27 @@
 ; This Source Code Form is subject to the terms of the Mozilla Public
 ; License, v. 2.0. If a copy of the MPL was not distributed with this
 ; file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-	AREA |.text|, CODE, ARM64
+#include "ksarm64.h"
+
 	IMPORT |invoke_copy_to_stack|
-	EXPORT |XPTC__InvokebyIndex|
+	TEXTAREA
 
 ;
 ;XPTC__InvokebyIndex(nsISupports* that, uint32_t methodIndex,
 ;                   uint32_t paramCount, nsXPTCVariant* params)
 ;
-|XPTC__InvokebyIndex| PROC
+
+	NESTED_ENTRY XPTC__InvokebyIndex
+
 	; set up frame
-	stp         x29, x30, [sp,#-32]!
-	mov         x29, sp
-	stp         x19, x20, [sp,#16]
+	PROLOG_SAVE_REG_PAIR fp, lr, #-32!
+	PROLOG_SAVE_REG_PAIR x19, x20, #16
 
 	; save methodIndex across function calls
 	mov         w20, w1
 
 	; end of stack area passed to invoke_copy_to_stack
 	mov         x1, sp
 
 	; assume 8 bytes of stack for each argument with 16-byte alignment
@@ -50,15 +52,15 @@
 	ldp         d0, d1, [sp],#64
 
 	; call the method
 	ldr         x16, [x0]
 	add         x16, x16, w20, uxth #3
 	ldr         x16, [x16]
 	blr         x16
 
-	add         sp, sp, w19, uxth #3
-	ldp         x19, x20, [sp,#16]
-	ldp         x29, x30, [sp],#32
-	ret
+	EPILOG_STACK_RESTORE
+	EPILOG_RESTORE_REG_PAIR x19, x20, #16
+	EPILOG_RESTORE_REG_PAIR x29, x30, #32!
+	EPILOG_RETURN
 
-        ENDP
+	NESTED_END XPTC__InvokebyIndex
 	END
--- a/xpcom/reflect/xptcall/md/win32/xptcstubs_asm_aarch64.asm
+++ b/xpcom/reflect/xptcall/md/win32/xptcstubs_asm_aarch64.asm
@@ -1,21 +1,24 @@
 ; This Source Code Form is subject to the terms of the Mozilla Public
 ; License, v. 2.0. If a copy of the MPL was not distributed with this
 ; file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include "ksarm64.h"
+
 NGPREGS EQU 8
 NFPREGS EQU 8
 
-	AREA |.text|, CODE, ARM64
 	IMPORT |PrepareAndDispatch|
 
-|SharedStub| PROC
-	stp         x29, x30, [sp,#-16]!
-	mov         x29, sp
+	TEXTAREA
+
+	NESTED_ENTRY SharedStub
+
+	PROLOG_SAVE_REG_PAIR x29, x30, #-16!
 
 	sub         sp, sp, #128 ; 8*(NGPREGS+NFPREGS)
 	stp         x0, x1, [sp, #64+(0*8)]
 	stp         x2, x3, [sp, #64+(2*8)]
 	stp         x4, x5, [sp, #64+(4*8)]
 	stp         x6, x7, [sp, #64+(6*8)]
 	stp         d0, d1, [sp, #(0*8)]
 	stp         d2, d3, [sp, #(2*8)]
@@ -26,29 +29,35 @@ NFPREGS EQU 8
 	mov         w1, w17
 
 	add         x2, sp, #144 ; 16+(8*(NGPREGS+NFPREGS))
 	add         x3, sp, #64 ; 8*NFPREGS
 	add         x4, sp, #0
 
 	bl          PrepareAndDispatch
 
-	add         sp, sp, #128 ; 8*(NGPREGS+NFPREGS)
-	ldp         x29, x30, [sp],#16
-	ret
-	ENDP
+	EPILOG_STACK_RESTORE
+	EPILOG_RESTORE_REG_PAIR x29, x30, #16!
+	EPILOG_RETURN
+
+	NESTED_END SharedStub
 
 
 	MACRO
 	STUBENTRY $functionname, $paramcount
 	EXPORT |$functionname|
-|$functionname| PROC
+	TEXTAREA
+
+	LEAF_ENTRY |$functionname|
+
 	mov	w17, $paramcount
 	b	SharedStub
-	ENDP
+
+	LEAF_END |$functionname|
+
 	MEND
 
     STUBENTRY ?Stub3@nsXPTCStubBase@@UEAA?AW4nsresult@@XZ, 3
     STUBENTRY ?Stub4@nsXPTCStubBase@@UEAA?AW4nsresult@@XZ, 4
     STUBENTRY ?Stub5@nsXPTCStubBase@@UEAA?AW4nsresult@@XZ, 5
     STUBENTRY ?Stub6@nsXPTCStubBase@@UEAA?AW4nsresult@@XZ, 6
     STUBENTRY ?Stub7@nsXPTCStubBase@@UEAA?AW4nsresult@@XZ, 7
     STUBENTRY ?Stub8@nsXPTCStubBase@@UEAA?AW4nsresult@@XZ, 8