Fixes #1240: Add a new accessor to indicate that an opcode requires spilling all registers;
This commit is contained in:
@@ -268,10 +268,7 @@ impl<'a> Context<'a> {
|
||||
// This means that we don't currently take advantage of callee-saved registers.
|
||||
// TODO: Be more sophisticated.
|
||||
let opcode = self.cur.func.dfg[inst].opcode();
|
||||
if call_sig.is_some()
|
||||
|| opcode == crate::ir::Opcode::X86ElfTlsGetAddr
|
||||
|| opcode == crate::ir::Opcode::X86MachoTlsGetAddr
|
||||
{
|
||||
if call_sig.is_some() || opcode.clobbers_all_regs() {
|
||||
for lv in throughs {
|
||||
if lv.affinity.is_reg() && !self.spills.contains(&lv.value) {
|
||||
self.spill_reg(lv.value);
|
||||
|
||||
Reference in New Issue
Block a user