[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 367/437: X86: No longer make st7 available as a temporar
From: |
Andy Wingo |
Subject: |
[Guile-commits] 367/437: X86: No longer make st7 available as a temporary |
Date: |
Mon, 2 Jul 2018 05:14:57 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 9f72e661164ef4e2a26ba7a185b24574c57903cb
Author: pcpa <address@hidden>
Date: Tue Feb 17 13:55:01 2015 -0200
X86: No longer make st7 available as a temporary
* include/lightning/jit_x86.h, lib/jit_x86-cpu.c,
lib/jit_x86-x87.c: No longer make st(7) available.
Need to keep one x87 slots empty to avoid exceptions.
This has the side effect of no longer needing the
hackish emms instruction before a function call.
---
ChangeLog | 8 ++++++++
include/lightning/jit_x86.h | 5 ++---
lib/jit_x86-cpu.c | 4 ----
lib/jit_x86-x87.c | 1 -
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c1e93ec..186cea9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-02-17 Paulo Andrade <address@hidden>
+
+ * include/lightning/jit_x86.h, lib/jit_x86-cpu.c,
+ lib/jit_x86-x87.c: No longer make st(7) available.
+ Need to keep one x87 slots empty to avoid exceptions.
+ This has the side effect of no longer needing the
+ hackish emms instruction before a function call.
+
2015-02-16 Paulo Andrade <address@hidden>
* lib/lightning.c: Remove the jit_regno_patch bitfield
diff --git a/include/lightning/jit_x86.h b/include/lightning/jit_x86.h
index 307c383..b53e1be 100644
--- a/include/lightning/jit_x86.h
+++ b/include/lightning/jit_x86.h
@@ -27,7 +27,7 @@
* Types
*/
#define jit_sse2_p() jit_cpu.sse2
-#define jit_x87_reg_p(reg) ((reg) >= _ST0 && (reg) <= _ST7)
+#define jit_x87_reg_p(reg) ((reg) >= _ST0 && (reg) <= _ST6)
#if __WORDSIZE == 32
# if defined(__x86_64__)
# define __X64_32 1
@@ -64,7 +64,6 @@ typedef enum {
# define JIT_F4 (jit_sse2_p() ? _XMM4 : _ST4)
# define JIT_F5 (jit_sse2_p() ? _XMM5 : _ST5)
# define JIT_F6 (jit_sse2_p() ? _XMM6 : _ST6)
-# define JIT_F7 (jit_sse2_p() ? _XMM7 : _ST7)
_XMM0, _XMM1, _XMM2, _XMM3, _XMM4, _XMM5, _XMM6, _XMM7,
# define jit_sse_reg_p(reg) ((reg) >= _XMM0 && (reg) <= _XMM7)
#else
@@ -148,7 +147,7 @@ typedef enum {
# define jit_sse_reg_p(reg) ((reg) >= _XMM8 && (reg) <= _XMM0)
# endif
#endif
- _ST0, _ST1, _ST2, _ST3, _ST4, _ST5, _ST6, _ST7,
+ _ST0, _ST1, _ST2, _ST3, _ST4, _ST5, _ST6,
# define JIT_NOREG _NOREG
_NOREG,
} jit_reg_t;
diff --git a/lib/jit_x86-cpu.c b/lib/jit_x86-cpu.c
index fa4eade..a26f32a 100644
--- a/lib/jit_x86-cpu.c
+++ b/lib/jit_x86-cpu.c
@@ -3390,9 +3390,6 @@ _bxsubi_u(jit_state_t *_jit, jit_word_t i0, jit_int32_t
r0, jit_word_t i1)
static void
_callr(jit_state_t *_jit, jit_int32_t r0)
{
-#if __X32
- emms();
-#endif
rex(0, 0, _NOREG, _NOREG, r0);
ic(0xff);
mrm(0x03, 0x02, r7(r0));
@@ -3411,7 +3408,6 @@ _calli(jit_state_t *_jit, jit_word_t i0)
jit_unget_reg(reg);
#else
jit_word_t w;
- emms();
ic(0xe8);
w = i0 - (_jit->pc.w + 4);
ii(w);
diff --git a/lib/jit_x86-x87.c b/lib/jit_x86-x87.c
index 5b45c26..075d3bc 100644
--- a/lib/jit_x86-x87.c
+++ b/lib/jit_x86-x87.c
@@ -34,7 +34,6 @@
# define _ST4_REGNO 4
# define _ST5_REGNO 5
# define _ST6_REGNO 6
-# define _ST7_REGNO 7
# define x87rx(code, md, rb, ri, ms) _x87rx(_jit, code, md, rb, ri, ms)
# define fldcwm(md, rb, ri, ms) x87rx(015, md, rb, ri, ms)
# define fstcwm(md, rb, ri, ms) _fstcwm(_jit, md, rb, ri, ms)
- [Guile-commits] 383/437: ia64: Implement cache flush., (continued)
- [Guile-commits] 383/437: ia64: Implement cache flush., Andy Wingo, 2018/07/02
- [Guile-commits] 371/437: Correct read of freed memory, Andy Wingo, 2018/07/02
- [Guile-commits] 342/437: x86: Implement support for the x32 abi, Andy Wingo, 2018/07/02
- [Guile-commits] 416/437: Build and pass all tests on 32 and 64 bit sparc, Andy Wingo, 2018/07/02
- [Guile-commits] 400/437: Correct missing jit_unget_reg calls, Andy Wingo, 2018/07/02
- [Guile-commits] 418/437: Correct typo and values in jit_sparc-sz.c, Andy Wingo, 2018/07/02
- [Guile-commits] 359/437: ARM: Regenerate size table for hard float armv7 or newer., Andy Wingo, 2018/07/02
- [Guile-commits] 396/437: Move definition of jit_va_ codes, cosmetic change., Andy Wingo, 2018/07/02
- [Guile-commits] 407/437: Update copyright year, Andy Wingo, 2018/07/02
- [Guile-commits] 435/437: Add GUILE_ENABLE_JIT macro, Andy Wingo, 2018/07/02
- [Guile-commits] 367/437: X86: No longer make st7 available as a temporary,
Andy Wingo <=
- [Guile-commits] 406/437: Adapt for binutils 2.29, Andy Wingo, 2018/07/02
- [Guile-commits] 395/437: Use an actual, invalid code, as last jit code., Andy Wingo, 2018/07/02
- [Guile-commits] 344/437: ARM: Better check for constants offset overflow, Andy Wingo, 2018/07/02
- [Guile-commits] 351/437: PPC: Only call binutils function if it is available, Andy Wingo, 2018/07/02
- [Guile-commits] 278/437: x86_64: Change x86_64 to also save/restore %rbx in inline asm., Andy Wingo, 2018/07/02
- [Guile-commits] 427/437: Remove some more of the lightning build machinery, Andy Wingo, 2018/07/02
- [Guile-commits] 328/437: Update THANKS file, Andy Wingo, 2018/07/02
- [Guile-commits] 129/437: Remove previous macro files as they are no longer used., Andy Wingo, 2018/07/02
- [Guile-commits] 09/437: add autotools-generated files, Andy Wingo, 2018/07/02
- [Guile-commits] 69/437: implement long mul/div/mod for x86-64, Andy Wingo, 2018/07/02