mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00:00
fix an encoding mismatch where "sal %eax, 1" was not using the short encoding
for shl. Caught by inspection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117820 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8b260a7644
commit
1a1ecc9f3c
@ -783,7 +783,7 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
|
|||||||
// FIXME: Hack to handle recognize s{hr,ar,hl} $1, <op>. Canonicalize to
|
// FIXME: Hack to handle recognize s{hr,ar,hl} $1, <op>. Canonicalize to
|
||||||
// "shift <op>".
|
// "shift <op>".
|
||||||
if ((Name.startswith("shr") || Name.startswith("sar") ||
|
if ((Name.startswith("shr") || Name.startswith("sar") ||
|
||||||
Name.startswith("shl")) &&
|
Name.startswith("shl") || Name.startswith("sal")) &&
|
||||||
Operands.size() == 3) {
|
Operands.size() == 3) {
|
||||||
X86Operand *Op1 = static_cast<X86Operand*>(Operands[1]);
|
X86Operand *Op1 = static_cast<X86Operand*>(Operands[1]);
|
||||||
if (Op1->isImm() && isa<MCConstantExpr>(Op1->getImm()) &&
|
if (Op1->isImm() && isa<MCConstantExpr>(Op1->getImm()) &&
|
||||||
|
@ -57,6 +57,11 @@ rdtscp
|
|||||||
// CHECK: shrl %eax # encoding: [0xd1,0xe8]
|
// CHECK: shrl %eax # encoding: [0xd1,0xe8]
|
||||||
shrl $1, %eax
|
shrl $1, %eax
|
||||||
|
|
||||||
|
// CHECK: shll %eax # encoding: [0xd1,0xe0]
|
||||||
|
sall $1, %eax
|
||||||
|
// CHECK: shll %eax # encoding: [0xd1,0xe0]
|
||||||
|
sal $1, %eax
|
||||||
|
|
||||||
// moffset forms of moves, rdar://7947184
|
// moffset forms of moves, rdar://7947184
|
||||||
movb 0, %al // CHECK: movb 0, %al # encoding: [0xa0,A,A,A,A]
|
movb 0, %al // CHECK: movb 0, %al # encoding: [0xa0,A,A,A,A]
|
||||||
movw 0, %ax // CHECK: movw 0, %ax # encoding: [0x66,0xa1,A,A,A,A]
|
movw 0, %ax // CHECK: movw 0, %ax # encoding: [0x66,0xa1,A,A,A,A]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user