diff options
| author | Owen Anderson <resistor@mac.com> | 2011-07-19 21:06:00 +0000 | 
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2011-07-19 21:06:00 +0000 | 
| commit | f1a009007374d8ae1c1565f34d9cea3b83665e5f (patch) | |
| tree | 546404412f9abe6eedc1f6413ab3b9e7bca79c54 /lib | |
| parent | bdd83fe382d6c3d6fc73aa7142e73f30cbd4dfad (diff) | |
| download | external_llvm-f1a009007374d8ae1c1565f34d9cea3b83665e5f.zip external_llvm-f1a009007374d8ae1c1565f34d9cea3b83665e5f.tar.gz external_llvm-f1a009007374d8ae1c1565f34d9cea3b83665e5f.tar.bz2  | |
Enhance the FixedLengthDecoder to be able to generate plausible-looking decoders for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135524 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Target/ARM/ARMInstrFormats.td | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMInstrFormats.td b/lib/Target/ARM/ARMInstrFormats.td index 3ccf22f..fe77f2f 100644 --- a/lib/Target/ARM/ARMInstrFormats.td +++ b/lib/Target/ARM/ARMInstrFormats.td @@ -262,13 +262,17 @@ class Encoding {  class InstARM<AddrMode am, int sz, IndexMode im,                Format f, Domain d, string cstr, InstrItinClass itin> -  : InstTemplate<am, sz, im, f, d, cstr, itin>, Encoding; +  : InstTemplate<am, sz, im, f, d, cstr, itin>, Encoding { +  let DecoderNamespace = "ARM"; +}  // This Encoding-less class is used by Thumb1 to specify the encoding bits later  // on by adding flavors to specific instructions.  class InstThumb<AddrMode am, int sz, IndexMode im,                  Format f, Domain d, string cstr, InstrItinClass itin> -  : InstTemplate<am, sz, im, f, d, cstr, itin>; +  : InstTemplate<am, sz, im, f, d, cstr, itin> { +  let DecoderNamespace = "Thumb"; +}  class PseudoInst<dag oops, dag iops, InstrItinClass itin, list<dag> pattern>    : InstTemplate<AddrModeNone, 0, IndexModeNone, Pseudo, @@ -1071,6 +1075,7 @@ class Thumb2I<dag oops, dag iops, AddrMode am, int sz,    let AsmString = !strconcat(opc, "${p}", asm);    let Pattern = pattern;    list<Predicate> Predicates = [IsThumb2]; +  let DecoderNamespace = "Thumb2";  }  // Same as Thumb2I except it can optionally modify CPSR. Note it's modeled as an @@ -1091,6 +1096,7 @@ class Thumb2sI<dag oops, dag iops, AddrMode am, int sz,    let AsmString = !strconcat(opc, "${s}${p}", asm);    let Pattern = pattern;    list<Predicate> Predicates = [IsThumb2]; +  let DecoderNamespace = "Thumb2";  }  // Special cases @@ -1103,6 +1109,7 @@ class Thumb2XI<dag oops, dag iops, AddrMode am, int sz,    let AsmString = asm;    let Pattern = pattern;    list<Predicate> Predicates = [IsThumb2]; +  let DecoderNamespace = "Thumb2";  }  class ThumbXI<dag oops, dag iops, AddrMode am, int sz, @@ -1114,6 +1121,7 @@ class ThumbXI<dag oops, dag iops, AddrMode am, int sz,    let AsmString = asm;    let Pattern = pattern;    list<Predicate> Predicates = [IsThumb, IsThumb1Only]; +  let DecoderNamespace = "Thumb";  }  class T2I<dag oops, dag iops, InstrItinClass itin, @@ -1183,6 +1191,7 @@ class T2Iidxldst<bit signed, bits<2> opcod, bit load, bit pre,    let AsmString = !strconcat(opc, "${p}", asm);    let Pattern = pattern;    list<Predicate> Predicates = [IsThumb2]; +  let DecoderNamespace = "Thumb2";    let Inst{31-27} = 0b11111;    let Inst{26-25} = 0b00;    let Inst{24}    = signed;  | 
