mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
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.
This commit is contained in:
parent
cb1482e719
commit
4350c15673
1 changed files with 1 additions and 1 deletions
|
@ -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), \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue