To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit 32153973 authored by qinsoon's avatar qinsoon
Browse files

[wip] fix bugs

parent c22425e4
...@@ -2873,7 +2873,7 @@ impl CodeGenerator for ASMCodeGen { ...@@ -2873,7 +2873,7 @@ impl CodeGenerator for ASMCodeGen {
true true
) )
} }
fn emit_movapd_f64_f64 (&mut self, dest: Reg, src: Mem) { fn emit_movapd_f64_f64 (&mut self, dest: Reg, src: Reg) {
trace!("emit movapd {} -> {}", src, dest); trace!("emit movapd {} -> {}", src, dest);
let (reg1, id1, loc1) = self.prepare_fpreg(src, 6 + 1); let (reg1, id1, loc1) = self.prepare_fpreg(src, 6 + 1);
...@@ -2886,15 +2886,8 @@ impl CodeGenerator for ASMCodeGen { ...@@ -2886,15 +2886,8 @@ impl CodeGenerator for ASMCodeGen {
linked_hashmap!{ linked_hashmap!{
id2 => vec![loc2.clone()] id2 => vec![loc2.clone()]
}, },
{
if id1 == id2 {
linked_hashmap!{id1 => vec![loc1, loc2]}
} else {
linked_hashmap!{ linked_hashmap!{
id1 => vec![loc1], id1 => vec![loc1.clone()]
id2 => vec![loc2]
}
}
}, },
false false
) )
......
...@@ -177,7 +177,10 @@ fn add_def(reg: MuID, reg_assigned: &LinkedHashMap<MuID, MuID>, reg_coalesced: & ...@@ -177,7 +177,10 @@ fn add_def(reg: MuID, reg_assigned: &LinkedHashMap<MuID, MuID>, reg_coalesced: &
// if the register is holding a temporary, it needs to be coalesced with new temp // if the register is holding a temporary, it needs to be coalesced with new temp
let old_temp: MuID = entry.get_temp().unwrap(); let old_temp: MuID = entry.get_temp().unwrap();
if (reg_coalesced.contains_key(&old_temp) && *reg_coalesced.get(&old_temp).unwrap() == temp) if old_temp == temp {
// the register that is used at this instruction, and also defined here
// safe
} else if (reg_coalesced.contains_key(&old_temp) && *reg_coalesced.get(&old_temp).unwrap() == temp)
|| (reg_coalesced.contains_key(&temp) && *reg_coalesced.get(&temp).unwrap() == old_temp) || (reg_coalesced.contains_key(&temp) && *reg_coalesced.get(&temp).unwrap() == old_temp)
{ {
// coalesced, safe // coalesced, safe
......
...@@ -11,7 +11,7 @@ use mu::utils::LinkedHashMap; ...@@ -11,7 +11,7 @@ use mu::utils::LinkedHashMap;
use std::sync::RwLock; use std::sync::RwLock;
#[test] #[test]
fn test_inline_add() { fn test_inline_add_simple() {
let lib = testutil::compile_fncs("add_trampoline", vec!["add_trampoline", "add"], &inline_add); let lib = testutil::compile_fncs("add_trampoline", vec!["add_trampoline", "add"], &inline_add);
unsafe { unsafe {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment