From d9ba4fd48f4f801b2f1f8e8e7ef21409d95cf648 Mon Sep 17 00:00:00 2001 From: James Molloy Date: Thu, 9 Feb 2012 10:56:31 +0000 Subject: 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 --- llvm/lib/Target/ARM/ARMInstrFormats.td | 8 ++++++++ llvm/lib/Target/ARM/ARMInstrThumb.td | 1 + 2 files changed, 9 insertions(+) (limited to 'llvm/lib/Target/ARM') 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 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 Rm; let Inst{6-3} = Rm; let Inst{2-0} = 0b000; + let Unpredictable{2-0} = 0b111; } } -- cgit v1.2.3