sparc: Simplify the IntOp format slightly.
authorGabe Black <gabeblack@google.com>
Mon, 28 Sep 2020 06:59:18 +0000 (23:59 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 7 Oct 2020 23:00:30 +0000 (23:00 +0000)
Change-Id: I693e56a04827287712e001cf99620085ab09b8ac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35236
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/sparc/isa/formats/integerop.isa

index a8e0374d0f6b63d9e70dbc9ac5d560cdb5eaab02..aa67b7c637fe91652a5d478311070b1f7bccf11f 100644 (file)
@@ -128,26 +128,20 @@ def format IntOpCc(code, ic=default_ic, iv=default_iv,
                          xc=default_xc, xv=default_xv,
                          sub=False, *opt_flags) {{
 
-    if sub == "False":
-        (def_ic, def_iv, def_xc, def_xv) = \
-            (default_ic, default_iv, default_xc, default_xv)
-    else:
-        (def_ic, def_iv, def_xc, def_xv) = \
-            (default_sub_ic, default_sub_iv, default_sub_xc, default_sub_xv)
+    sub = sub != 'False'
     if ic == "default_ic":
-        ic = def_ic
+        ic = default_sub_ic if sub else default_ic
     if iv == "default_iv":
-        iv = def_iv
+        iv = default_sub_iv if sub else default_iv
     if xc == "default_xc":
-        xc = def_xc
+        xc = default_sub_xc if sub else default_xc
     if xv == "default_xv":
-        xv = def_xv
+        xv = default_sub_xv if sub else default_xv
     ccCode = calcCcCode % vars()
     (header_output,
      decoder_output,
      exec_output,
-     decode_block) = doIntFormat(code, ccCode,
-                                 name, Name, opt_flags)
+     decode_block) = doIntFormat(code, ccCode, name, Name, opt_flags)
 }};
 
 // Primary format for integer operate instructions: