arch-power: Add sign-extend instructions
authorSandipan Das <sandipan@linux.ibm.com>
Sat, 6 Feb 2021 11:51:16 +0000 (17:21 +0530)
committerSandipan Das <sandipan@linux.ibm.com>
Mon, 15 Feb 2021 08:32:38 +0000 (14:02 +0530)
This adds the following instructions.
  * Extend Sign Word (extsw[.])

Change-Id: Ia15fc69de665399f1c8d52ca00d2f7670d553b48
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
src/arch/power/insts/integer.cc
src/arch/power/isa/decoder.isa

index c937a6f8f0963a121b300ebb880ff4aaa68c796f..408ca8e08d8d902bf7b7ff9cfc01b3b527214d54 100644 (file)
@@ -301,6 +301,7 @@ IntLogicOp::generateDisassembly(
         printSecondSrc = false;
     } else if (!myMnemonic.compare("extsb") ||
                !myMnemonic.compare("extsh") ||
+               !myMnemonic.compare("extsw") ||
                !myMnemonic.compare("cntlzw")) {
         printSecondSrc = false;
     }
index 0932ce4b33004a1db7f19d2217262e7de4efa992..681358234fb4451d924ef2388c588236b5680772 100644 (file)
@@ -497,6 +497,7 @@ decode PO default Unknown::unknown() {
             412: orc({{ Ra = Rs | ~Rb; }}, true);
             954: extsb({{ Ra = Rs_sb; }}, true);
             922: extsh({{ Ra = Rs_sh; }}, true);
+            986: extsw({{ Ra = Rs_sw; }}, true);
             26: cntlzw({{ Ra = findLeadingZeros(Rs_uw); }}, true);
 
             508: cmpb({{