aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC
AgeCommit message (Collapse)AuthorFilesLines
2011-07-27Support .code32 and .code64 in X86 assembler.Evan Cheng5-7/+13
llvm-svn: 136197
2011-07-26Remove one last reference to Target in MC library.Evan Cheng1-1/+1
llvm-svn: 136145
2011-07-26Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to ↵Evan Cheng9-23/+25
MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. llvm-svn: 136027
2011-07-25TargetAsmBackend has been renamed to MCAsmBackend.Evan Cheng1-1/+1
llvm-svn: 136012
2011-07-25Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng13-38/+36
createMCAsmBackend. llvm-svn: 136010
2011-07-25Add a missing enumerator to this switch. Currently its in theChandler Carruth1-0/+1
assert-path code, as previously we would have fallen off the end of the function, but please review and let me know if this should go somewhere else. This fixes a Clang warning: lib/MC/MCMachOStreamer.cpp:201:11: error: enumeration value 'MCSA_IndirectSymbol' not handled in switch [-Werror,-Wswitch-enum] switch (Attribute) { ^ 1 error generated. llvm-svn: 135976
2011-07-25Separate MCInstPrinter registration from AsmPrinter registration.Evan Cheng2-2/+0
llvm-svn: 135974
2011-07-25Fix last bits of MC layer issues. llvm-mc doesn't need to initialize ↵Evan Cheng2-26/+8
TargetMachine's anymore. llvm-svn: 135963
2011-07-25Refactor X86 target to separate MC code from Target code.Evan Cheng2-2/+2
llvm-svn: 135930
2011-07-25Move some ELF directives into ELF asm parser.Jim Grosbach4-12/+78
The .local, .hidden, .internal, and .protected are not legal for all supported file formats (in particular, they're invalid for MachO). Move the parsing for them into the ELF assembly parser since that's the format they're for. Similarly, .weak is used by COFF and ELF, but not MachO, so move the parsing to the COFF and ELF asm parsers. Previously, using any of these directives on Darwin would result in an assertion failure in the parser; now we get a diagnostic as we should. rdar://9827089 llvm-svn: 135921
2011-07-25Tidy up. 80 columns.Jim Grosbach1-5/+10
llvm-svn: 135917
2011-07-23Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng18-19/+34
they belong. llvm-svn: 135833
2011-07-23Sink ARM mc routines into MCTargetDesc.Evan Cheng1-1/+1
llvm-svn: 135825
2011-07-22Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,Evan Cheng2-7/+3
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. llvm-svn: 135812
2011-07-22Emit the __compact_unwind section first. If there are any frames which weren'tBill Wendling1-14/+27
emitted, emit them next as CIE/FDEs. llvm-svn: 135807
2011-07-20X86 is the only target that uses coff format. This should fixes test ↵Evan Cheng1-2/+3
failures running on Windows, Cygwin, or MingW hosts. llvm-svn: 135639
2011-07-20Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng8-44/+61
There is still a bit more refactoring left to do in Targets. But we are now very close to fixing all the layering issues in MC. llvm-svn: 135611
2011-07-20Initialize the EHFrameSection pointer to zero.Benjamin Kramer1-0/+1
This should fix the spurious buildbot errors. llvm-svn: 135594
2011-07-20- Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng1-1/+2
- Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. llvm-svn: 135580
2011-07-20Include MCRegisterInfo to eliminate a compilation warning.Evan Cheng1-1/+2
llvm-svn: 135575
2011-07-20Fix the CMake build.Francois Pichet1-0/+1
llvm-svn: 135573
2011-07-20Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng8-24/+568
TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! llvm-svn: 135569
2011-07-19Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng4-0/+23
(including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
2011-07-19Micro-opt: Only emit compact unwind if there is a compact unwind encoding to ↵Bill Wendling1-1/+1
emit. llvm-svn: 135452
2011-07-19Use the CompactUnwindEncoding from the Frame, if it's defined.Bill Wendling1-7/+2
llvm-svn: 135451
2011-07-19Add a method to set compact unwind encoding information in a frame.Bill Wendling1-0/+6
llvm-svn: 135449
2011-07-19Fixed a bug where the MC subtarget informationSean Callanan1-0/+1
wasn't being initialized by the enhanced disassembler, leading to assertion failures. llvm-svn: 135447
2011-07-18Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions forEvan Cheng1-1/+2
better location welcome). llvm-svn: 135438
2011-07-18Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng9-20/+48
to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. llvm-svn: 135424
2011-07-15Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatestEvan Cheng6-40/+42
solution but it is a small step towards removing the horror that is TargetAsmInfo. llvm-svn: 135237
2011-07-15Remove setting the bit for personality function. It should be set by the linker.Bill Wendling1-3/+0
llvm-svn: 135236
2011-07-15Encode that we have a personality function.Bill Wendling1-0/+3
llvm-svn: 135227
2011-07-14Rename createAsmInfo to createMCAsmInfo and move registration code to ↵Evan Cheng2-2/+4
MCTargetDesc to prepare for next round of changes. llvm-svn: 135219
2011-07-14* If we have an LSDA, we need to mark it in the encoding.Bill Wendling1-1/+5
* The personality function should be encoded as an absolute pointer to the function. llvm-svn: 135215
2011-07-14Unfortunately several files in MC are badly violating layering rule by usingEvan Cheng7-14/+19
TargetAsmInfo, which in turn pulls in TargetRegisterInfo, etc. :-( There are other cases of violations, but this is probably the worst. This patch is but one small step towards fixing this. 500 more steps to go. :-( llvm-svn: 135131
2011-07-13Update MCParsedAsmOperand debug methods.Jim Grosbach2-2/+6
Update the debug output interface for MCParsedAsmOperand to have a print() method which takes an output stream argument, an << operator which invokes the print method using the given stream, and a dump() method which prints the operand to the dbgs() stream. This makes the interface more consistent with the rest of LLVM, and more convenient to use at the debugger command line. llvm-svn: 135043
2011-07-13Don't emit the FDE end label if the last thing emitted was a compact unwind andBill Wendling1-1/+3
not the FDE llvm-svn: 135020
2011-07-11Resynchronize EDInfo.h and EDEmitter.cpp.Shantonu Sen2-11/+29
The enum names as well as order (i.e. value) had skewed, which means that consumers of the tablegen-ed table would see different values than intended. Make both files have a superset of enums, and add classification as needed for numMCOperands. Reviewed by Owen Anderson llvm-svn: 134905
2011-07-11- Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfoEvan Cheng1-8/+11
and MCSubtargetInfo. - Added methods to update subtarget features (used when targets automatically detect subtarget features or switch modes). - Teach X86Subtarget to update MCSubtargetInfo features bits since the MCSubtargetInfo layer can be shared with other modules. - These fixes .code 16 / .code 32 support since mode switch is updated in MCSubtargetInfo so MC code emitter can do the right thing. llvm-svn: 134884
2011-07-09Change createAsmParser to take a MCSubtargetInfo instead of triple,Evan Cheng3-1/+52
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. llvm-svn: 134795
2011-07-08Fix comment.Evan Cheng1-1/+1
llvm-svn: 134763
2011-07-08TargetAsmParser doesn't need reference to Target.Evan Cheng1-2/+2
llvm-svn: 134721
2011-07-08Eliminate asm parser's dependency on TargetMachine:Evan Cheng2-4/+7
- Each target asm parser now creates its own MCSubtatgetInfo (if needed). - Changed AssemblerPredicate to take subtarget features which tablegen uses to generate asm matcher subtarget feature queries. e.g. "ModeThumb,FeatureThumb2" is translated to "(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0". llvm-svn: 134678
2011-07-07This patch adds a flag in MCAsmInfo that indicates whether dwarf registerAkira Hatanaka2-1/+2
numbers should be printed instead of symbolic register names in MCAsmStreamer::EmitRegisterName. This is necessary because some versions of GNU assembler won't accept code in which symbolic register names are used in cfi directives. There is no change in behavior unless the flag is explicitly set to true by a backend. llvm-svn: 134635
2011-07-07Compute feature bits at time of MCSubtargetInfo initialization.Evan Cheng2-26/+54
llvm-svn: 134606
2011-07-07Add a target hook to encode the compact unwind information.Bill Wendling1-6/+8
llvm-svn: 134577
2011-07-06Clean up the #includes.Bill Wendling1-5/+4
llvm-svn: 134557
2011-07-06createMCInstPrinter doesn't need TargetMachine anymore.Evan Cheng2-3/+2
llvm-svn: 134525
2011-07-02Add getFeatureBits to extract feature bits for a given CPU.Evan Cheng1-0/+8
llvm-svn: 134298
2011-07-01- Added MCSubtargetInfo to capture subtarget features and schedulingEvan Cheng2-0/+45
itineraries. - Refactor TargetSubtarget to be based on MCSubtargetInfo. - Change tablegen generated subtarget info to initialize MCSubtargetInfo and hide more details from targets. llvm-svn: 134257