[PATCH] ARM: rGPR is meant to be unpredictable, not undefined
Amaury de la Vieuville
amaury.dlv at gmail.com
Fri Jun 21 08:34:23 PDT 2013
Hi rengolin, t.p.northover,
http://llvm-reviews.chandlerc.com/D1018
Files:
lib/Target/ARM/Disassembler/ARMDisassembler.cpp
test/MC/Disassembler/ARM/invalid-LDRD_PRE-thumb.txt
test/MC/Disassembler/ARM/invalid-t2STRD_PRE-thumb.txt
Index: lib/Target/ARM/Disassembler/ARMDisassembler.cpp
===================================================================
--- lib/Target/ARM/Disassembler/ARMDisassembler.cpp
+++ lib/Target/ARM/Disassembler/ARMDisassembler.cpp
@@ -916,8 +916,11 @@
static DecodeStatus DecoderGPRRegisterClass(MCInst &Inst, unsigned RegNo,
uint64_t Address, const void *Decoder) {
- if (RegNo == 13 || RegNo == 15) return MCDisassembler::Fail;
- return DecodeGPRRegisterClass(Inst, RegNo, Address, Decoder);
+ DecodeStatus S = MCDisassembler::Success;
+ if (RegNo == 13 || RegNo == 15)
+ S = MCDisassembler::SoftFail;
+ Check(S, DecodeGPRRegisterClass(Inst, RegNo, Address, Decoder));
+ return S;
}
static const uint16_t SPRDecoderTable[] = {
Index: test/MC/Disassembler/ARM/invalid-LDRD_PRE-thumb.txt
===================================================================
--- test/MC/Disassembler/ARM/invalid-LDRD_PRE-thumb.txt
+++ test/MC/Disassembler/ARM/invalid-LDRD_PRE-thumb.txt
@@ -1,4 +1,4 @@
-# RUN: llvm-mc --disassemble %s -triple=thumbv7-apple-darwin9 2>&1 | grep "invalid instruction encoding"
+# RUN: llvm-mc --disassemble %s -triple=thumbv7-apple-darwin9 2>&1 | grep "potentially undefined"
# Opcode=1930 Name=t2LDRD_PRE Format=ARM_FORMAT_THUMBFRM(25)
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Index: test/MC/Disassembler/ARM/invalid-t2STRD_PRE-thumb.txt
===================================================================
--- test/MC/Disassembler/ARM/invalid-t2STRD_PRE-thumb.txt
+++ test/MC/Disassembler/ARM/invalid-t2STRD_PRE-thumb.txt
@@ -1,5 +1,4 @@
-# RUN: llvm-mc --disassemble %s -triple=thumbv7-apple-darwin9 2>&1 | grep "invalid instruction encoding"
-# XFAIL: *
+# RUN: llvm-mc --disassemble %s -triple=thumbv7-apple-darwin9 2>&1 | grep "potentially undefined"
# Opcode=2124 Name=t2STRD_PRE Format=ARM_FORMAT_THUMBFRM(25)
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1018.1.patch
Type: text/x-patch
Size: 2045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130621/780921b3/attachment.bin>
More information about the llvm-commits
mailing list