Skip to content

Commit

Permalink
caml_backtrace_pos is a 32-bit integer under amd64.
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14307 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
alainfrisch committed Nov 19, 2013
1 parent 9b974c1 commit 7335d5f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion asmrun/amd64.S
Expand Up @@ -99,6 +99,10 @@
movq GREL(dstlabel)(%rip), %r11 ; \
movq srcreg, (%r11)

#define STORE_VAR32(srcreg,dstlabel) \
movq GREL(dstlabel)(%rip), %r11 ; \
movl srcreg, (%r11)

/* Load global [srclabel] in register [dstreg]. Clobbers %r11. */
#define LOAD_VAR(srclabel,dstreg) \
movq GREL(srclabel)(%rip), %r11 ; \
Expand Down Expand Up @@ -144,6 +148,9 @@
#define STORE_VAR(srcreg,dstlabel) \
movq srcreg, G(dstlabel)(%rip)

#define STORE_VAR32(srcreg,dstlabel) \
movl srcreg, G(dstlabel)(%rip)

#define LOAD_VAR(srclabel,dstreg) \
movq G(srclabel)(%rip), dstreg

Expand Down Expand Up @@ -532,7 +539,7 @@ CFI_STARTPROC
popq %r14
ret
LBL(110):
STORE_VAR($0, caml_backtrace_pos)
STORE_VAR32($0, caml_backtrace_pos)
LBL(111):
movq %rax, %r12 /* Save exception bucket */
movq %rax, C_ARG_1 /* arg 1: exception bucket */
Expand Down

0 comments on commit 7335d5f

Please sign in to comment.