Skip to content
Browse files

Fixed a bug in the runtime code for the AMD64 platform

The pointer to newly allocated n (n>4) words of memory was stored in
%r11 instead of the return register %rax.
  • Loading branch information...
1 parent dc9075d commit f61f94e9d21e55e405cb4716d05f019a3360018a @colinbenner committed Dec 31, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/asmrun/amd64.S
View
6 src/asmrun/amd64.S
@@ -285,9 +285,9 @@ FUNCTION(G(caml_allocN))
jb .L103
addq $8, %rsp /* drop desired size */
#else
- LOAD_VAR(caml_young_ptr, %r11)
- subq %rdi, %r11
- CMP_VAR(caml_young_limit, %r11)
+ LOAD_VAR(caml_young_ptr, %rax)
+ subq %rdi, %rax
+ CMP_VAR(caml_young_limit, %rax)
jb .L103
#endif
ret

0 comments on commit f61f94e

Please sign in to comment.
Something went wrong with that request. Please try again.