aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-10-04 15:31:26 +0200
committerBjörn Gustavsson <[email protected]>2010-10-04 15:31:39 +0200
commitb1fe80997e876cac751401724830a9fdadf7152d (patch)
treeb52a089b0bf3dc4c4e8db44dd7ecc04625a141fd
parente9a182f8e75eae113ddebd1e67e1a2ea33258648 (diff)
parent3f367dad74735a863c3e072e51d6a9568b9d155d (diff)
downloadotp-b1fe80997e876cac751401724830a9fdadf7152d.tar.gz
otp-b1fe80997e876cac751401724830a9fdadf7152d.tar.bz2
otp-b1fe80997e876cac751401724830a9fdadf7152d.zip
Merge branch 'mp/fix-hipe-write' into dev
* mp/fix-hipe-write: fix 64-bit writes to 32-bit struct field in HiPE runtime OTP-8877
-rw-r--r--erts/emulator/hipe/hipe_amd64_glue.S2
-rw-r--r--erts/emulator/hipe/hipe_ppc_glue.S2
2 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/hipe/hipe_amd64_glue.S b/erts/emulator/hipe/hipe_amd64_glue.S
index ede762aae0..3376487292 100644
--- a/erts/emulator/hipe/hipe_amd64_glue.S
+++ b/erts/emulator/hipe/hipe_amd64_glue.S
@@ -402,7 +402,7 @@ nbif_3_simple_exception:
* - the native heap/stack/reds registers are saved in P
*/
.handle_trap:
- movq %rax, P_NARITY(P)
+ movl %eax, P_NARITY(P) # Note: narity is a 32-bit field
movl $HIPE_MODE_SWITCH_RES_TRAP, %eax
jmp .nosave_exit
diff --git a/erts/emulator/hipe/hipe_ppc_glue.S b/erts/emulator/hipe/hipe_ppc_glue.S
index 0651963294..c010f4f047 100644
--- a/erts/emulator/hipe/hipe_ppc_glue.S
+++ b/erts/emulator/hipe/hipe_ppc_glue.S
@@ -541,7 +541,7 @@ CSYM(nbif_3_simple_exception):
.handle_trap:
li r3, HIPE_MODE_SWITCH_RES_TRAP
STORE NSP, P_NSP(P)
- STORE r4, P_NARITY(P)
+ stw r4, P_NARITY(P) /* Note: narity is a 32-bit field */
STORE TEMP_LR, P_NRA(P)
b .nosave_exit