diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-08-21 01:18:46 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-08-21 01:18:46 +0000 |
commit | d22b327b3d8fafade61fa2b4aaba5c9f3ee10d4d (patch) | |
tree | d9964c75cc8837782719608b818ff6306e9ff97e | |
parent | f675b3c6444af3e2f547b050eedb8a12584110ef (diff) | |
download | external_llvm-d22b327b3d8fafade61fa2b4aaba5c9f3ee10d4d.zip external_llvm-d22b327b3d8fafade61fa2b4aaba5c9f3ee10d4d.tar.gz external_llvm-d22b327b3d8fafade61fa2b4aaba5c9f3ee10d4d.tar.bz2 |
[micromips] Print instruction alias "not" if the last operand of a nor is zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188851 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp | 1 | ||||
-rw-r--r-- | test/MC/Mips/micromips-alu-instructions.s | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp b/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp index 369fece..755a948 100644 --- a/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp +++ b/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp @@ -257,6 +257,7 @@ bool MipsInstPrinter::printAlias(const MCInst &MI, raw_ostream &OS) { // jalr $ra, $r1 => jalr $r1 return isReg<Mips::RA_64>(MI, 0) && printAlias("jalr", MI, 1, OS); case Mips::NOR: + case Mips::NOR_MM: // nor $r0, $r1, $zero => not $r0, $r1 return isReg<Mips::ZERO>(MI, 2) && printAlias("not", MI, 0, 1, OS); case Mips::NOR64: diff --git a/test/MC/Mips/micromips-alu-instructions.s b/test/MC/Mips/micromips-alu-instructions.s index 426ab8b..3f6079c 100644 --- a/test/MC/Mips/micromips-alu-instructions.s +++ b/test/MC/Mips/micromips-alu-instructions.s @@ -32,7 +32,7 @@ # CHECK-EL: xori $9, $6, 17767 # encoding: [0x26,0x71,0x67,0x45] # CHECK-EL: xori $9, $6, 17767 # encoding: [0x26,0x71,0x67,0x45] # CHECK-EL: nor $9, $6, $7 # encoding: [0xe6,0x00,0xd0,0x4a] -# CHECK-EL: nor $7, $8, $zero # encoding: [0x08,0x00,0xd0,0x3a] +# CHECK-EL: not $7, $8 # encoding: [0x08,0x00,0xd0,0x3a] # CHECK-EL: mul $9, $6, $7 # encoding: [0xe6,0x00,0x10,0x4a] # CHECK-EL: mult $9, $7 # encoding: [0xe9,0x00,0x3c,0x8b] # CHECK-EL: multu $9, $7 # encoding: [0xe9,0x00,0x3c,0x9b] @@ -64,7 +64,7 @@ # CHECK-EB: xori $9, $6, 17767 # encoding: [0x71,0x26,0x45,0x67] # CHECK-EB: xori $9, $6, 17767 # encoding: [0x71,0x26,0x45,0x67] # CHECK-EB: nor $9, $6, $7 # encoding: [0x00,0xe6,0x4a,0xd0] -# CHECK-EB: nor $7, $8, $zero # encoding: [0x00,0x08,0x3a,0xd0] +# CHECK-EB: not $7, $8 # encoding: [0x00,0x08,0x3a,0xd0] # CHECK-EB: mul $9, $6, $7 # encoding: [0x00,0xe6,0x4a,0x10] # CHECK-EB: mult $9, $7 # encoding: [0x00,0xe9,0x8b,0x3c] # CHECK-EB: multu $9, $7 # encoding: [0x00,0xe9,0x9b,0x3c] |