[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 270/437: x86: Use aligned offset for x87 to/from sse mov
From: |
Andy Wingo |
Subject: |
[Guile-commits] 270/437: x86: Use aligned offset for x87 to/from sse move. |
Date: |
Mon, 2 Jul 2018 05:14:34 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 479c2eda3c70d0573541b71e6180adecdaec9f60
Author: pcpa <address@hidden>
Date: Mon Dec 2 17:58:00 2013 -0200
x86: Use aligned offset for x87 to/from sse move.
* lib/jit_x86-x87.c, lib/jit_x86.c: Use 8 bytes aligned
stack offset for float/double x87 to/from sse move.
---
ChangeLog | 5 +++++
lib/jit_x86-x87.c | 5 -----
lib/jit_x86.c | 24 +++++++++++-------------
3 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 82a0c09..462b7f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-02 Paulo Andrade <address@hidden>
+
+ * lib/jit_x86-x87.c, lib/jit_x86.c: Use 8 bytes aligned
+ stack offset for float/double x87 to/from sse move.
+
2013-11-27 Paulo Andrade <address@hidden>
* configure.ac, lib/jit_arm-swf.c, lib/jit_arm.c: Add
diff --git a/lib/jit_x86-x87.c b/lib/jit_x86-x87.c
index 63043c8..ef63392 100644
--- a/lib/jit_x86-x87.c
+++ b/lib/jit_x86-x87.c
@@ -18,11 +18,6 @@
*/
#if PROTO
-# if __WORDSIZE == 32
-# define CVT_OFFSET -12
-# else
-# define CVT_OFFSET -8
-# endif
# define _ST0_REGNO 0
# define _ST1_REGNO 1
# define _ST2_REGNO 2
diff --git a/lib/jit_x86.c b/lib/jit_x86.c
index 28b6166..69df289 100644
--- a/lib/jit_x86.c
+++ b/lib/jit_x86.c
@@ -26,9 +26,11 @@
#if __WORDSIZE == 32
# define stack_alignment 4
# define stack_framesize 20
+# define CVT_OFFSET -12
#else
# define stack_alignment 8
# define stack_framesize 56
+# define CVT_OFFSET -8
#endif
/*
@@ -310,11 +312,7 @@ _jit_prolog(jit_state_t *_jit)
_jitc->function->self.argi = _jitc->function->self.argf =
_jitc->function->self.aoff = _jitc->function->self.alen = 0;
/* sse/x87 conversion */
-#if __WORDSIZE == 32
- _jitc->function->self.aoff = -12;
-#else
- _jitc->function->self.aoff = -8;
-#endif
+ _jitc->function->self.aoff = CVT_OFFSET;
_jitc->function->self.call = jit_call_default;
jit_alloc((jit_pointer_t *)&_jitc->function->regoff,
_jitc->reglen * sizeof(jit_int32_t));
@@ -1713,27 +1711,27 @@ _patch(jit_state_t *_jit, jit_word_t instr, jit_node_t
*node)
static void
_sse_from_x87_f(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1)
{
- x87_stxi_f(-8, _RBP_REGNO, r1);
- sse_ldxi_f(r0, _RBP_REGNO, -8);
+ x87_stxi_f(CVT_OFFSET, _RBP_REGNO, r1);
+ sse_ldxi_f(r0, _RBP_REGNO, CVT_OFFSET);
}
static void
_sse_from_x87_d(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1)
{
- x87_stxi_d(-8, _RBP_REGNO, r1);
- sse_ldxi_d(r0, _RBP_REGNO, -8);
+ x87_stxi_d(CVT_OFFSET, _RBP_REGNO, r1);
+ sse_ldxi_d(r0, _RBP_REGNO, CVT_OFFSET);
}
static void
_x87_from_sse_f(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1)
{
- sse_stxi_f(-8, _RBP_REGNO, r1);
- x87_ldxi_f(r0, _RBP_REGNO, -8);
+ sse_stxi_f(CVT_OFFSET, _RBP_REGNO, r1);
+ x87_ldxi_f(r0, _RBP_REGNO, CVT_OFFSET);
}
static void
_x87_from_sse_d(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1)
{
- sse_stxi_d(-8, _RBP_REGNO, r1);
- x87_ldxi_d(r0, _RBP_REGNO, -8);
+ sse_stxi_d(CVT_OFFSET, _RBP_REGNO, r1);
+ x87_ldxi_d(r0, _RBP_REGNO, CVT_OFFSET);
}
- [Guile-commits] 382/437: mips: Add initial jit_va_ calls to mips, (continued)
- [Guile-commits] 382/437: mips: Add initial jit_va_ calls to mips, Andy Wingo, 2018/07/02
- [Guile-commits] 353/437: Remove inconsistent, public jit_arg_reg_p macro, Andy Wingo, 2018/07/02
- [Guile-commits] 372/437: Properly correct read of freed memory, Andy Wingo, 2018/07/02
- [Guile-commits] 281/437: Implement the new jit_set_data interface., Andy Wingo, 2018/07/02
- [Guile-commits] 329/437: cross: Provide the action for the cross compiling case, Andy Wingo, 2018/07/02
- [Guile-commits] 178/437: Update texinfo documentation to match current implementation., Andy Wingo, 2018/07/02
- [Guile-commits] 392/437: Bump library major., Andy Wingo, 2018/07/02
- [Guile-commits] 398/437: ia64: Pass all tests for variadic jit functions, Andy Wingo, 2018/07/02
- [Guile-commits] 397/437: Implement new synthesized IR codes sequences, Andy Wingo, 2018/07/02
- [Guile-commits] 410/437: GNU lightning 2.1.2 release, Andy Wingo, 2018/07/02
- [Guile-commits] 270/437: x86: Use aligned offset for x87 to/from sse move.,
Andy Wingo <=
- [Guile-commits] 302/437: Add info menu entry for lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 214/437: Remove remaining ia64 port debug code., Andy Wingo, 2018/07/02
- [Guile-commits] 331/437: mips: Do not make t9 available as a generic register, Andy Wingo, 2018/07/02
- [Guile-commits] 287/437: ARM: Do not leave early init_jit if /proc is not mounted., Andy Wingo, 2018/07/02
- [Guile-commits] 405/437: Add a second pass to compute live register ranges, Andy Wingo, 2018/07/02
- [Guile-commits] 300/437: Add consistency check on temporaries during a jump, Andy Wingo, 2018/07/02
- [Guile-commits] 276/437: Rewrite jit_regset_scan1 for easier optimization., Andy Wingo, 2018/07/02
- [Guile-commits] 268/437: Sync after regenerating version.texi., Andy Wingo, 2018/07/02
- [Guile-commits] 277/437: x86_64: Correct wrong inline assembly in jit_get_cpu, Andy Wingo, 2018/07/02
- [Guile-commits] 360/437: Correct wrong check in simplify_stxi., Andy Wingo, 2018/07/02