diff options
author | Mike Pall <mike> | 2016-02-10 18:49:22 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2016-02-10 18:49:22 +0100 |
commit | f547a1425e9db10eec59d586c94ba78b897497f6 (patch) | |
tree | 6d84512e0251db236868d9141af1019a3823b5d7 /src/lj_emit_mips.h | |
parent | 825dcdc4d1e09c71ffc24565aefbb05a9cb3c2f4 (diff) | |
download | luajit-f547a1425e9db10eec59d586c94ba78b897497f6.tar.gz luajit-f547a1425e9db10eec59d586c94ba78b897497f6.tar.bz2 luajit-f547a1425e9db10eec59d586c94ba78b897497f6.zip |
MIPS: Add soft-float support to JIT compiler backend.
Diffstat (limited to 'src/lj_emit_mips.h')
-rw-r--r-- | src/lj_emit_mips.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lj_emit_mips.h b/src/lj_emit_mips.h index 8e7ee66f..f3db918f 100644 --- a/src/lj_emit_mips.h +++ b/src/lj_emit_mips.h | |||
@@ -152,16 +152,18 @@ static void emit_jmp(ASMState *as, MCode *target) | |||
152 | emit_branch(as, MIPSI_B, RID_ZERO, RID_ZERO, (target)); | 152 | emit_branch(as, MIPSI_B, RID_ZERO, RID_ZERO, (target)); |
153 | } | 153 | } |
154 | 154 | ||
155 | static void emit_call(ASMState *as, void *target) | 155 | static void emit_call(ASMState *as, void *target, int needcfa) |
156 | { | 156 | { |
157 | MCode *p = as->mcp; | 157 | MCode *p = as->mcp; |
158 | *--p = MIPSI_NOP; | 158 | *--p = MIPSI_NOP; |
159 | if ((((uintptr_t)target ^ (uintptr_t)p) >> 28) == 0) | 159 | if ((((uintptr_t)target ^ (uintptr_t)p) >> 28) == 0) { |
160 | *--p = MIPSI_JAL | (((uintptr_t)target >>2) & 0x03ffffffu); | 160 | *--p = MIPSI_JAL | (((uintptr_t)target >>2) & 0x03ffffffu); |
161 | else /* Target out of range: need indirect call. */ | 161 | } else { /* Target out of range: need indirect call. */ |
162 | *--p = MIPSI_JALR | MIPSF_S(RID_CFUNCADDR); | 162 | *--p = MIPSI_JALR | MIPSF_S(RID_CFUNCADDR); |
163 | needcfa = 1; | ||
164 | } | ||
163 | as->mcp = p; | 165 | as->mcp = p; |
164 | ra_allockreg(as, i32ptr(target), RID_CFUNCADDR); | 166 | if (needcfa) ra_allockreg(as, i32ptr(target), RID_CFUNCADDR); |
165 | } | 167 | } |
166 | 168 | ||
167 | /* -- Emit generic operations --------------------------------------------- */ | 169 | /* -- Emit generic operations --------------------------------------------- */ |