diff options
author | James Molloy <james.molloy@arm.com> | 2012-02-09 10:56:31 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2012-02-09 10:56:31 +0000 |
commit | d9ba4fd48f4f801b2f1f8e8e7ef21409d95cf648 (patch) | |
tree | c02c0353336fcfd417d7968efa396a95b1725391 /llvm/lib/Target/ARM | |
parent | 7345626a5b86bc6c7ff2f86050ad255b16283f40 (diff) | |
download | bcm5719-llvm-d9ba4fd48f4f801b2f1f8e8e7ef21409d95cf648.tar.gz bcm5719-llvm-d9ba4fd48f4f801b2f1f8e8e7ef21409d95cf648.zip |
Teach the MC and disassembler about SoftFail, and hook it up to UNPREDICTABLE on ARM. Wire this to tBLX in order to provide test coverage.
llvm-svn: 150169
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrFormats.td | 8 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrThumb.td | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrFormats.td b/llvm/lib/Target/ARM/ARMInstrFormats.td index 0c10b01b6c7..81229f47790 100644 --- a/llvm/lib/Target/ARM/ARMInstrFormats.td +++ b/llvm/lib/Target/ARM/ARMInstrFormats.td @@ -290,6 +290,14 @@ class InstTemplate<AddrMode am, int sz, IndexMode im, class Encoding { field bits<32> Inst; + // Mask of bits that cause an encoding to be UNPREDICTABLE. + // If a bit is set, then if the corresponding bit in the + // target encoding differs from its value in the "Inst" field, + // the instruction is UNPREDICTABLE (SoftFail in abstract parlance). + field bits<32> Unpredictable = 0; + // SoftFail is the generic name for this field, but we alias it so + // as to make it more obvious what it means in ARM-land. + field bits<32> SoftFail = Unpredictable; } class InstARM<AddrMode am, int sz, IndexMode im, diff --git a/llvm/lib/Target/ARM/ARMInstrThumb.td b/llvm/lib/Target/ARM/ARMInstrThumb.td index 30aa424343c..9bbf8e60320 100644 --- a/llvm/lib/Target/ARM/ARMInstrThumb.td +++ b/llvm/lib/Target/ARM/ARMInstrThumb.td @@ -387,6 +387,7 @@ let isBranch = 1, isTerminator = 1, isBarrier = 1, isIndirectBranch = 1 in { bits<4> Rm; let Inst{6-3} = Rm; let Inst{2-0} = 0b000; + let Unpredictable{2-0} = 0b111; } } |