aboutsummaryrefslogtreecommitdiff
path: root/src/lj_emit_mips.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_emit_mips.h')
-rw-r--r--src/lj_emit_mips.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lj_emit_mips.h b/src/lj_emit_mips.h
index 74821b8b..d6ea1d52 100644
--- a/src/lj_emit_mips.h
+++ b/src/lj_emit_mips.h
@@ -178,24 +178,24 @@ static void emit_movrr(ASMState *as, IRIns *ir, Reg dst, Reg src)
178 emit_fg(as, irt_isnum(ir->t) ? MIPSI_MOV_D : MIPSI_MOV_S, dst, src); 178 emit_fg(as, irt_isnum(ir->t) ? MIPSI_MOV_D : MIPSI_MOV_S, dst, src);
179} 179}
180 180
181/* Generic load of register from stack slot. */ 181/* Generic load of register with base and (small) offset address. */
182static void emit_spload(ASMState *as, IRIns *ir, Reg r, int32_t ofs) 182static void emit_loadofs(ASMState *as, IRIns *ir, Reg r, Reg base, int32_t ofs)
183{ 183{
184 if (r < RID_MAX_GPR) 184 if (r < RID_MAX_GPR)
185 emit_tsi(as, MIPSI_LW, r, RID_SP, ofs); 185 emit_tsi(as, MIPSI_LW, r, base, ofs);
186 else 186 else
187 emit_tsi(as, irt_isnum(ir->t) ? MIPSI_LDC1 : MIPSI_LWC1, 187 emit_tsi(as, irt_isnum(ir->t) ? MIPSI_LDC1 : MIPSI_LWC1,
188 (r & 31), RID_SP, ofs); 188 (r & 31), base, ofs);
189} 189}
190 190
191/* Generic store of register to stack slot. */ 191/* Generic store of register with base and (small) offset address. */
192static void emit_spstore(ASMState *as, IRIns *ir, Reg r, int32_t ofs) 192static void emit_storeofs(ASMState *as, IRIns *ir, Reg r, Reg base, int32_t ofs)
193{ 193{
194 if (r < RID_MAX_GPR) 194 if (r < RID_MAX_GPR)
195 emit_tsi(as, MIPSI_SW, r, RID_SP, ofs); 195 emit_tsi(as, MIPSI_SW, r, base, ofs);
196 else 196 else
197 emit_tsi(as, irt_isnum(ir->t) ? MIPSI_SDC1 : MIPSI_SWC1, 197 emit_tsi(as, irt_isnum(ir->t) ? MIPSI_SDC1 : MIPSI_SWC1,
198 (r&31), RID_SP, ofs); 198 (r&31), base, ofs);
199} 199}
200 200
201/* Add offset to pointer. */ 201/* Add offset to pointer. */