summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix last bits of MC layer issues. llvm-mc doesn't need to initialize ↵Evan Cheng2011-07-252-26/+8
| | | | | | TargetMachine's anymore. llvm-svn: 135963
* Refactor X86 target to separate MC code from Target code.Evan Cheng2011-07-252-2/+2
| | | | llvm-svn: 135930
* Move some ELF directives into ELF asm parser.Jim Grosbach2011-07-254-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
* Tidy up. 80 columns.Jim Grosbach2011-07-251-5/+10
| | | | llvm-svn: 135917
* Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng2011-07-2318-19/+34
| | | | | | they belong. llvm-svn: 135833
* Sink ARM mc routines into MCTargetDesc.Evan Cheng2011-07-231-1/+1
| | | | llvm-svn: 135825
* Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,Evan Cheng2011-07-222-7/+3
| | | | | | InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. llvm-svn: 135812
* Emit the __compact_unwind section first. If there are any frames which weren'tBill Wendling2011-07-221-14/+27
| | | | | | emitted, emit them next as CIE/FDEs. llvm-svn: 135807
* X86 is the only target that uses coff format. This should fixes test ↵Evan Cheng2011-07-201-2/+3
| | | | | | failures running on Windows, Cygwin, or MingW hosts. llvm-svn: 135639
* Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng2011-07-208-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
* Initialize the EHFrameSection pointer to zero.Benjamin Kramer2011-07-201-0/+1
| | | | | | This should fix the spurious buildbot errors. llvm-svn: 135594
* - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng2011-07-201-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
* Include MCRegisterInfo to eliminate a compilation warning.Evan Cheng2011-07-201-1/+2
| | | | llvm-svn: 135575
* Fix the CMake build.Francois Pichet2011-07-201-0/+1
| | | | llvm-svn: 135573
* Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng2011-07-208-24/+568
| | | | | | | | TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! llvm-svn: 135569
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-194-0/+23
| | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
* Micro-opt: Only emit compact unwind if there is a compact unwind encoding to ↵Bill Wendling2011-07-191-1/+1
| | | | | | emit. llvm-svn: 135452
* Use the CompactUnwindEncoding from the Frame, if it's defined.Bill Wendling2011-07-191-7/+2
| | | | llvm-svn: 135451
* Add a method to set compact unwind encoding information in a frame.Bill Wendling2011-07-191-0/+6
| | | | llvm-svn: 135449
* Fixed a bug where the MC subtarget informationSean Callanan2011-07-191-0/+1
| | | | | | | wasn't being initialized by the enhanced disassembler, leading to assertion failures. llvm-svn: 135447
* Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions forEvan Cheng2011-07-181-1/+2
| | | | | | better location welcome). llvm-svn: 135438
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-189-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
* Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatestEvan Cheng2011-07-156-40/+42
| | | | | | | solution but it is a small step towards removing the horror that is TargetAsmInfo. llvm-svn: 135237
* Remove setting the bit for personality function. It should be set by the linker.Bill Wendling2011-07-151-3/+0
| | | | llvm-svn: 135236
* Encode that we have a personality function.Bill Wendling2011-07-151-0/+3
| | | | llvm-svn: 135227
* Rename createAsmInfo to createMCAsmInfo and move registration code to ↵Evan Cheng2011-07-142-2/+4
| | | | | | MCTargetDesc to prepare for next round of changes. llvm-svn: 135219
* * If we have an LSDA, we need to mark it in the encoding.Bill Wendling2011-07-141-1/+5
| | | | | | * The personality function should be encoded as an absolute pointer to the function. llvm-svn: 135215
* Unfortunately several files in MC are badly violating layering rule by usingEvan Cheng2011-07-147-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
* Update MCParsedAsmOperand debug methods.Jim Grosbach2011-07-132-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
* Don't emit the FDE end label if the last thing emitted was a compact unwind andBill Wendling2011-07-131-1/+3
| | | | | | not the FDE llvm-svn: 135020
* Resynchronize EDInfo.h and EDEmitter.cpp.Shantonu Sen2011-07-112-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
* - Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfoEvan Cheng2011-07-111-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
* Change createAsmParser to take a MCSubtargetInfo instead of triple,Evan Cheng2011-07-093-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
* Fix comment.Evan Cheng2011-07-081-1/+1
| | | | llvm-svn: 134763
* TargetAsmParser doesn't need reference to Target.Evan Cheng2011-07-081-2/+2
| | | | llvm-svn: 134721
* Eliminate asm parser's dependency on TargetMachine:Evan Cheng2011-07-082-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
* This patch adds a flag in MCAsmInfo that indicates whether dwarf registerAkira Hatanaka2011-07-072-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
* Compute feature bits at time of MCSubtargetInfo initialization.Evan Cheng2011-07-072-26/+54
| | | | llvm-svn: 134606
* Add a target hook to encode the compact unwind information.Bill Wendling2011-07-071-6/+8
| | | | llvm-svn: 134577
* Clean up the #includes.Bill Wendling2011-07-061-5/+4
| | | | llvm-svn: 134557
* createMCInstPrinter doesn't need TargetMachine anymore.Evan Cheng2011-07-062-3/+2
| | | | llvm-svn: 134525
* Add getFeatureBits to extract feature bits for a given CPU.Evan Cheng2011-07-021-0/+8
| | | | llvm-svn: 134298
* - Added MCSubtargetInfo to capture subtarget features and schedulingEvan Cheng2011-07-012-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
* Eliminate one extra conversion.Evan Cheng2011-07-011-1/+1
| | | | llvm-svn: 134240
* Another misuse of StringRef. MSVC is very sensitive to that kind of error.Francois Pichet2011-07-011-2/+2
| | | | llvm-svn: 134236
* Fix use after free.Rafael Espindola2011-07-011-1/+1
| | | | llvm-svn: 134234
* Switch SubtargetFeatures from std::string to StringRef.Evan Cheng2011-07-011-22/+19
| | | | llvm-svn: 134219
* Remove tabs.Bill Wendling2011-06-301-6/+6
| | | | llvm-svn: 134212
* Improve comment: Show the register the DWARF label is added to.Bill Wendling2011-06-301-1/+2
| | | | llvm-svn: 134209
* Add one more comment to the FDE verbose asm output.Bill Wendling2011-06-301-0/+1
| | | | llvm-svn: 134200
OpenPOWER on IntegriCloud