From: Luke Kenneth Casson Leighton Date: Sun, 21 Mar 2021 10:55:01 +0000 (+0000) Subject: enable -mregnames in assembly syntax for unit tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3639a7657e144316bf24496f698ce762b7fbe4c2;p=soc.git enable -mregnames in assembly syntax for unit tests --- 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: