summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc/llvm-mc.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner2009-08-231-6/+8
| | | | | | | | | | | | | | | | instead of as two bools. Use this to add a F_Append flag which has the obvious behavior. Other unrelated changes conflated into this patch: 1. REmove EH stuff from llvm-dis and llvm-as, the try blocks are dead. 2. Simplify the filename inference code in llvm-as/llvm-dis, because raw_fd_ostream does the right thing with '-'. 3. Switch machine verifier to use raw_ostream instead of ostream (Which is the thing that needed append in the first place). llvm-svn: 79807
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-221-1/+1
| | | | llvm-svn: 79763
* llvm-mc: Start MCAssembler and MCMachOStreamer.Daniel Dunbar2009-08-211-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Together these form the (Mach-O) back end of the assembler. - MCAssembler is the actual assembler backend, which is designed to have a reasonable API. This will eventually grow to support multiple object file implementations, but for now its Mach-O/i386 only. - MCMachOStreamer adapts the MCStreamer "actions" API to the MCAssembler API, e.g. converting the various directives into fragments, managing state like the current section, and so on. - llvm-mc will use the new backend via '-filetype=obj', which may eventually be, but is not yet, since I hear that people like assemblers which actually assemble. - The only thing that works at the moment is changing sections. For the time being I have a Python Mach-O dumping tool in test/scripts so this stuff can be easily tested, eventually I expect to replace this with a real LLVM tool. - More doxyments to come. I assume that since this stuff doesn't touch any of the things which are part of 2.6 that it is ok to put this in not so long before the freeze, but if someone objects let me know, I can pull it. llvm-svn: 79612
* Fix a commento.Daniel Dunbar2009-08-191-1/+1
| | | | llvm-svn: 79427
* give MCAsmStreamer a TargetAsmInfo.Chris Lattner2009-08-171-9/+9
| | | | llvm-svn: 79222
* Update llvm-mc / MCAsmStreamer to print the instruction using the actual targetDaniel Dunbar2009-08-141-21/+42
| | | | | | | | | | | specific printer (this only works on x86, for now). - This makes it possible to do some correctness checking of the parsing and matching, since we can compare the results of 'as' on the original input, to those of 'as' on the output from llvm-mc. - In theory, we could now have an easy ATT -> Intel syntax converter. :) llvm-svn: 78986
* llvm-mc: Honor -o option (and add -f).Daniel Dunbar2009-08-111-2/+35
| | | | llvm-svn: 78640
* split MachO section handling stuff out to its out .h/.cpp file.Chris Lattner2009-08-101-1/+1
| | | | llvm-svn: 78576
* Make the big switch: Change MCSectionMachO to represent a section *semantically*Chris Lattner2009-08-101-5/+4
| | | | | | | | | | | | | | | | instead of syntactically as a string. This means that it keeps track of the segment, section, flags, etc directly and asmprints them in the right format. This also includes parsing and validation support for llvm-mc and "attribute(section)", so we should now start getting errors about invalid section attributes from the compiler instead of the assembler on darwin. Still todo: 1) Uniquing of darwin mcsections 2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h] 3) there are a few FIXMEs, for example what is the syntax to get the S_GB_ZEROFILL segment type? llvm-svn: 78547
* sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner2009-08-081-1/+1
| | | | | | | | classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) llvm-svn: 78517
* switch this to create coff sections for now, it doesn't really matter for Chris Lattner2009-08-081-1/+1
| | | | | | | llvm-mc's purpose yet and we'll want to switch to creating semantic sections at some point. llvm-svn: 78509
* Remove now unused arguments from TargetRegistry::lookupTarget.Daniel Dunbar2009-08-031-5/+1
| | | | llvm-svn: 77950
* Make SectionKind::get() private.Chris Lattner2009-08-021-1/+1
| | | | llvm-svn: 77835
* update for API change.Chris Lattner2009-08-011-0/+1
| | | | llvm-svn: 77804
* All MCSections are now required to have a SectionKind.Chris Lattner2009-08-011-1/+3
| | | | llvm-svn: 77787
* fix a bunch of failing tests now that MCContext::GetSection doesn't create ↵Chris Lattner2009-07-311-2/+3
| | | | | | sections. llvm-svn: 77689
* Move X86 instruction parsing into X86/AsmParser.Daniel Dunbar2009-07-281-0/+1
| | | | llvm-svn: 77384
* Provide generic MCAsmParser when constructing target specific parsers.Daniel Dunbar2009-07-281-14/+20
| | | | llvm-svn: 77362
* Switch AsmLexer::Lex to returning a reference to the current token.Daniel Dunbar2009-07-281-5/+2
| | | | llvm-svn: 77328
* Drop some AsmLexer methods in favor of their AsmToken equivalents.Daniel Dunbar2009-07-281-4/+4
| | | | llvm-svn: 77323
* llvm-mc: Sink token enum into AsmToken.Daniel Dunbar2009-07-281-36/+36
| | | | llvm-svn: 77322
* Factor commonality in triple match routines into helper template for registeringDaniel Dunbar2009-07-261-3/+3
| | | | | | classes, and migrate existing targets over. llvm-svn: 77126
* Add TargetRegistry::lookupTarget.Daniel Dunbar2009-07-261-1/+4
| | | | | | | | | | | | | | - This is a simplified mechanism which just looks up a target based on the target triple, with a few additional flags. - Remove getClosestStaticTargetForModule, the moral equivalent is now: lookupTarget(Mod->getTargetTriple, true, false, ...); - This no longer does the fuzzy matching with target data (based on endianness and pointer width) that getClosestStaticTargetForModule was doing, but this was deemed unnecessary. llvm-svn: 77111
* Add MCAsmParser interface.Daniel Dunbar2009-07-201-2/+3
| | | | | | | - This provides the AsmParser interface to the target specific assembly parsers. llvm-svn: 76453
* llvm-mc: Default -triple to LLVM_HOSTTRIPLE.Daniel Dunbar2009-07-171-1/+1
| | | | llvm-svn: 76260
* llvm-mc: Add -triple, and start fetching the target asm printer.Daniel Dunbar2009-07-171-0/+29
| | | | llvm-svn: 76257
* llvm-mc: Fill in the rest of tokens for 'as-lex' mode.Daniel Dunbar2009-07-011-11/+23
| | | | llvm-svn: 74598
* add some of the new tokens, others are still missing.Chris Lattner2009-07-011-10/+17
| | | | llvm-svn: 74595
* Normalize SourceMgr messages.Daniel Dunbar2009-06-301-1/+1
| | | | | | | | | | | | - Don't print "Parsing" in front of every message. - Take additional "type" argument which is prepended to the message (with ": ") if given. - Update clients to print errors (warnings) as: <filename>:<line number>: error(warning): ... llvm-svn: 74489
* Basic .s parsing for .asci[iz], .fill, .space, {.byte, .short, ... }Daniel Dunbar2009-06-241-0/+4
| | | | | | | - Includes some DG tests in test/MC/AsmParser, which are rather primitive since we don't have a -verify mode yet. llvm-svn: 74139
* add trivial support for passing label definitions through the MCStreamer.Chris Lattner2009-06-241-2/+1
| | | | | | | This is suboptimal in several aspects, see the commented out assertion. I need to talk to Daniel about this. llvm-svn: 74057
* create an MCStreamer and provide it to AsmParser.Chris Lattner2009-06-241-1/+7
| | | | llvm-svn: 74039
* Implement full support for parsing primary expressions. We can now parseChris Lattner2009-06-221-0/+1
| | | | | | | | | | | all of health and voronoi (ignoring directives). We only get 409 lines into 176.gcc though because we don't have binary operators yet: Parsing 176.gcc.llc.s:409: unexpected token in operand list movsbl _arityvec+1(,%edi,8), %eax ^ llvm-svn: 73877
* rename SourceMgr::PrintError to PrintMessage.Chris Lattner2009-06-211-1/+1
| | | | llvm-svn: 73861
* stub out parser for asm files. Change invariant on lexer to alwaysChris Lattner2009-06-211-8/+43
| | | | | | | | print its error message when it returns an asmtok::Error token. Compute a proper error code for llvm-mc in 'lex' mode. Add new -as-lex option to enable lexing mode (vs parsing mode). llvm-svn: 73859
* add string literals.Chris Lattner2009-06-211-0/+3
| | | | llvm-svn: 73858
* implement enough of a lexer to get through Olden/health/Output/health.llc.sChris Lattner2009-06-211-2/+14
| | | | | | without errors. llvm-svn: 73855
* some baby steps.Chris Lattner2009-06-211-2/+22
| | | | llvm-svn: 73848
* start wiring up support for asm parsing.Chris Lattner2009-06-211-12/+45
| | | | llvm-svn: 73846
* fix file headerChris Lattner2009-06-181-7/+3
| | | | llvm-svn: 73733
* Add a skeleton driver for new machine code level fun. llvm-mc is meantChris Lattner2009-06-181-0/+61
to be a test driver of other components in the system, which will develop over time. llvm-svn: 73732
OpenPOWER on IntegriCloud