diff options
author | Mark H Weaver <mhw@netris.org> | 2013-08-03 14:51:07 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2013-08-03 14:51:07 -0400 |
commit | 4350c15673a49ca1eacee5670b12d72e3272e3f5 (patch) | |
tree | 6cdf12d50ecdc1cb7e2a07bb179cade15aaa7aa4 /libguile/vm-i-scheme.c | |
parent | cb1482e719a41182e3beec062ff6844c2ee19498 (diff) | |
download | guile-4350c15673a49ca1eacee5670b12d72e3272e3f5.tar.gz |
VM: Avoid overflow in ASM_ADD when the result is most-positive-fixnum.
* libguile/vm-i-scheme.c (ASM_ADD): Remove the tag from one of the
operands before adding, to avoid overflow when the result is the most
positive fixnum.
Diffstat (limited to 'libguile/vm-i-scheme.c')
-rw-r--r-- | libguile/vm-i-scheme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c index d52eec76c..da56860c6 100644 --- a/libguile/vm-i-scheme.c +++ b/libguile/vm-i-scheme.c @@ -248,8 +248,8 @@ VM_DEFINE_FUNCTION (149, ge, "ge?", 2) asm volatile goto ("mov %1, %%rcx; " \ "test %[tag], %%cl; je %l[slow_add]; " \ "test %[tag], %0; je %l[slow_add]; " \ - "add %0, %%rcx; jo %l[slow_add]; " \ "sub %[tag], %%rcx; " \ + "add %0, %%rcx; jo %l[slow_add]; " \ "mov %%rcx, (%[vsp])\n" \ : /* no outputs */ \ : "r" (x), "r" (y), \ |