[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 295/437: Always mark return registers as live in epilog
From: |
Andy Wingo |
Subject: |
[Guile-commits] 295/437: Always mark return registers as live in epilog |
Date: |
Mon, 2 Jul 2018 05:14:39 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 53dd28d682b98da1d687e7d8aafd988c89683a76
Author: pcpa <address@hidden>
Date: Sun Aug 10 11:39:53 2014 -0300
Always mark return registers as live in epilog
* lib/lightning.c: Always mark JIT_RET and JIT_FRET as
live in a function epilog. This is required because
on some ports a complex sequence, allocating one or more
registers, may be required to jump from a ret* to the
epilog, and the lightning api does not have annotations
to know if a function returns a value, or the type of
the return value.
---
ChangeLog | 10 ++++++++++
lib/lightning.c | 20 +++++++++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 1097a72..eb9201e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2014-08-10 Paulo Andrade <address@hidden>
+ * lib/lightning.c: Always mark JIT_RET and JIT_FRET as
+ live in a function epilog. This is required because
+ on some ports a complex sequence, allocating one or more
+ registers, may be required to jump from a ret* to the
+ epilog, and the lightning api does not have annotations
+ to know if a function returns a value, or the type of
+ the return value.
+
+2014-08-10 Paulo Andrade <address@hidden>
+
* lib/lightning.c: Change the correct live bitmask of
return registers after a function call in jit_update.
diff --git a/lib/lightning.c b/lib/lightning.c
index ecad2be..cb6ddac 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -2029,8 +2029,26 @@ _jit_update(jit_state_t *_jit, jit_node_t *node,
jit_regset_and(mask, mask, &ztmp);
}
break;
- case jit_code_prolog: case jit_code_epilog:
+ case jit_code_prolog:
+ jit_regset_set_ui(mask, 0);
+ return;
+ case jit_code_epilog:
jit_regset_set_ui(mask, 0);
+#if defined(JIT_RET)
+ /* On some backends it may be required to allocate one
+ * or more registers to jump from a jit_ret* to the
+ * epilog label.
+ * Because currently there is no type information,
+ * assume JIT_RET and JIT_FRET are live in the epilog.
+ * Only JIT_RET really should be marked as live, to
+ * prevent it being allocated, usually in the jump to
+ * the epilog, but also mark JIT_FRET as live for the
+ * sake of correctness. */
+ jit_regset_setbit(live, JIT_RET);
+#endif
+#if defined(JIT_FRET)
+ jit_regset_setbit(live, JIT_FRET);
+#endif
return;
case jit_code_callr:
value = jit_regno(node->u.w);
- [Guile-commits] 193/437: Make code and data buffer readonly., (continued)
- [Guile-commits] 193/437: Make code and data buffer readonly., Andy Wingo, 2018/07/02
- [Guile-commits] 145/437: Add new test case for int/float to/from conversion., Andy Wingo, 2018/07/02
- [Guile-commits] 308/437: x86: Update instruction size information for Windows x64, Andy Wingo, 2018/07/02
- [Guile-commits] 313/437: Implement the jit_align interface, Andy Wingo, 2018/07/02
- [Guile-commits] 250/437: Add the new jit_pointer_p predicate interface., Andy Wingo, 2018/07/02
- [Guile-commits] 286/437: Do not export private definitions and types., Andy Wingo, 2018/07/02
- [Guile-commits] 147/437: Correct test cases in the mips backend., Andy Wingo, 2018/07/02
- [Guile-commits] 292/437: AARCH64: Correct assertion test, Andy Wingo, 2018/07/02
- [Guile-commits] 305/437: Consider all callee_save_p regs as live on non trackable jumps, Andy Wingo, 2018/07/02
- [Guile-commits] 40/437: checkin rewrite of i386 assembler, Andy Wingo, 2018/07/02
- [Guile-commits] 295/437: Always mark return registers as live in epilog,
Andy Wingo <=
- [Guile-commits] 326/437: Actually install the pkgconfig file., Andy Wingo, 2018/07/02
- [Guile-commits] 325/437: misc: Create a pkg-config file, Andy Wingo, 2018/07/02
- [Guile-commits] 335/437: PPC: Add initial powerpc le support., Andy Wingo, 2018/07/02
- [Guile-commits] 272/437: x86: Correct wrong x87 float indexed store code generation., Andy Wingo, 2018/07/02
- [Guile-commits] 340/437: ARM: Flush cache page by page, Andy Wingo, 2018/07/02
- [Guile-commits] 339/437: ARM: Correct constants offset check, Andy Wingo, 2018/07/02
- [Guile-commits] 309/437: Do not fail if NULL is passed to init_jit., Andy Wingo, 2018/07/02
- [Guile-commits] 225/437: Second alpha release 1.99a, Andy Wingo, 2018/07/02
- [Guile-commits] 243/437: IA64: Correct code to save/restore r2 used as lightning JIT_FP., Andy Wingo, 2018/07/02
- [Guile-commits] 348/437: S390: Replace s390x filenames with s390, Andy Wingo, 2018/07/02