[PATCH] D34813: [llvm-objdump] Handle invalid instruction gracefully on ARM
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 08:39:03 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL306687: [llvm-objdump] Handle invalid instruction gracefully on ARM (authored by evgeny777).
Changed prior to commit:
https://reviews.llvm.org/D34813?vs=104640&id=104659#toc
Repository:
rL LLVM
https://reviews.llvm.org/D34813
Files:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
llvm/trunk/test/tools/llvm-objdump/ARM/invalid-instruction.s
Index: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
@@ -486,7 +486,7 @@
}
}
- Size = 0;
+ Size = 4;
return MCDisassembler::Fail;
}
Index: llvm/trunk/test/tools/llvm-objdump/ARM/invalid-instruction.s
===================================================================
--- llvm/trunk/test/tools/llvm-objdump/ARM/invalid-instruction.s
+++ llvm/trunk/test/tools/llvm-objdump/ARM/invalid-instruction.s
@@ -0,0 +1,9 @@
+ at RUN: llvm-mc -triple arm-unknown-linux -filetype=obj %s | llvm-objdump -d - | FileCheck %s
+
+.text
+ b l0
+ .inst 0xffffffff
+l0:
+
+ at CHECK: 0: 00 00 00 ea b #0 <l0>
+ at CHECK-NEXT: 4: ff ff ff ff <unknown>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34813.104659.patch
Type: text/x-patch
Size: 869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170629/dd5e06be/attachment.bin>
More information about the llvm-commits
mailing list