Commit 14ff7cc9 authored by Cherry Zhang's avatar Cherry Zhang

runtime/cgo: fix callback on big-endian MIPS64

Use MOVW, instead of MOVV, to pass an int32 arg. Also no need to
restore arg registers.

Fix big-endian MIPS64 build.

Change-Id: Ib43c71075c988153e5e5c5c6e7297b3fee28652a
Reviewed-on: https://go-review.googlesource.com/28830Reviewed-by: default avatarMinux Ma <minux@golang.org>
parent 2a36f78e
...@@ -18,9 +18,9 @@ TEXT crosscall2(SB),NOSPLIT,$-8 ...@@ -18,9 +18,9 @@ TEXT crosscall2(SB),NOSPLIT,$-8
* first arg. * first arg.
*/ */
ADDV $(-8*23), R29 ADDV $(-8*23), R29
MOVV R5, (8*1)(R29) MOVV R5, (8*1)(R29) // void*
MOVV R6, (8*2)(R29) MOVW R6, (8*2)(R29) // int32
MOVV R7, (8*3)(R29) MOVV R7, (8*3)(R29) // uintptr
MOVV R16, (8*4)(R29) MOVV R16, (8*4)(R29)
MOVV R17, (8*5)(R29) MOVV R17, (8*5)(R29)
MOVV R18, (8*6)(R29) MOVV R18, (8*6)(R29)
...@@ -49,9 +49,6 @@ TEXT crosscall2(SB),NOSPLIT,$-8 ...@@ -49,9 +49,6 @@ TEXT crosscall2(SB),NOSPLIT,$-8
JAL runtime·load_g(SB) JAL runtime·load_g(SB)
JAL (R4) JAL (R4)
MOVV (8*1)(R29), R5
MOVV (8*2)(R29), R6
MOVV (8*3)(R29), R7
MOVV (8*4)(R29), R16 MOVV (8*4)(R29), R16
MOVV (8*5)(R29), R17 MOVV (8*5)(R29), R17
MOVV (8*6)(R29), R18 MOVV (8*6)(R29), R18
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment