[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 08/14: Use bx instead of mov for jumps on ARM
From: |
Andy Wingo |
Subject: |
[Guile-commits] 08/14: Use bx instead of mov for jumps on ARM |
Date: |
Fri, 12 Jun 2020 10:18:43 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit a6fee1add8043f54b3adfe9e539b25c69456d2d6
Author: Icecream95 <ixn@keemail.me>
AuthorDate: Thu Apr 9 21:24:51 2020 +1200
Use bx instead of mov for jumps on ARM
---
lightening/arm-cpu.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lightening/arm-cpu.c b/lightening/arm-cpu.c
index 9b328ad..3cea9f8 100644
--- a/lightening/arm-cpu.c
+++ b/lightening/arm-cpu.c
@@ -2066,7 +2066,7 @@ rshi_u(jit_state_t *_jit, int32_t r0, int32_t r1,
jit_word_t i0)
static void
jmpr(jit_state_t *_jit, int32_t r0)
{
- T1_MOV(_jit, jit_gpr_regno(_PC), r0);
+ T1_BX(_jit, r0);
}
static jit_reloc_t
@@ -3022,11 +3022,10 @@ emit_veneer(jit_state_t *_jit, jit_pointer_t target)
{
uint16_t thumb1_ldr = 0x4800;
int32_t tmp = jit_gpr_regno(JIT_TMP1);
- int32_t rd = jit_gpr_regno(_PC);
ASSERT(tmp < 8);
// Loaded addr is 4 bytes after the LDR, which is aligned, so offset is 0.
emit_u16(_jit, thumb1_ldr | (tmp << 8));
- emit_u16(_jit, THUMB_MOV|((_u4(rd)&8)<<4)|(_u4(tmp)<<3)|(rd&7));
+ emit_u16(_jit, THUMB_BX|(_u4(tmp)<<3));
emit_u32(_jit, (uint32_t) target);
}
- [Guile-commits] branch master updated (fc13923 -> 3c32704), Andy Wingo, 2020/06/12
- [Guile-commits] 01/14: Switch CI to use Debian stable, Andy Wingo, 2020/06/12
- [Guile-commits] 02/14: Add flag bits to the jit_reloc_kind enum, Andy Wingo, 2020/06/12
- [Guile-commits] 05/14: Use an rsh of 0 for jumps on ARM, Andy Wingo, 2020/06/12
- [Guile-commits] 06/14: Return a function pointer from jit_address, Andy Wingo, 2020/06/12
- [Guile-commits] 08/14: Use bx instead of mov for jumps on ARM,
Andy Wingo <=
- [Guile-commits] 09/14: Remove T2_BLXI, Andy Wingo, 2020/06/12
- [Guile-commits] 03/14: Add separate functions for veneer patching, Andy Wingo, 2020/06/12
- [Guile-commits] 04/14: Add a test for local forward and backward jumps, Andy Wingo, 2020/06/12
- [Guile-commits] 07/14: Stop setting the thumb bit except on jumps to veneers, Andy Wingo, 2020/06/12
- [Guile-commits] 12/14: Add CI jobs for ARM in both instruction sets, Andy Wingo, 2020/06/12
- [Guile-commits] 11/14: Convert BLI to BLXI for jumps to ARM code, Andy Wingo, 2020/06/12
- [Guile-commits] 14/14: Update lightening, Andy Wingo, 2020/06/12
- [Guile-commits] 10/14: Always emit veneers for non-bl jumps to ARM code, Andy Wingo, 2020/06/12
- [Guile-commits] 13/14: Merge branch 'arm-fix' into 'master', Andy Wingo, 2020/06/12