1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

Reapply atomics inlining

This patch reapplies 230a555976 and
e8d34258be, but fixing a misplaced
comma (!).
This commit is contained in:
Andy Wingo 2019-05-27 19:05:10 +02:00
parent 2ba50e2fe6
commit 1fb39929f9
4 changed files with 9 additions and 49 deletions

View file

@ -1,4 +1,4 @@
/* Copyright 2001,2009-2015,2017-2018
/* Copyright 2001,2009-2015,2017-2019
Free Software Foundation, Inc.
This file is part of Guile.
@ -2079,7 +2079,7 @@ VM_NAME (scm_thread *thread)
SCM *loc;
UNPACK_8_8_8 (op, dst, obj, offset);
loc = SCM_CELL_OBJECT_LOC (SP_REF (obj), offset);
SP_SET (dst, CALL_INTRINSIC (atomic_ref_scm, (loc)));
SP_SET (dst, scm_atomic_ref_scm (loc));
NEXT (1);
}
@ -2095,7 +2095,7 @@ VM_NAME (scm_thread *thread)
SCM *loc;
UNPACK_8_8_8 (op, obj, offset, val);
loc = SCM_CELL_OBJECT_LOC (SP_REF (obj), offset);
CALL_INTRINSIC (atomic_set_scm, (loc, SP_REF (val)));
scm_atomic_set_scm (loc, SP_REF (val));
NEXT (1);
}
@ -2114,7 +2114,7 @@ VM_NAME (scm_thread *thread)
UNPACK_24 (ip[1], obj);
UNPACK_8_24 (ip[2], offset, val);
loc = SCM_CELL_OBJECT_LOC (SP_REF (obj), offset);
SP_SET (dst, CALL_INTRINSIC (atomic_swap_scm, (loc, SP_REF (val))));
SP_SET (dst, scm_atomic_swap_scm (loc, SP_REF (val)));
NEXT (3);
}
@ -2137,8 +2137,8 @@ VM_NAME (scm_thread *thread)
UNPACK_8_24 (ip[2], offset, expected);
UNPACK_24 (ip[3], desired);
loc = SCM_CELL_OBJECT_LOC (SP_REF (obj), offset);
got = CALL_INTRINSIC (atomic_compare_and_swap_scm,
(loc, SP_REF (expected), SP_REF (desired)));
got = scm_atomic_compare_and_swap_scm (loc, SP_REF (expected),
SP_REF (desired));
SP_SET (dst, got);
NEXT (4);
}