From ef67f2f212b4e06a89bfd3c3e4d8ac4166fa9b16 Mon Sep 17 00:00:00 2001 From: JYJSXX Date: Mon, 2 Dec 2024 17:54:00 +0800 Subject: [PATCH] fix eval_lab4 --- tests/4-opt/eval_lab4.sh | 25 ++++++++++++++++++------- tests/4-opt/test_perf.sh | 5 +++-- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/tests/4-opt/eval_lab4.sh b/tests/4-opt/eval_lab4.sh index 7f58c5f..d9a314a 100755 --- a/tests/4-opt/eval_lab4.sh +++ b/tests/4-opt/eval_lab4.sh @@ -9,7 +9,8 @@ LOG=log.txt usage() { cat <>$LOG 2>&1 + bash -c "cminusfc $flag -emit-llvm $case -o $ll_file" >>$LOG 2>&1 fi # cminusfc compile to .s - bash -c "cminusfc -S -mem2reg $case -o $asm_file" >>$LOG 2>&1 + bash -c "cminusfc -S $flag $case -o $asm_file" >>$LOG 2>&1 check_return_value $? 0 "CE" "cminusfc compiler error" || continue # gcc compile asm to executable diff --git a/tests/4-opt/test_perf.sh b/tests/4-opt/test_perf.sh index 37875cd..25581f9 100755 --- a/tests/4-opt/test_perf.sh +++ b/tests/4-opt/test_perf.sh @@ -22,7 +22,8 @@ check_return_value() { usage() { cat <