mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 23:18:48 +00:00
Fix write asm
This commit is contained in:
@@ -208,7 +208,7 @@ impl WriteString for RType {
|
|||||||
Self::Sub(data_size) => format!("sub{}", data_size.write_string()),
|
Self::Sub(data_size) => format!("sub{}", data_size.write_string()),
|
||||||
Self::Sll(data_size) => format!("sll{}", data_size.write_string()),
|
Self::Sll(data_size) => format!("sll{}", data_size.write_string()),
|
||||||
Self::Srl(data_size) => format!("srl{}", data_size.write_string()),
|
Self::Srl(data_size) => format!("srl{}", data_size.write_string()),
|
||||||
Self::Sra(data_size) => format!("srl{}", data_size.write_string()),
|
Self::Sra(data_size) => format!("sra{}", data_size.write_string()),
|
||||||
Self::Mul(data_size) => format!("mul{}", data_size.write_string()),
|
Self::Mul(data_size) => format!("mul{}", data_size.write_string()),
|
||||||
Self::Div {
|
Self::Div {
|
||||||
data_size,
|
data_size,
|
||||||
|
|||||||
@@ -216,12 +216,7 @@ pub fn test_opt<P1: AsRef<Path>, P2: AsRef<Path>, O: Optimize<ir::TranslationUni
|
|||||||
|
|
||||||
pub fn test_asmgen(path: &Path) {
|
pub fn test_asmgen(path: &Path) {
|
||||||
// TODO: delete ignore list in the future
|
// TODO: delete ignore list in the future
|
||||||
let ignore_list = vec![
|
let ignore_list = vec!["examples/asmgen/struct3.ir"];
|
||||||
"examples/asmgen/struct.ir",
|
|
||||||
"examples/asmgen/struct2.ir",
|
|
||||||
"examples/asmgen/struct3.ir",
|
|
||||||
"examples/asmgen/temp2.ir",
|
|
||||||
];
|
|
||||||
if ignore_list.contains(&path.to_str().expect("`path` must be transformed to `&str`")) {
|
if ignore_list.contains(&path.to_str().expect("`path` must be transformed to `&str`")) {
|
||||||
println!("skip test");
|
println!("skip test");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user