diff options
Diffstat (limited to 'src/lj_asm_arm.h')
-rw-r--r-- | src/lj_asm_arm.h | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h index 99f3055f..ea1a6aea 100644 --- a/src/lj_asm_arm.h +++ b/src/lj_asm_arm.h | |||
@@ -18,27 +18,6 @@ static Reg ra_hintalloc(ASMState *as, IRRef ref, Reg hint, RegSet allow) | |||
18 | return r; | 18 | return r; |
19 | } | 19 | } |
20 | 20 | ||
21 | /* Similar to ra_left, except we override any hints. */ | ||
22 | static void ra_leftov(ASMState *as, Reg dest, IRRef lref) | ||
23 | { | ||
24 | IRIns *ir = IR(lref); | ||
25 | Reg left = ir->r; | ||
26 | if (ra_noreg(left)) { | ||
27 | ra_sethint(ir->r, dest); /* Propagate register hint. */ | ||
28 | left = ra_allocref(as, lref, RSET_GPR); | ||
29 | } | ||
30 | ra_noweak(as, left); | ||
31 | if (dest != left) { | ||
32 | /* Use register renaming if dest is the PHI reg. */ | ||
33 | if (irt_isphi(ir->t) && as->phireg[dest] == lref) { | ||
34 | ra_modified(as, left); | ||
35 | ra_rename(as, left, dest); | ||
36 | } else { | ||
37 | emit_movrr(as, ir, dest, left); | ||
38 | } | ||
39 | } | ||
40 | } | ||
41 | |||
42 | /* Allocate a scratch register pair. */ | 21 | /* Allocate a scratch register pair. */ |
43 | static Reg ra_scratchpair(ASMState *as, RegSet allow) | 22 | static Reg ra_scratchpair(ASMState *as, RegSet allow) |
44 | { | 23 | { |
@@ -69,52 +48,6 @@ static Reg ra_scratchpair(ASMState *as, RegSet allow) | |||
69 | return r; | 48 | return r; |
70 | } | 49 | } |
71 | 50 | ||
72 | /* Force a RID_RET/RID_RETHI destination register pair (marked as free). */ | ||
73 | static void ra_destpair(ASMState *as, IRIns *ir) | ||
74 | { | ||
75 | Reg destlo = ir->r, desthi = (ir+1)->r; | ||
76 | /* First spill unrelated refs blocking the destination registers. */ | ||
77 | if (!rset_test(as->freeset, RID_RET) && | ||
78 | destlo != RID_RET && desthi != RID_RET) | ||
79 | ra_restore(as, regcost_ref(as->cost[RID_RET])); | ||
80 | if (!rset_test(as->freeset, RID_RETHI) && | ||
81 | destlo != RID_RETHI && desthi != RID_RETHI) | ||
82 | ra_restore(as, regcost_ref(as->cost[RID_RETHI])); | ||
83 | /* Next free the destination registers (if any). */ | ||
84 | if (ra_hasreg(destlo)) { | ||
85 | ra_free(as, destlo); | ||
86 | ra_modified(as, destlo); | ||
87 | } else { | ||
88 | destlo = RID_RET; | ||
89 | } | ||
90 | if (ra_hasreg(desthi)) { | ||
91 | ra_free(as, desthi); | ||
92 | ra_modified(as, desthi); | ||
93 | } else { | ||
94 | desthi = RID_RETHI; | ||
95 | } | ||
96 | /* Check for conflicts and shuffle the registers as needed. */ | ||
97 | if (destlo == RID_RETHI) { | ||
98 | if (desthi == RID_RET) { | ||
99 | emit_movrr(as, ir, RID_RETHI, RID_TMP); | ||
100 | emit_movrr(as, ir, RID_RET, RID_RETHI); | ||
101 | emit_movrr(as, ir, RID_TMP, RID_RET); | ||
102 | } else { | ||
103 | emit_movrr(as, ir, RID_RETHI, RID_RET); | ||
104 | if (desthi != RID_RETHI) emit_movrr(as, ir, desthi, RID_RETHI); | ||
105 | } | ||
106 | } else if (desthi == RID_RET) { | ||
107 | emit_movrr(as, ir, RID_RET, RID_RETHI); | ||
108 | if (destlo != RID_RET) emit_movrr(as, ir, destlo, RID_RET); | ||
109 | } else { | ||
110 | if (desthi != RID_RETHI) emit_movrr(as, ir, desthi, RID_RETHI); | ||
111 | if (destlo != RID_RET) emit_movrr(as, ir, destlo, RID_RET); | ||
112 | } | ||
113 | /* Restore spill slots (if any). */ | ||
114 | if (ra_hasspill((ir+1)->s)) ra_save(as, ir+1, RID_RETHI); | ||
115 | if (ra_hasspill(ir->s)) ra_save(as, ir, RID_RET); | ||
116 | } | ||
117 | |||
118 | /* -- Guard handling ------------------------------------------------------ */ | 51 | /* -- Guard handling ------------------------------------------------------ */ |
119 | 52 | ||
120 | /* Generate an exit stub group at the bottom of the reserved MCode memory. */ | 53 | /* Generate an exit stub group at the bottom of the reserved MCode memory. */ |