[llvm] r306687 - [llvm-objdump] Handle invalid instruction gracefully on ARM
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 08:38:47 PDT 2017
Author: evgeny777
Date: Thu Jun 29 08:38:47 2017
New Revision: 306687
URL: http://llvm.org/viewvc/llvm-project?rev=306687&view=rev
Log:
[llvm-objdump] Handle invalid instruction gracefully on ARM
Differential revision: https://reviews.llvm.org/D34813
Added:
llvm/trunk/test/tools/llvm-objdump/ARM/invalid-instruction.s
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=306687&r1=306686&r2=306687&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Thu Jun 29 08:38:47 2017
@@ -486,7 +486,7 @@ DecodeStatus ARMDisassembler::getInstruc
}
}
- Size = 0;
+ Size = 4;
return MCDisassembler::Fail;
}
Added: llvm/trunk/test/tools/llvm-objdump/ARM/invalid-instruction.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/ARM/invalid-instruction.s?rev=306687&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/ARM/invalid-instruction.s (added)
+++ llvm/trunk/test/tools/llvm-objdump/ARM/invalid-instruction.s Thu Jun 29 08:38:47 2017
@@ -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>
More information about the llvm-commits
mailing list