[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 84/437: move x86-64 JIT_V1/JIT_V2 in R12/R13
From: |
Andy Wingo |
Subject: |
[Guile-commits] 84/437: move x86-64 JIT_V1/JIT_V2 in R12/R13 |
Date: |
Mon, 2 Jul 2018 05:13:50 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 240905434b640664c00228e8a5a26d19c3cfef65
Author: Paolo Bonzini <address@hidden>
Date: Thu Jun 12 22:51:37 2008 -0700
move x86-64 JIT_V1/JIT_V2 in R12/R13
2008-06-12 Paolo Bonzini <address@hidden>
* lightning/i386/core.h: Move JIT_V definition...
* lightning/i386/core-32.h: ... here.
* lightning/i386/core-64.h: ... and here. Avoid dancing between
RSI/RDI and R12/R13, and place JIT_V1/JIT_V2 in R12/R13.
---
ChangeLog | 7 +++++++
lightning/i386/core-32.h | 2 ++
lightning/i386/core-64.h | 16 ++++++----------
lightning/i386/core.h | 2 --
4 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d8de0b4..54c911c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-06-12 Paolo Bonzini <address@hidden>
+
+ * lightning/i386/core.h: Move JIT_V definition...
+ * lightning/i386/core-32.h: ... here.
+ * lightning/i386/core-64.h: ... and here. Avoid dancing between
+ RSI/RDI and R12/R13, and place JIT_V1/JIT_V2 in R12/R13.
+
2008-06-11 Paolo Bonzini <address@hidden>
* build-aux/lightning.m4: Adjust LIGHTNING_BACKENDS, don't
diff --git a/lightning/i386/core-32.h b/lightning/i386/core-32.h
index d93967f..9775fc8 100644
--- a/lightning/i386/core-32.h
+++ b/lightning/i386/core-32.h
@@ -36,6 +36,8 @@
#define JIT_CAN_16 1
#define JIT_AP _EBP
+#define JIT_V_NUM 3
+#define JIT_V(i) ((i) == 0 ? _EBX : _ESI + (i) - 1)
struct jit_local_state {
int framesize;
diff --git a/lightning/i386/core-64.h b/lightning/i386/core-64.h
index d2ab96a..da391ae 100644
--- a/lightning/i386/core-64.h
+++ b/lightning/i386/core-64.h
@@ -39,6 +39,9 @@
#define JIT_CALLTMPSTART 0x48
#define JIT_REXTMP 0x4B
+#define JIT_V_NUM 3
+#define JIT_V(i) ((i) == 0 ? _EBX : _R11D + (i))
+
struct jit_local_state {
int long_jumps;
int nextarg_getfp;
@@ -127,17 +130,13 @@ struct jit_local_state {
#define jit_pusharg_i(rs) (_jitl.argssize++, MOVQrr(rs, JIT_CALLTMPSTART
+ _jitl.argssize - 1))
#define jit_finish(sub) (MOVQir((long) (sub), JIT_REXTMP), \
jit_shift_args(), \
- CALLsr(JIT_REXTMP), \
- jit_restore_locals())
+ CALLsr(JIT_REXTMP))
#define jit_reg_is_arg(reg) ((reg == _EDI) || (reg ==_ESI) || (reg ==
_EDX))
#define jit_finishr(reg) ((jit_reg_is_arg((reg)) ? MOVQrr(reg,
JIT_REXTMP) : (void)0), \
jit_shift_args(), \
- CALLsr(jit_reg_is_arg((reg)) ? JIT_REXTMP :
(reg)), \
- jit_restore_locals())
+ CALLsr(jit_reg_is_arg((reg)) ? JIT_REXTMP :
(reg)))
-/* R12 and R13 are callee-save, instead of EDI and ESI. Can be improved. */
#define jit_shift_args() \
- (MOVQrr(_ESI, _R12), MOVQrr(_EDI, _R13), \
(_jitl.argssize-- \
? (MOVQrr(JIT_CALLTMPSTART + _jitl.argssize, jit_arg_reg_order[0]), \
(_jitl.argssize-- \
@@ -146,10 +145,7 @@ struct jit_local_state {
? MOVQrr(JIT_CALLTMPSTART, jit_arg_reg_order[2]) \
: (void)0)) \
: (void)0)) \
- : (void)0))
-
-#define jit_restore_locals() \
- (MOVQrr(_R12, _ESI), MOVQrr(_R13, _EDI))
+ : (void)0)
#define jit_retval_l(rd) ((void)jit_movr_l ((rd), _EAX))
#define jit_arg_c()
(jit_arg_reg_order[_jitl.nextarg_geti++])
diff --git a/lightning/i386/core.h b/lightning/i386/core.h
index 3ed6730..ad99d4d 100644
--- a/lightning/i386/core.h
+++ b/lightning/i386/core.h
@@ -39,9 +39,7 @@
#define JIT_RET _EAX
#define JIT_R_NUM 3
-#define JIT_V_NUM 3
#define JIT_R(i) (_EAX + (i))
-#define JIT_V(i) ((i) == 0 ? _EBX : _ESI + (i) - 1)
/* 3-parameter operation */
- [Guile-commits] 80/437: fix C++ incompatibility in i386 back-end, (continued)
- [Guile-commits] 80/437: fix C++ incompatibility in i386 back-end, Andy Wingo, 2018/07/02
- [Guile-commits] 45/437: add floating-point for x86-64, Andy Wingo, 2018/07/02
- [Guile-commits] 28/437: first merge of x86-64 backend and related configury changes, Andy Wingo, 2018/07/02
- [Guile-commits] 74/437: add long boolean operations for x86-64, Andy Wingo, 2018/07/02
- [Guile-commits] 89/437: fix _rN vs. _rR, Andy Wingo, 2018/07/02
- [Guile-commits] 90/437: fix IMULQir and IMULQirr, Andy Wingo, 2018/07/02
- [Guile-commits] 79/437: fix jit_replace8 for case when one of the operands is _EAX., Andy Wingo, 2018/07/02
- [Guile-commits] 87/437: rewrite x86-64 argument passing to support up to 6 arguments, Andy Wingo, 2018/07/02
- [Guile-commits] 92/437: fix installation bug, Andy Wingo, 2018/07/02
- [Guile-commits] 71/437: add missing x86-64 memory operations, Andy Wingo, 2018/07/02
- [Guile-commits] 84/437: move x86-64 JIT_V1/JIT_V2 in R12/R13,
Andy Wingo <=
- [Guile-commits] 83/437: detect 32-/64-bit variant of i386 back-end at include time (not configure time), Andy Wingo, 2018/07/02
- [Guile-commits] 86/437: fix x86-64 jit_movi_l (x, 0) and 16-byte stack alignment in the prolog, Andy Wingo, 2018/07/02
- [Guile-commits] 91/437: fix miscellaneous PPC-32 back-end bugs, Andy Wingo, 2018/07/02
- [Guile-commits] 103/437: fix two bugs in load/store for i386, Andy Wingo, 2018/07/02
- [Guile-commits] 100/437: fix jit_movbrm in the i386 backend, Andy Wingo, 2018/07/02
- [Guile-commits] 58/437: use CALLsr, not CALLLsr, Andy Wingo, 2018/07/02
- [Guile-commits] 60/437: don't use _VOID symbol, reserved by newlib (cygwin), Andy Wingo, 2018/07/02
- [Guile-commits] 96/437: fix blunder in operand order (i386), Andy Wingo, 2018/07/02
- [Guile-commits] 97/437: fix x86 shifts, Andy Wingo, 2018/07/02
- [Guile-commits] 104/437: fix jit_extr_f_d and jit_extr_d_f for x86-64, Andy Wingo, 2018/07/02