From d0e84606d283187b1117b2aaf9092385ee528b96 Mon Sep 17 00:00:00 2001 From: Sanjit Raman <51057192+SanjitRaman@users.noreply.github.com> Date: Fri, 2 Feb 2024 22:06:37 +0000 Subject: [PATCH 1/2] Autogenerate GCC output for reference --- scripts/test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/test.py b/scripts/test.py index 8f46e67..53c8a32 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -179,6 +179,16 @@ def run_test(driver: Path, log_queue: queue.Queue) -> int: ) return 0 + # GCC Reference Output + gcc_result = subprocess.run( + [ + "riscv64-unknown-elf-gcc", + "-march=rv32imfd", "-mabi=ilp32d", + "-o", f"{log_path}.gcc.s", + "-S", str(to_assemble) + ] + ) + # Assemble assembler_result = subprocess.run( [ From 2bf56865c3bed0d9327110dbb7b410338516dc53 Mon Sep 17 00:00:00 2001 From: Sanjit Raman <51057192+SanjitRaman@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:21:47 +0000 Subject: [PATCH 2/2] Update scripts/test.py - Extra Flags Co-authored-by: Filip Wojcicki <50636446+Fiwo735@users.noreply.github.com> --- scripts/test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/test.py b/scripts/test.py index 53c8a32..5692c3b 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -183,7 +183,12 @@ def run_test(driver: Path, log_queue: queue.Queue) -> int: gcc_result = subprocess.run( [ "riscv64-unknown-elf-gcc", - "-march=rv32imfd", "-mabi=ilp32d", + "-std=c90", + "-pedantic", + "-ansi", + "-O0", + "-march=rv32imfd", + "-mabi=ilp32d", "-o", f"{log_path}.gcc.s", "-S", str(to_assemble) ]