diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-09 05:47:46 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-09 05:47:46 +0000 |
commit | ffc0e73046f737d75e0a62b3a83ef19bcef111e3 (patch) | |
tree | 1f82f6a0b1c1a743dd4c10377858004988a47262 /include/llvm/MC/MCSubtargetInfo.h | |
parent | 4f4a6fcd165293c347a42b543e5e55aa42a09bb2 (diff) | |
download | llvm-ffc0e73046f737d75e0a62b3a83ef19bcef111e3.tar.gz llvm-ffc0e73046f737d75e0a62b3a83ef19bcef111e3.tar.bz2 llvm-ffc0e73046f737d75e0a62b3a83ef19bcef111e3.tar.xz |
Change createAsmParser to take a MCSubtargetInfo instead of triple,
CPU, and feature string. Parsing some asm directives can change
subtarget state (e.g. .code 16) and it must be reflected in other
modules (e.g. MCCodeEmitter). That is, the MCSubtargetInfo instance
must be shared.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSubtargetInfo.h')
-rw-r--r-- | include/llvm/MC/MCSubtargetInfo.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/MC/MCSubtargetInfo.h b/include/llvm/MC/MCSubtargetInfo.h index c66150b17e..a9e46371ad 100644 --- a/include/llvm/MC/MCSubtargetInfo.h +++ b/include/llvm/MC/MCSubtargetInfo.h @@ -34,7 +34,8 @@ class MCSubtargetInfo { const unsigned *ForwardingPathes; // Forwarding pathes unsigned NumFeatures; // Number of processor features unsigned NumProcs; // Number of processors - uint64_t FeatureBits; // Feature bits for current CPU + + uint64_t FeatureBits; // Feature bits for current CPU + FS public: void InitMCSubtargetInfo(StringRef CPU, StringRef FS, @@ -54,6 +55,14 @@ public: /// feature string), recompute and return feature bits. uint64_t ReInitMCSubtargetInfo(StringRef CPU, StringRef FS); + /// ToggleFeature - Toggle a feature and returns the re-computed feature + /// bits. This version does not change the implied bits. + uint64_t ToggleFeature(uint64_t FB); + + /// ToggleFeature - Toggle a feature and returns the re-computed feature + /// bits. This version will also change all implied bits. + uint64_t ToggleFeature(StringRef FS); + /// getInstrItineraryForCPU - Get scheduling itinerary of a CPU. /// InstrItineraryData getInstrItineraryForCPU(StringRef CPU) const; |