1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 12:00:21 +02:00

Simplify 64/32 concerns in x86-cpu.c

* lightening/x86-cpu.c (il): Take a uint64_t.  It's only called this
  way.
(imovi): Remove some x64_32 conditions; they seem bogus.
This commit is contained in:
Andy Wingo 2019-04-26 16:13:29 +02:00
parent fe34e3cdf1
commit 24950994ef

View file

@ -161,9 +161,9 @@ ii(jit_state_t *_jit, uint32_t i)
} }
static inline void static inline void
il(jit_state_t *_jit, unsigned long l) iw(jit_state_t *_jit, jit_word_t l)
{ {
#if __X64 && !__X64_32 #if __X64
emit_u64(_jit, l); emit_u64(_jit, l);
#else #else
ii(_jit, l); ii(_jit, l);
@ -410,19 +410,15 @@ static void
imovi(jit_state_t *_jit, int32_t r0, jit_word_t i0) imovi(jit_state_t *_jit, int32_t r0, jit_word_t i0)
{ {
#if __X64 #if __X64
# if !__X64_32
if (fits_uint32_p(i0)) { if (fits_uint32_p(i0)) {
# endif
rex(_jit, 0, 0, _NOREG, _NOREG, r0); rex(_jit, 0, 0, _NOREG, _NOREG, r0);
ic(_jit, 0xb8 | r7(r0)); ic(_jit, 0xb8 | r7(r0));
ii(_jit, i0); ii(_jit, i0);
# if !__X64_32
} else { } else {
rex(_jit, 0, 1, _NOREG, _NOREG, r0); rex(_jit, 0, 1, _NOREG, _NOREG, r0);
ic(_jit, 0xb8 | r7(r0)); ic(_jit, 0xb8 | r7(r0));
il(_jit, i0); iw(_jit, i0);
} }
# endif
#else #else
ic(_jit, 0xb8 | r7(r0)); ic(_jit, 0xb8 | r7(r0));
ii(_jit, i0); ii(_jit, i0);