diff options
author | Johnny Chen <johnny.chen@apple.com> | 2010-08-12 20:46:17 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2010-08-12 20:46:17 +0000 |
commit | 1adc40cac314b0a77b790b094bca146a3a868452 (patch) | |
tree | d2fa4aeb530f1165aece9bfbdc393780c11dc4af /lib/Target/ARM/ARM.h | |
parent | fff2c4726baa0d6c9cb184c815677e33c0357c93 (diff) |
Cleaned up the for-disassembly-only entries in the arm instruction table so that
the memory barrier variants (other than 'SY' full system domain read and write)
are treated as one instruction with option operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARM.h')
-rw-r--r-- | lib/Target/ARM/ARM.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARM.h b/lib/Target/ARM/ARM.h index 233706735e..e76791921e 100644 --- a/lib/Target/ARM/ARM.h +++ b/lib/Target/ARM/ARM.h @@ -90,6 +90,33 @@ inline static const char *ARMCondCodeToString(ARMCC::CondCodes CC) { } } +namespace ARM_MB { + // The Memory Barrier Option constants map directly to the 4-bit encoding of + // the option field for memory barrier operations. + enum MemBOpt { + ST = 14, + ISH = 11, + ISHST = 10, + NSH = 7, + NSHST = 6, + OSH = 3, + OSHST = 2 + }; + + inline static const char *MemBOptToString(unsigned val) { + switch (val) { + default: llvm_unreachable("Unknown memory opetion"); + case ST: return "st"; + case ISH: return "ish"; + case ISHST: return "ishst"; + case NSH: return "nsh"; + case NSHST: return "nshst"; + case OSH: return "osh"; + case OSHST: return "oshst"; + } + } +} // namespace ARM_MB + FunctionPass *createARMISelDag(ARMBaseTargetMachine &TM, CodeGenOpt::Level OptLevel); |