From 3639a7657e144316bf24496f698ce762b7fbe4c2 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 21 Mar 2021 10:55:01 +0000 Subject: [PATCH] enable -mregnames in assembly syntax for unit tests --- src/soc/simulator/program.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/soc/simulator/program.py b/src/soc/simulator/program.py index 68c7549d..47e873c6 100644 --- a/src/soc/simulator/program.py +++ b/src/soc/simulator/program.py @@ -79,6 +79,7 @@ class Program: with tempfile.NamedTemporaryFile(suffix=".o") as outfile: args = ["powerpc64-linux-gnu-as", '-mpower9', + '-mregnames', self.obj_fmt, "-o", outfile.name] @@ -120,9 +121,10 @@ class Program: self.binfile.close() if __name__ == '__main__': - lst = ['addi 5, 0, 4660', - 'mtcrf 255, 5', + lst = ['addi 5, 0, 4660/2', + 'mtcrf 255, 5+3', 'mfocrf 2, 1', + 'addi r2, 3, 1', 'attn', ] with Program(lst, False) as p: -- 2.30.2