mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
RTL VM: Avoid untagging inums in 'logand' and 'logior'.
* libguile/vm-engine.c (logand, logior): Avoid untagging.
This commit is contained in:
parent
d2295ba571
commit
e7f64971ed
1 changed files with 4 additions and 2 deletions
|
@ -2963,7 +2963,8 @@ RTL_VM_NAME (SCM vm, SCM program, SCM *argv, size_t nargs_)
|
|||
{
|
||||
ARGS2 (x, y);
|
||||
if (SCM_I_INUMP (x) && SCM_I_INUMP (y))
|
||||
RETURN (SCM_I_MAKINUM (SCM_I_INUM (x) & SCM_I_INUM (y)));
|
||||
/* Compute bitwise AND without untagging */
|
||||
RETURN (SCM_PACK (SCM_UNPACK (x) & SCM_UNPACK (y)));
|
||||
SYNC_IP ();
|
||||
RETURN (scm_logand (x, y));
|
||||
}
|
||||
|
@ -2976,7 +2977,8 @@ RTL_VM_NAME (SCM vm, SCM program, SCM *argv, size_t nargs_)
|
|||
{
|
||||
ARGS2 (x, y);
|
||||
if (SCM_I_INUMP (x) && SCM_I_INUMP (y))
|
||||
RETURN (SCM_I_MAKINUM (SCM_I_INUM (x) | SCM_I_INUM (y)));
|
||||
/* Compute bitwise OR without untagging */
|
||||
RETURN (SCM_PACK (SCM_UNPACK (x) | SCM_UNPACK (y)));
|
||||
SYNC_IP ();
|
||||
RETURN (scm_logior (x, y));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue