mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
Zero-offset branches are backward branches; fix "br" backward branches
* libguile/vm-engine.c (BR_UNARY, BR_BINARY, BR_ARITHMETIC): A jump with a zero offset is also a backward branch, in the sense that it's not a forward branch. ("br"): We forgot to VM_HANDLE_INTERRUPTS here on backwards branches. Oops!
This commit is contained in:
parent
90c8094aec
commit
fcd3c8ccd3
1 changed files with 6 additions and 4 deletions
|
@ -305,7 +305,7 @@
|
|||
{ \
|
||||
scm_t_int32 offset = ip[1]; \
|
||||
offset >>= 8; /* Sign-extending shift. */ \
|
||||
if (offset < 0) \
|
||||
if (offset <= 0) \
|
||||
VM_HANDLE_INTERRUPTS; \
|
||||
NEXT (offset); \
|
||||
} \
|
||||
|
@ -321,7 +321,7 @@
|
|||
{ \
|
||||
scm_t_int32 offset = ip[1]; \
|
||||
offset >>= 8; /* Sign-extending shift. */ \
|
||||
if (offset < 0) \
|
||||
if (offset <= 0) \
|
||||
VM_HANDLE_INTERRUPTS; \
|
||||
NEXT (offset); \
|
||||
} \
|
||||
|
@ -342,7 +342,7 @@
|
|||
{ \
|
||||
scm_t_int32 offset = ip[1]; \
|
||||
offset >>= 8; /* Sign-extending shift. */ \
|
||||
if (offset < 0) \
|
||||
if (offset <= 0) \
|
||||
VM_HANDLE_INTERRUPTS; \
|
||||
NEXT (offset); \
|
||||
} \
|
||||
|
@ -358,7 +358,7 @@
|
|||
{ \
|
||||
scm_t_int32 offset = ip[1]; \
|
||||
offset >>= 8; /* Sign-extending shift. */ \
|
||||
if (offset < 0) \
|
||||
if (offset <= 0) \
|
||||
VM_HANDLE_INTERRUPTS; \
|
||||
NEXT (offset); \
|
||||
} \
|
||||
|
@ -1347,6 +1347,8 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp,
|
|||
{
|
||||
scm_t_int32 offset = op;
|
||||
offset >>= 8; /* Sign-extending shift. */
|
||||
if (offset <= 0)
|
||||
VM_HANDLE_INTERRUPTS;
|
||||
NEXT (offset);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue