diff options
author | Björn Gustavsson <[email protected]> | 2010-09-07 10:42:34 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-09-07 10:42:34 +0200 |
commit | a83b493d40f7c2e0303037d67cecde301668ef79 (patch) | |
tree | 88f79a34a128f3e2c1d462e8dbdb1fd5240a6b37 | |
parent | 03997d5a1c166e8470dd9c888a5dba121144986a (diff) | |
parent | 8bbcecd938f46127bc40ff7aed91d4e519d0cd5b (diff) | |
download | otp-a83b493d40f7c2e0303037d67cecde301668ef79.tar.gz otp-a83b493d40f7c2e0303037d67cecde301668ef79.tar.bz2 otp-a83b493d40f7c2e0303037d67cecde301668ef79.zip |
Merge branch 'pg/fix-hipe-crash-in-gc_after_bif' into dev
* pg/fix-hipe-crash-in-gc_after_bif:
Fix call to erts_gc_after_bif_call in hipe glue
-rw-r--r-- | erts/emulator/hipe/hipe_amd64_glue.S | 2 | ||||
-rw-r--r-- | erts/emulator/hipe/hipe_arm_glue.S | 2 | ||||
-rw-r--r-- | erts/emulator/hipe/hipe_ppc_glue.S | 2 | ||||
-rw-r--r-- | erts/emulator/hipe/hipe_sparc_glue.S | 2 | ||||
-rw-r--r-- | erts/emulator/hipe/hipe_x86_glue.S | 6 |
5 files changed, 12 insertions, 2 deletions
diff --git a/erts/emulator/hipe/hipe_amd64_glue.S b/erts/emulator/hipe/hipe_amd64_glue.S index 83b7b0397b..ede762aae0 100644 --- a/erts/emulator/hipe/hipe_amd64_glue.S +++ b/erts/emulator/hipe/hipe_amd64_glue.S @@ -346,6 +346,8 @@ nbif_3_gc_after_bif: subq $(16-8), %rsp movq P, %rdi movq %rax, %rsi + xorl %edx, %edx # Pass NULL in regs + xorl %ecx, %ecx # Pass 0 in arity call CSYM(erts_gc_after_bif_call) addq $(16-8), %rsp movl $0, P_NARITY(P) # Note: narity is a 32-bit field diff --git a/erts/emulator/hipe/hipe_arm_glue.S b/erts/emulator/hipe/hipe_arm_glue.S index 5d626a5f69..2bce01954e 100644 --- a/erts/emulator/hipe/hipe_arm_glue.S +++ b/erts/emulator/hipe/hipe_arm_glue.S @@ -311,6 +311,8 @@ nbif_3_gc_after_bif: str TEMP_LR, [P, #P_NRA] str NSP, [P, #P_NSP] mov TEMP_LR, lr + mov r3, #0 /* Pass 0 in arity */ + mov r2, #0 /* Pass NULL in regs */ mov r1, r0 mov r0, P bl erts_gc_after_bif_call diff --git a/erts/emulator/hipe/hipe_ppc_glue.S b/erts/emulator/hipe/hipe_ppc_glue.S index 97b07353f9..0651963294 100644 --- a/erts/emulator/hipe/hipe_ppc_glue.S +++ b/erts/emulator/hipe/hipe_ppc_glue.S @@ -476,6 +476,8 @@ CSYM(nbif_3_gc_after_bif): STORE TEMP_LR, P_NRA(P) STORE NSP, P_NSP(P) mflr TEMP_LR + li r6, 0 /* Pass 0 in arity */ + li r5, 0 /* Pass NULL in regs */ mr r4, r3 mr r3, P bl CSYM(erts_gc_after_bif_call) diff --git a/erts/emulator/hipe/hipe_sparc_glue.S b/erts/emulator/hipe/hipe_sparc_glue.S index d1af5c43f5..73cefd4896 100644 --- a/erts/emulator/hipe/hipe_sparc_glue.S +++ b/erts/emulator/hipe/hipe_sparc_glue.S @@ -333,6 +333,8 @@ nbif_3_gc_after_bif: st TEMP_RA, [P+P_NRA] st NSP, [P+P_NSP] mov RA, TEMP_RA + mov 0, %o3 /* Pass 0 in arity */ + mov 0, %o2 /* Pass NULL in regs */ mov %o0, %o1 call erts_gc_after_bif_call mov P, %o0 /* delay slot */ diff --git a/erts/emulator/hipe/hipe_x86_glue.S b/erts/emulator/hipe/hipe_x86_glue.S index 2f7dff39f5..43392111fe 100644 --- a/erts/emulator/hipe/hipe_x86_glue.S +++ b/erts/emulator/hipe/hipe_x86_glue.S @@ -320,11 +320,13 @@ nbif_3_gc_after_bif: .align 4 .gc_after_bif: movl %edx, P_NARITY(P) - subl $(16-4), %esp + subl $(32-4), %esp movl P, (%esp) movl %eax, 4(%esp) + movl $0, 8(%esp) # Pass NULL in regs + movl $0, 12(%esp) # Pass 0 in arity call CSYM(erts_gc_after_bif_call) - addl $(16-4), %esp + addl $(32-4), %esp movl $0, P_NARITY(P) ret |