• Home
  • History
  • Annotate
  • only in /external/llvm/include/llvm/MC/
History log of /external/llvm/include/llvm/MC/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
44d798d9763bc32aaf49fe7c10d604845f4b6685 18-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Add support for a new extension to the .file directive:

.file filenumber "directory" "filename"

This removes one join+split of the directory+filename in MC internals. Because
bitcode files have independent fields for directory and filenames in debug info,
this patch may change the .o files written by existing .bc files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142300 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CStreamer.h
9ca9acfaff3c5e9f9dc86b830ef0255610e254e7 17-Oct-2011 Owen Anderson <resistor@mac.com> Use the correct predicate for determining if a branch is conditional or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142257 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrAnalysis.h
b006337bb8217d5c3def4001cbd978a848557882 17-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> MCOperand is pod-like.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142253 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
5efabcf01d1c9cdf7ac59a17d757c6ad4cdb112c 16-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Add AsmToken::getEndLoc and use it to add ranges to x86 asm register parsing.

<stdin>:1:12: error: register %rax is only available in 64-bit mode
incl %rax
^~~~

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142137 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmLexer.h
d8b7aa26134d2abee777f745c32005e63dea2455 16-Oct-2011 Chris Lattner <sabre@nondot.org> Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
the X86 asmparser to produce ranges in the one case that was annoying me, for example:

test.s:10:15: error: invalid operand for instruction
movl 0(%rax), 0(%edx)
^~~~~~~

It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use
ranges where appropriate if someone is interested.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142106 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmParser.h
042aadd8ee1e532e7ef7b6c3d42bcc94e7a6f156 10-Oct-2011 Owen Anderson <resistor@mac.com> MCAtom extending methods need to extend the range of the atom as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141557 91177308-0d34-0410-b5e6-96231b3b80d8
CAtom.h
2fec6c5ff153786744ba7d0d302b73179731c5e9 05-Oct-2011 Owen Anderson <resistor@mac.com> Teach the MC to output code/data region marker labels in MachO and ELF modes. These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141135 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CStreamer.h
9e5887b17e634b98f7c1cf0ee4f25c218097d08e 05-Oct-2011 Kevin Enderby <enderby@apple.com> Adding back support for printing operands symbolically to ARM's new disassembler
using llvm's public 'C' disassembler API now including annotations.

Hooked this up to Darwin's otool(1) so it can again print things like branch
targets for example this:
blx _puts
instead of this:
blx #-36
and includes support for annotations for branches to symbol stubs like:
bl 0x40 @ symbol stub for: _puts
and annotations for pc relative loads like this:
ldr r3, #8 @ literal pool for: Hello, world!
Also again can print the expression encoded in the Mach-O relocation entries for
things like this:
movt r0, :upper16:((_foo-_bar)+1234)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141129 91177308-0d34-0410-b5e6-96231b3b80d8
CDisassembler.h
c291e2f5780c3a8470113a2a58c1fa680cd54b20 25-Sep-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Add target hook for pseudo instruction expansion.

Many targets use pseudo instructions to help register allocation. Like
the COPY instruction, these pseudos can be expanded after register
allocation. The early expansion can make life easier for PEI and the
post-ra scheduler.

This patch adds a hook that is called for all remaining pseudo
instructions from the ExpandPostRAPseudos pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140472 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
124e1821033a4b3220f552229652d9460ed90673 23-Sep-2011 Owen Anderson <resistor@mac.com> Start stubbing out MCModule and MCAtom, which provide an API for accessing the rich disassembly of a complete object or executable.
These are very much a work in progress, and not really useful yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140345 91177308-0d34-0410-b5e6-96231b3b80d8
CAtom.h
CModule.h
83a8031336a1155e6b0c3e9a84164324e08d1c8b 20-Sep-2011 Andrew Trick <atrick@apple.com> Restore hasPostISelHook tblgen flag.

No functionality change. The hook makes it explicit which patterns
require "special" handling. i.e. it self-documents tblgen
deficiencies. I plan to add verification in ExpandISelPseudos and
Thumb2SizeReduce to catch any missing hasPostISelHooks. Otherwise it's
too fragile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140160 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
4815d56bb2c356a610f46753c5f1cefafa113b21 20-Sep-2011 Andrew Trick <atrick@apple.com> ARM isel bug fix for adds/subs operands.

Modified ARMISelLowering::AdjustInstrPostInstrSelection to handle the
full gamut of CPSR defs/uses including instructins whose "optional"
cc_out operand is not really optional. This allowed removal of the
hasPostISelHook to simplify the .td files and make the implementation
more robust.
Fixes rdar://10137436: sqlite3 miscompile


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140134 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
98c5ddabca1debf935a07d14d0cbc9732374bdb8 16-Sep-2011 Owen Anderson <resistor@mac.com> Don't attach annotations to MCInst's. Instead, have the disassembler return, and the printer accept, an annotation string which can be passed through if the client cares about annotations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139876 91177308-0d34-0410-b5e6-96231b3b80d8
CDisassembler.h
CInst.h
CInstPrinter.h
ede042dc8d59ff48a48ef8e2271f2a7ee8324ba5 15-Sep-2011 Owen Anderson <resistor@mac.com> Add support for stored annotations to MCInst, and provide facilities for MC-based InstPrinters to print them out. Enhance the ARM and X86 InstPrinter's to do so in verbose mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139820 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
CInstPrinter.h
6148225b9590f18fcb6a1d3151d3158b316965e0 14-Sep-2011 Jim Grosbach <grosbach@apple.com> Move state var to private class member.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139697 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmLexer.h
f1c21a8da6ed27a6ab4944e30bbeb4bd3ee08a71 14-Sep-2011 Kevin Enderby <enderby@apple.com> First step in supporting #line directives in assembler. This step parses the
#line directives with the needed support in the lexer. Next will be to build
a simple file/line# table mapping source SMLoc's for later use by diagnostics.
And the last step will be to get the diagnostics to use the mapping for file
and line numbers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139669 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmLexer.h
b950585cc5a0d665e9accfe5ce490cd269756f2e 07-Sep-2011 James Molloy <james.molloy@arm.com> Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= handling to llvm-mc. Reviewed by Owen Anderson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139237 91177308-0d34-0410-b5e6-96231b3b80d8
CDisassembler.h
147272b8a70db7984a6bdfad3b5efabcb794a42e 02-Sep-2011 Duncan Sands <baldrick@free.fr> Darwin wants ctors/dtors to be ordered the other way round to linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139015 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
36a16015ac108e2f0dd2d6d96a6d364bc74c50d7 02-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> Don't drop alignment info on local common symbols.

- On COFF the .lcomm directive has an alignment argument.
- On ELF we fall back to .local + .comm

Based on a patch by NAKAMURA Takumi.

Fixes PR9337, PR9483 and PR10128.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138976 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CStreamer.h
cda2a146d1fcf3f499a1aa535377fb332e918bd5 30-Aug-2011 Jeffrey Yasskin <jyasskin@google.com> Fix C++0x narrowing errors when char is unsigned.

In the case of EDInstInfo, this would actually cause a bug when -1 became 255
and was then compared >=0 in llvm-mc/Disassembler.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138825 91177308-0d34-0410-b5e6-96231b3b80d8
DInstInfo.h
37fefc20d3a1e3934a377567d54a141f67752227 30-Aug-2011 Evan Cheng <evan.cheng@apple.com> Follow up to r138791.

Add a instruction flag: hasPostISelHook which tells the pre-RA scheduler to
call a target hook to adjust the instruction. For ARM, this is used to
adjust instructions which may be setting the 's' flag. ADC, SBC, RSB, and RSC
instructions have implicit def of CPSR (required since it now uses CPSR physical
register dependency rather than "glue"). If the carry flag is used, then the
target hook will *fill in* the optional operand with CPSR. Otherwise, the hook
will remove the CPSR implicit def from the MachineInstr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138810 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
f8e1e3e729473b8b2b7ee6134b6417976af84d05 30-Aug-2011 Jim Grosbach <grosbach@apple.com> Thumb2 parsing and encoding for IT blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138773 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
7e0d22cbf7b41e93279f574c9b3c557cdf517dcb 29-Aug-2011 Jim Grosbach <grosbach@apple.com> Tidy up. 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138750 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
7801136b95d1fbe515b9655b73ada39b05a33559 23-Aug-2011 Evan Cheng <evan.cheng@apple.com> Some refactoring so TargetRegistry.h no longer has to include any files
from MC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138367 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeGenInfo.h
CInstrAnalysis.h
6667e5429608b5a0d55850b980ae433deda0e5f2 23-Aug-2011 Benjamin Kramer <benny.kra@googlemail.com> Add an MCInstrAnalysis version of isCall.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138305 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrAnalysis.h
83e3f67fb68d497b600da83a62f000fcce7868a9 17-Aug-2011 Owen Anderson <resistor@mac.com> Allow the MCDisassembler to return a "soft fail" status code, indicating an instruction that is disassemblable, but invalid. Only used for ARM UNPREDICTABLE instructions at the moment.
Patch by James Molloy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137830 91177308-0d34-0410-b5e6-96231b3b80d8
CDisassembler.h
1b84cce77f8bccc905b4800927ce9016f76c1c40 16-Aug-2011 Jim Grosbach <grosbach@apple.com> Remove unused Target argument from AsmParser construction methods.

The argument is unused, and is a layering violation in any case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137735 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmParser.h
ac29c0af3da1bc1da414899a78ffb0a2360f8cda 16-Aug-2011 Jim Grosbach <grosbach@apple.com> Remove unused forward declaration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137734 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmLexer.h
0ba45d4fb3e11d8085b01008e31477bece20d01d 16-Aug-2011 Jim Grosbach <grosbach@apple.com> Tidy up. Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137721 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
48c4c6807b2f1b1d0d61c69c1a5c9328ade26941 16-Aug-2011 Rafael Espindola <rafael.espindola@gmail.com> Remove unimplemented method. Fixes PR10658.
Thanks to Jonas Gafele for noticing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137716 91177308-0d34-0410-b5e6-96231b3b80d8
CValue.h
19cb7f491fbc7cb5d0bbd10e201f9d5093e6d4e5 16-Aug-2011 Jim Grosbach <grosbach@apple.com> MCTargetAsmParser target match predicate support.

Allow a target assembly parser to do context sensitive constraint checking
on a potential instruction match. This will be used, for example, to handle
Thumb2 IT block parsing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137675 91177308-0d34-0410-b5e6-96231b3b80d8
CTargetAsmParser.h
47a24ab4d72dc0f78c2027327cb9a69d6de2bbcd 15-Aug-2011 Jim Grosbach <grosbach@apple.com> Move MatchResultTy enum into base class definition.

No need for it to be redefined as part of every derived target asm parser
class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137649 91177308-0d34-0410-b5e6-96231b3b80d8
CTargetAsmParser.h
bb0752b040cfe206afeef7fa60e80dde91594fa1 15-Aug-2011 Jim Grosbach <grosbach@apple.com> Tidy up trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137619 91177308-0d34-0410-b5e6-96231b3b80d8
CTargetAsmParser.h
08de97a5b024c3dc7dd051ecaa63d7ec1a27a5cf 08-Aug-2011 Benjamin Kramer <benny.kra@googlemail.com> Pacify virtual dtor warnings and cmake buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137060 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrAnalysis.h
41ab14b725c8f2bb3e54553d0d7d96ff184786b1 08-Aug-2011 Benjamin Kramer <benny.kra@googlemail.com> Add MCInstrAnalysis class. This allows the targets to specify own versions of MCInstrDescs functions.

- Add overrides for ARM.
- Teach llvm-objdump to use this instead of plain MCInstrDesc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137059 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrAnalysis.h
56cb3e3ccbc766086841d04fb8f136c7b4718dd5 03-Aug-2011 Owen Anderson <resistor@mac.com> Add accessors for manipulating an MCInst's operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136818 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
49cb9b88867426d1a430f248550d3cc785a68fe4 02-Aug-2011 Rafael Espindola <rafael.espindola@gmail.com> Assume .cfi_startproc is the first thing in a function. If the function is
externally visable, create a local symbol to use in the CFE. If not, use the
function label itself.

Fixes PR10420.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136716 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
423b81e6924f882f8b1cf7a7d4126b25b5f915aa 01-Aug-2011 Owen Anderson <resistor@mac.com> Add a clear() operation to MCInst, to drop all of its operands. Useful for the disassembler, where we may realize fairly late into decoding that something is wrong and need to reset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136634 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
bd27f5adbd8f3b8ab8def5aa43fbc406ac9b8cbe 27-Jul-2011 Evan Cheng <evan.cheng@apple.com> Support .code32 and .code64 in X86 assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136197 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CAsmInfoDarwin.h
CDirectives.h
94b9550a32d189704a8eae55505edf62662c0534 26-Jul-2011 Evan Cheng <evan.cheng@apple.com> Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136027 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmLexer.h
CParser/MCAsmParser.h
CTargetAsmLexer.h
CTargetAsmParser.h
argetAsmLexer.h
argetAsmParser.h
78c10eeaa57d1c6c4b7781d3c0bcb0cfbbc43b5c 26-Jul-2011 Evan Cheng <evan.cheng@apple.com> Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to createMCAsmBackend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136010 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmBackend.h
CAssembler.h
CObjectStreamer.h
CStreamer.h
argetAsmBackend.h
f0080016c64b784ca6eb402d43e323642505b395 26-Jul-2011 Evan Cheng <evan.cheng@apple.com> Fix include guards.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135998 91177308-0d34-0410-b5e6-96231b3b80d8
argetAsmBackend.h
argetAsmLexer.h
argetAsmParser.h
59a4f9af0a2e94ec04840a066251eca34bf3e3f8 23-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Fix a silly off by one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135842 91177308-0d34-0410-b5e6-96231b3b80d8
CRegisterInfo.h
71883edee29bbbbf3af2aca08de9e50e257252e7 23-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Add more constness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135838 91177308-0d34-0410-b5e6-96231b3b80d8
CRegisterInfo.h
9df8567548e15c6cd91e8a5851784574c4f09528 23-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Turn the DenseSet in MCRegisterClass into a tblgenerated bit field. This should be faster and smaller.

Goodbye static ctors and dtors!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135836 91177308-0d34-0410-b5e6-96231b3b80d8
CRegisterInfo.h
a7cfc08ebe737062917b442830eb5321b0f79e89 23-Jul-2011 Evan Cheng <evan.cheng@apple.com> Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135833 91177308-0d34-0410-b5e6-96231b3b80d8
argetAsmBackend.h
argetAsmLexer.h
argetAsmParser.h
dda1bdc962a314bf4fca86f4cd4802ff6c55b172 22-Jul-2011 Bill Wendling <isanbard@gmail.com> Add a method to get the list of FrameInfos.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135805 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
8ca9a862038e8c4e9a2ca73b3b75e1be3425155f 22-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Teach tblgen to emit MCRegisterClasses.

- This currently introduces more instances of the static DenseSet dtor, but that should be fixable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135735 91177308-0d34-0410-b5e6-96231b3b80d8
CRegisterInfo.h
a50c175fe3c7a3034df18747cfacb3b153c493c8 21-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Sink parts of TargetRegisterClass into MCRegisterClass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135683 91177308-0d34-0410-b5e6-96231b3b80d8
CRegisterInfo.h
203576aa0cb9d8bf2d2e4d910ebab4b7a63262ae 20-Jul-2011 Evan Cheng <evan.cheng@apple.com> Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135611 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CObjectFileInfo.h
34ad6db8b958fdc0d38e122edf753b5326e69b03 20-Jul-2011 Evan Cheng <evan.cheng@apple.com> - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.
- 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135580 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeGenInfo.h
e76a33b9567d78a5744dc52fcec3a6056d6fb576 20-Jul-2011 Evan Cheng <evan.cheng@apple.com> Add MCObjectFileInfo and sink the MCSections initialization code from
TargetLoweringObjectFileImpl down to MCObjectFileInfo.

TargetAsmInfo is done to one last method. It's *almost* gone!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135569 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CObjectFileInfo.h
439661395fd2a2a832dba01c65bc88718528313c 19-Jul-2011 Evan Cheng <evan.cheng@apple.com> Introduce MCCodeGenInfo, which keeps information that can affect codegen
(including compilation, assembly). Move relocation model Reloc::Model from
TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135468 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeGenInfo.h
d967578a8c506be341d20a1558eebb31484b8b6d 19-Jul-2011 Bill Wendling <isanbard@gmail.com> Add a method to set compact unwind encoding information in a frame.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135449 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
88b976060af9e33f79d146db0766d5c36757ca5b 19-Jul-2011 Bill Wendling <isanbard@gmail.com> Add a field for the compact unwind encoding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135446 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
2d28617de2b0b731c08d1af9e830f31e14ac75b4 19-Jul-2011 Evan Cheng <evan.cheng@apple.com> Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
better location welcome).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135438 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CDwarf.h
achineLocation.h
0e6a052331f674dd70e28af41f654a7874405eab 18-Jul-2011 Evan Cheng <evan.cheng@apple.com> Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
to MCRegisterInfo. Also initialize the mapping at construction time.

This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step
towards fixing the layering violation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135424 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CRegisterInfo.h
1be0e271a07925b928ba89848934f1ea6f1854e2 15-Jul-2011 Evan Cheng <evan.cheng@apple.com> Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatest
solution but it is a small step towards removing the horror that is
TargetAsmInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135237 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
5196c12e9fdec9ef3c63d96cb529c1c1cb732773 14-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Add a new field to MCOperandInfo that contains information about the type of the Operand.

- The actual values are from the MCOI::OperandType enum.
- Teach tblgen to read it from the instruction definition.
- This is a better implementation of the hacks in edis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135197 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
672b93a3324cc1da6d374eed4c75c050a9cad7be 14-Jul-2011 Evan Cheng <evan.cheng@apple.com> Unfortunately several files in MC are badly violating layering rule by using
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. :-(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135131 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
CStreamer.h
16884415db751c75f2133bd04921393c792b1158 14-Jul-2011 Owen Anderson <resistor@mac.com> Add a target-indepedent entry to MCInstrDesc to describe the encoded size of an opcode. Switch ARM over to using that rather than its own special MCInstrDesc bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135106 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
b7f689bab98777236a2bf600f299d232d246bb61 13-Jul-2011 Jim Grosbach <grosbach@apple.com> Update MCParsedAsmOperand debug methods.

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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135043 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCParsedAsmOperand.h
59ee62d2418df8db499eca1ae17f5900dc2dcbba 11-Jul-2011 Evan Cheng <evan.cheng@apple.com> - Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfo
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134884 91177308-0d34-0410-b5e6-96231b3b80d8
CSubtargetInfo.h
ffc0e73046f737d75e0a62b3a83ef19bcef111e3 09-Jul-2011 Evan Cheng <evan.cheng@apple.com> 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
CSubtargetInfo.h
ubtargetFeature.h
3014b2f3228e1aac1a70598f50d66f1afcc16714 07-Jul-2011 Akira Hatanaka <ahatanak@gmail.com> This patch adds a flag in MCAsmInfo that indicates whether dwarf register
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134635 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
347c50a2933f756097fa5798f2b6c34a19df4162 07-Jul-2011 Evan Cheng <evan.cheng@apple.com> Feature bits are 64-bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134607 91177308-0d34-0410-b5e6-96231b3b80d8
CSubtargetInfo.h
0ddff1b5359433faf2eb1c4ff5320ddcbd42f52f 07-Jul-2011 Evan Cheng <evan.cheng@apple.com> Compute feature bits at time of MCSubtargetInfo initialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134606 91177308-0d34-0410-b5e6-96231b3b80d8
CSubtargetInfo.h
2416b8962105078594d70cdd16cc6cb45b332e02 02-Jul-2011 Evan Cheng <evan.cheng@apple.com> Add getFeatureBits to extract feature bits for a given CPU.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134298 91177308-0d34-0410-b5e6-96231b3b80d8
CSubtargetInfo.h
94214703d97d8d9dfca88174ffc7e94820a85e62 01-Jul-2011 Evan Cheng <evan.cheng@apple.com> - Added MCSubtargetInfo to capture subtarget features and scheduling
itineraries.
- Refactor TargetSubtarget to be based on MCSubtargetInfo.
- Change tablegen generated subtarget info to initialize MCSubtargetInfo
and hide more details from targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134257 91177308-0d34-0410-b5e6-96231b3b80d8
CSubtargetInfo.h
3f9b9eb57dafc2a25a6e3d9ee570bd5a884b11e3 01-Jul-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix use after free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134234 91177308-0d34-0410-b5e6-96231b3b80d8
ubtargetFeature.h
e1bff38386b0af24b5564c3d20888c7bbb045099 01-Jul-2011 Evan Cheng <evan.cheng@apple.com> Switch SubtargetFeatures from std::string to StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134219 91177308-0d34-0410-b5e6-96231b3b80d8
ubtargetFeature.h
276365dd4bc0c2160f91fd8062ae1fc90c86c324 30-Jun-2011 Evan Cheng <evan.cheng@apple.com> Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name to
be the first encoded as the first feature. It then uses the CPU name to look up
features / scheduling itineray even though clients know full well the CPU name
being used to query these properties.

The fix is to just have the clients explictly pass the CPU name!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134127 91177308-0d34-0410-b5e6-96231b3b80d8
ubtargetFeature.h
33b259f46cc281531c36b471862cb0853d2528df 29-Jun-2011 Evan Cheng <evan.cheng@apple.com> Indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134100 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrInfo.h
ab8be96fd30ca9396e6b84fdddf1ac6208984cad 29-Jun-2011 Evan Cheng <evan.cheng@apple.com> Sink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134049 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrItineraries.h
ubtargetFeature.h
22fee2dff4c43b551aefa44a96ca74fcade6bfac 28-Jun-2011 Evan Cheng <evan.cheng@apple.com> Merge XXXGenRegisterNames.inc into XXXGenRegisterInfo.inc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134024 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
e837dead3c8dc3445ef6a0e2322179c57e264a13 28-Jun-2011 Evan Cheng <evan.cheng@apple.com> - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and
sink them into MC layer.
- Added MCInstrInfo, which captures the tablegen generated static data. Chang
TargetInstrInfo so it's based off MCInstrInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134021 91177308-0d34-0410-b5e6-96231b3b80d8
CInstrDesc.h
CInstrInfo.h
CRegisterInfo.h
5e6b4605bd620a864055276a6d454e5a18f9fee8 25-Jun-2011 Evan Cheng <evan.cheng@apple.com> Rename TargetRegisterDesc to MCRegisterDesc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133845 91177308-0d34-0410-b5e6-96231b3b80d8
CRegisterInfo.h
ba8297ec08cdf7ae0c1e0c18ce07922e1f822643 25-Jun-2011 Jim Grosbach <grosbach@apple.com> Refactor MachO relocation generaration into the Target directories.

Move the target-specific RecordRelocation logic out of the generic MC
MachObjectWriter and into the target-specific object writers. This allows
nuking quite a bit of target knowledge from the supposedly target-independent
bits in lib/MC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133844 91177308-0d34-0410-b5e6-96231b3b80d8
CMachObjectWriter.h
f5fa52ed064098be7130aa4ec1236037907ce3fa 24-Jun-2011 Evan Cheng <evan.cheng@apple.com> - Add MCRegisterInfo registration machinery. Also added x86 registration routines.
- Rename TargetRegisterDesc to MCRegisterDesc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133820 91177308-0d34-0410-b5e6-96231b3b80d8
CRegisterInfo.h
a347f85dbeee37a7f2bb68df1a7d4cdfbb7b576d 24-Jun-2011 Evan Cheng <evan.cheng@apple.com> Starting to refactor Target to separate out code that's needed to fully describe
target machine from those that are only needed by codegen. The goal is to
sink the essential target description into MC layer so we can start building
MC based tools without needing to link in the entire codegen.

First step is to refactor TargetRegisterInfo. This patch added a base class
MCRegisterInfo which TargetRegisterInfo is derived from. Changed TableGen to
separate register description from the rest of the stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133782 91177308-0d34-0410-b5e6-96231b3b80d8
CRegisterInfo.h
e266ce6c6eaf52ebe2b18d85b5e23788cf2f6ef4 17-Jun-2011 Bill Wendling <isanbard@gmail.com> Use the verbose asm flag instead of a new flag for decoding the LSDA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133292 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
916a94b870042772568fca7995cf45aef7a6e333 17-Jun-2011 Bill Wendling <isanbard@gmail.com> Add an option that allows one to "decode" the LSDA.

The LSDA is a bit difficult for the non-initiated to read. Even with comments,
it's not always clear what's going on. This wraps the ASM streamer in a class
that retains the LSDA and then emits a human-readable description of what's
going on in it.

So instead of having to make sense of:

Lexception1:
.byte 255
.byte 155
.byte 168
.space 1
.byte 3
.byte 26
Lset0 = Ltmp7-Leh_func_begin1
.long Lset0
Lset1 = Ltmp812-Ltmp7
.long Lset1
Lset2 = Ltmp913-Leh_func_begin1
.long Lset2
.byte 3
Lset3 = Ltmp812-Leh_func_begin1
.long Lset3
Lset4 = Leh_func_end1-Ltmp812
.long Lset4
.long 0
.byte 0
.byte 1
.byte 0
.byte 2
.byte 125
.long __ZTIi@GOTPCREL+4
.long __ZTIPKc@GOTPCREL+4

you can read this instead:

## Exception Handling Table: Lexception1
## @LPStart Encoding: omit
## @TType Encoding: indirect pcrel sdata4
## @TType Base: 40 bytes
## @CallSite Encoding: udata4
## @Action Table Size: 26 bytes

## Action 1:
## A throw between Ltmp7 and Ltmp812 jumps to Ltmp913 on an exception.
## For type(s): __ZTIi@GOTPCREL+4 __ZTIPKc@GOTPCREL+4
## Action 2:
## A throw between Ltmp812 and Leh_func_end1 does not have a landing pad.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133286 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
e82b8eeaa2d36ee52690ae19bca9735629b6003e 15-Jun-2011 Jim Grosbach <grosbach@apple.com> Diagnostic for undefined assembler local symbols.

Re-apply 133010, with fixes for inline assembler.

Original commit message:
"When an assembler local symbol is used but not defined in a module, a
Darwin assembler wants to issue a diagnostic to that effect."

Added fix to only perform the check when finalizing, as otherwise we're not
done and undefined symbols may simply not have been encountered yet.

Passes "make check" and a self-host check on Darwin.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133071 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
6c3044db28ca1efa4d3da4ea40043bf8a3a8e030 14-Jun-2011 Jim Grosbach <grosbach@apple.com> Revert 133010. Self-hosted buildbot unhappy.

Apparently llvm itself generates undefined assembler local labels, causing
self-hosting problems with this patch. Reverting until that's sorted out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133013 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
c35dd25ab820c3db37b7bfd506d656c14b14e331 14-Jun-2011 Jim Grosbach <grosbach@apple.com> Diagnostic for undefined assembler local symbols.

When an assembler local symbol is used but not defined in a module, a
Darwin assembler wants to issue a diagnostic to that effect.

rdar://9559714


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133010 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
a1000742d28f33dd8dd9858e64282e7749c0bd64 09-Jun-2011 Roman Divacky <rdivacky@freebsd.org> Fix emission of PPC64 assembler on non-darwin platforms by splitting
VK_PPC_{HA,LO}16 into darwin and gas variants.

Darwin wants {ha,lo}16(symbol) while gnu as wants symbol@{ha,l}.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132802 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
653664471333f316020e96dd3d664f4984f66a65 05-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Basic support for macros with explicit arguments.

We still don't handle

* default values
* :req
* :vararg
* \()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132656 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmLexer.h
645aef1480384292b042c98ffe623a59ab0af049 03-Jun-2011 Charles Davis <cdavis@mines.edu> Treat Win64 EH as a DWARF EH scheme. For GCC-style exceptions, the layout of
the handler's data area is similar to a DWARF-format LSDA. (It is, in fact,
a 32-bit pointer to the personality routine followed by the DWARF LSDA.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132532 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
cde4ce411b1ace4a80ea1dd38df97e8508aed0c9 02-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Don't hardcode the %reg format in the streamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132451 91177308-0d34-0410-b5e6-96231b3b80d8
CInstPrinter.h
d652b1368b1e381382951f450e5eeca870d91dd6 28-May-2011 Charles Davis <cdavis@mines.edu> Stub out support for Win64-style exceptions. Note that this is merely using
the Win64 EH mechanism to implement GCC-style exceptions. LLVM supports
hardly anything else at this point!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132234 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
7b06b7357aa5a7cbdd769edbf6edb10fa055ea09 27-May-2011 Charles Davis <cdavis@mines.edu> Add a parameter to the Win64 EH section getters to get a section with a
suffix (e.g. .xdata$myfunc). The suffix part isn't implemented yet, but
I'll get to it in the next patch.

Fix up all callers of the affected functions. Make them pass said suffix to
the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132205 91177308-0d34-0410-b5e6-96231b3b80d8
CWin64EH.h
c4cbf9b6aa95cf861a5a80bfccf615ff5c53e4ef 27-May-2011 Charles Davis <cdavis@mines.edu> Start keeping track of where the various unwind instructions are in the prolog.
Use them to calculate the offset inside the prolog. Emit this value when
emitting the unwind codes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132177 91177308-0d34-0410-b5e6-96231b3b80d8
CWin64EH.h
ca93138e11f404a19553049a569f1fa6ad491b67 26-May-2011 Charles Davis <cdavis@mines.edu> Test .seh_startchained and .seh_endchained parsing.

Rework how the MCWin64EHUnwindInfo instances are stored. Fix issues with
chained unwind areas exposed by the test that were related to this.

The ChainedParent field had the wrong address, because when the chained unwind
info was added, the addresses shifted around. Now we store the pointers to the
structures, which are now allocated from the MC heap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132106 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
410ef2b263e92d3de1b2acff7437059400daed7d 25-May-2011 Charles Davis <cdavis@mines.edu> Add tests for .seh_setframe and .seh_handlerdata parsing. Fix issues with
them.

I had to add a special SwitchSectionNoChange method to MCStreamer just for
.seh_handlerdata. If this isn't OK, please let me know, and I'll find some
other way to fix .seh_handlerdata streaming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132084 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
fbc539ff37ddd08c2480be9185e7a40919ce8940 22-May-2011 Charles Davis <cdavis@mines.edu> Add methods to parse the SEH directives to the COFFAsmParser. Implement some
of them, particularly the ones that don't take arguments. Also implement
.seh_proc and .seh_handler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131866 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
38ea9eecd7c810e11f96c8306b241f9db88fc62f 22-May-2011 Charles Davis <cdavis@mines.edu> Implement emission of all Win64 exception tables. Make the COFF streamer emit
these tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131833 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
3185f5c35322cbd10040ab20f265042d477efe62 22-May-2011 Charles Davis <cdavis@mines.edu> Make the COFF streamer emit unwind info when processing a .seh_handlerdata
directive.

Implement emission of Win64 EH unwind info.

Pull in <cassert> in MCWin64EH.h so it can use the assert() macro.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131832 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
CWin64EH.h
321fe74b2d40d7762175fbd3054fda00b5e70833 21-May-2011 Charles Davis <cdavis@mines.edu> A handler for a function in the Win64 EH scheme can be both an unwind handler
and an exception handler. Handle that case.

Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be
needed later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131791 91177308-0d34-0410-b5e6-96231b3b80d8
CWin64EH.h
a6f2678f08299f053feb58337fc4322131d99bf4 19-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Misc code refactorings:
* Remove unnecessary arguments now that ForceExpAbs is a method.
* Use ForceExpAbs in EmitAbsValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131683 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
61558aaf4f924fd44fd2f275fcb7ab7199ede304 19-May-2011 Charles Davis <cdavis@mines.edu> Implement the EndProlog Win64 EH method on the base MCStreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131679 91177308-0d34-0410-b5e6-96231b3b80d8
CWin64EH.h
c3b162857a587c9877e903f038471b882b213232 19-May-2011 Charles Davis <cdavis@mines.edu> Implement the Win64 EH prolog instruction methods on the base MCStreamer.

I had to change the API slightly to avoid overloading issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131666 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
CWin64EH.h
f8cd708f14a7a172d51899b68809510ae0c4c4c8 19-May-2011 Joerg Sonnenberger <joerg@bec.de> Reapply 131644 including the missing header changes:
Introduce -fatal-assembler-warnings for the obvious purpose


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131655 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmParser.h
CParser/MCAsmParserExtension.h
440596ffe5bb77a202acb36d5eadd158976ff39a 19-May-2011 Charles Davis <cdavis@mines.edu> Turns out GAS does have Win64 EH directives. (It also supports WinCE EH.) Make
ours compatible with GAS.

In retrospect, I should have emailed binutils about this earlier. Thanks to
Kai Tietz for pointing out that GAS already had SEH directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131652 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
CWin64EH.h
91d9a1c0f7c598d51c50f80bc9e8dfc1494f78c1 19-May-2011 Charles Davis <cdavis@mines.edu> Implement the StartChained and EndChained Win64 EH methods on MCStreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131629 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
CWin64EH.h
0855bc5b973320052c87bdcc2fa17b9711edc3de 19-May-2011 Charles Davis <cdavis@mines.edu> Implement the StartProc and EndProc Win64 EH methods on the base MCStreamer.

Based largely on Rafael Espindola's work on CFI. Other methods soon to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131623 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
fa89218a438c0fcafb40775bdc04dbe95c59fba3 19-May-2011 Charles Davis <cdavis@mines.edu> Fix build issues with headers, which I discovered by actually using them.

Also, convert all the inline functions on UnwindInfo into methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131622 91177308-0d34-0410-b5e6-96231b3b80d8
CWin64EH.h
f0542c07f7be612c5177243049dc23d24bde8852 19-May-2011 Charles Davis <cdavis@mines.edu> Add a header patterned after MCDwarf.h for supporting Win64 exception handling
under MC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131593 91177308-0d34-0410-b5e6-96231b3b80d8
CWin64EH.h
f07090134d06e0cf3508e8b8e87d775f0a7982c1 18-May-2011 Charles Davis <cdavis@mines.edu> Add some more Win64 EH directives:
- StartChained and EndChained delimit a chained unwind area, which can contain
additional operations to be undone if an exception occurs inside of it.
- UnwindOnly declares that this function doesn't handle any exceptions. If it
has a handler, it's an unwind handler instead of an exception handler.
- Lsda declares the location and size of the LSDA, which in the Win64 EH
scheme is kept inside the UNWIND_INFO struct. Windows itself ignores the
LSDA; it's used by the Language-Specific Handler (the "Personality Function"
from DWARF).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131572 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
9c77398d1c89f615735d304cd7eda3c3e9b1504f 18-May-2011 Charles Davis <cdavis@mines.edu> While thinking about how to know where the functions' boundaries are for
the purposes of the Win64 EH tables, I realized we had no way to tell where
the function ends. (MASM bounds functions with PROC and ENDP keywords.)
Add a directive to delimit the end of the function, and rename the 'frame'
directive to more accurately reflect its duality with the new directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131522 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
cacdc4fc41f035c149d5f1b92acd587d475ffd58 16-May-2011 Charles Davis <cdavis@mines.edu> Add a method I forgot in the last commit. Don't worry, this one passed
self-host :).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131421 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
6469540adf63d94a876c2b623cb4ca70479647f7 16-May-2011 Rafael Espindola <rafael.espindola@gmail.com> sets bit 0 of the function address of thumb function in .symtab
("T is 1 if the target symbol S has type STT_FUNC and the
symbol addresses a Thumb instruction ;it is 0 otherwise."
from "ELF for the ARM Architecture" 4.7.1.2)

Patch by Koan-Sin Tan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131406 91177308-0d34-0410-b5e6-96231b3b80d8
CELFSymbolFlags.h
ff96a12db635daf4f88cfea899e63a885dfaa9ed 15-May-2011 Charles Davis <cdavis@mines.edu> Add stub methods to MCStreamer for emitting Win64 exception-handling
information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131382 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
dc52ecf6fdbee63652d2dac0dccc17e23ac7797f 10-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Rename DwarfRequiresRelocationForStmtList to
DwarfRequiresRelocationForSectionOffset as this is not specific to StmtList.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131148 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
40a7dbbeff44c4cbd8c7e4f07f28dd614f8a5d08 10-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Add support for producing .deubg_frame sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131121 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
c25dad8750083829d9a8935ce40d0734e5488f8e 10-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Factor some code into a new EmitFrames method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131119 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
f9efd83166401bca542c6702ea329f9901c4e04b 10-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Parsing and plumbing for .cfi_sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131117 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
4eafe109459eb115f13f1d19c5ff3cb3678e8c7a 08-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy with
the smaller encoding and this cuts 270336 bytes from a release version of
clang and 1246272 bytes from a debug build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131067 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
be91117c4d719fe15743f21cd5ac9aaf6654c8ab 07-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Switch Darwin to the generic CIE/FDE printer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131031 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
f2b04232006142eb7933972fb21d9ffb9b8c2646 06-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Dead code elimination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130984 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
254784f9e0ae59fc060ccd54b39cd1e94ac91356 06-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Remove the DwarfTable enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130959 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
597a7664e1bbe2ea5f757eb6e853bd1d2fe98d6c 04-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Producing a DW_FORM_addr for DW_AT_stmt_list is probably correct, but
it is both inefficient and unexpected by dwarfdump. Change to
a DW_FORM_data4.

While in here, change the predicate name to reflect that the position
is not really absolute (it is an offset), just that the linker needs a
relocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130846 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
5426a9ee37667660935d80841c5392d78e254318 01-May-2011 Rafael Espindola <rafael.espindola@gmail.com> GCC uses a different encoding of pointers in the FDE when using
-fno-dwarf2-cfi-asm. Implement the same behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130637 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
debd7e4e8bc5cfe61bfb71835ce2b1a3fbccc2be 01-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Simplify the handling of pcrel relocations on ELF. Now we do the right thing
for all symbol differences and can drop the old EmitPCRelSymbolValue
method.

This also make getExprForFDESymbol on ELF equal to the one on MachO, and it
can be made non-virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130634 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CAsmInfoDarwin.h
CObjectStreamer.h
CStreamer.h
f1a5c7ec04002769f1638e64f7439589f0f926e6 30-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Add all the plumbing needed for MC to expand cfi to the old tables in
the final assembly. It is the same technique used when targeting
assemblers that don't support .loc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130587 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
a37bd1d02c0e3d93474fdf30352bf4a425cbe25b 30-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement MCAsmStreamer::EmitDwarfAdvanceFrameAddr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130585 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
0eab5c4d85b4c4bb161bcdd959aa58a6f54415cc 29-Apr-2011 Daniel Dunbar <daniel@zuster.org> MCExpr: Add FindAssociatedSection, which attempts to mirror the 'as' semantics
that associate sections with expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130517 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
CSymbol.h
9099813bd50a05c4b2a495e3cea817f49c1372d8 29-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Add an alternative implementation of CIE and FDE emission that outputs them
in the same order as the one in CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130471 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
a0057ca13f06b8de08483c3e3a143a7236c67097 28-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Add the getExprForFDESymbol method that responsible for computing the
expressions used in the FDE to refer to symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130437 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CAsmInfoDarwin.h
bfa27cc5d72e061a96efbb461864d40bc8089ec2 28-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Add a getExprForPersonalitySymbol method to MCAsmInfo. Use it when
converting the symbol passed to .cfi_personality into bytes is the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130400 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CAsmInfoDarwin.h
8bca4106dfc2945723251db10e340183f3e372dd 28-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Mark the EH symbol global or weak if the corresponding function is.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130397 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
235b830328586f0eb141f3263a0868166d80f478 28-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Add a small temporary hack for producing identical eh_frame sections on OS X.
This removes one of the main advantages of moving eh_frame to MC, but
makes the transition a lot easier to debug (run md5).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130379 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
ed708f9c1facb9928ef2f79503e7030c8f25b00d 27-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Factor a bit of code to MCStreamer::EmitLabel. Keep track of the last
non private symbol. This will be use for handling

foo:
.cfi_startproc
...

On OS X where we have to create a foo.eh symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130305 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
CStreamer.h
ddcdcc88631c6bd4ad43d9198b98bc9a829be036 23-Apr-2011 Jay Foad <jay.foad@gmail.com> Remove unused STL header includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
e8cfbd843d737e1f95c3032c7670c2be3838a6f6 22-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129955 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
CStreamer.h
3f3bf9387b75f4c932e4c59bd7af719d26ae4b99 18-Apr-2011 Devang Patel <dpatel@apple.com> Reduce clutter in asm output. Do not emit source location as comment for each instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129715 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
f4387d9afb9100e181b96b3bca879b940715033d 18-Apr-2011 Eli Friedman <eli.friedman@gmail.com> Make the StringMaps attached to MCContext use the MCContext's allocator;
reduces the number of calls to malloc().



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129687 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
7a2bdde0a0eebcd2125055e0eacaca040f0b766c 15-Apr-2011 Chris Lattner <sabre@nondot.org> Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
066c2f495ae396ce5335e374c45b1e4ace4f2470 13-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Be consistent about being virtual and returning void in the cfi methods.
Implement the ones that were missing in the asm streamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129413 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
5d7dcd3335234d2a2bc16dc69f86fbb5dcaa8962 12-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Remove LastOffset from the asm parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129378 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
25f492e77858dc5a95fcd7180e73aff47925b668 12-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix the case of a .cfi_rel_offset before any .cfi_def_cfa_offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129362 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
CStreamer.h
c57543964d1382d3d3a5005f415b6c0f49671b3a 12-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement .cfi_same_value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129361 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
CStreamer.h
bd3327654b5708f1ba92aff3ab25b1bbf5034797 11-Apr-2011 Kevin Enderby <enderby@apple.com> Adding support for printing operands symbolically to llvm's public 'C'
disassembler API. Hooked this up to the ARM target so such tools as Darwin's
otool(1) can now print things like branch targets for example this:
blx _puts
instead of this:
blx #-36
And even print the expression encoded in the Mach-O relocation entried for
things like this:
movt r0, :upper16:((_foo-_bar)+1234)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129284 91177308-0d34-0410-b5e6-96231b3b80d8
CDisassembler.h
44dcfd36253570ccd5f00189eb918604473135e0 07-Apr-2011 Bill Wendling <isanbard@gmail.com> Replace the old algorithm that emitted the "print the alias for an instruction"
with the newer, cleaner model. It uses the IAPrinter class to hold the
information that is needed to match an instruction with its alias. This also
takes into account the available features of the platform.

There is one bit of ugliness. The way the logic determines if a pattern is
unique is O(N**2), which is gross. But in reality, the number of items it's
checking against isn't large. So while it's N**2, it shouldn't be a massive time
sink.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129110 91177308-0d34-0410-b5e6-96231b3b80d8
CInstPrinter.h
c6cf43d25853efb4a6765954eda52a45998a47f2 29-Mar-2011 Daniel Dunbar <daniel@zuster.org> MC: Add support for disabling "temporary label" behavior. Useful for debugging
on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128430 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
d31d304f83f9c8df6870057509414b8d004bc8da 24-Mar-2011 Jim Grosbach <grosbach@apple.com> Clean up assembly statement separator support.

The MC asm lexer wasn't honoring a non-default (anything but ';') statement
separator. Fix that, and generalize a bit to support multi-character
statement separators.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128227 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CParser/AsmLexer.h
b9b1e307f2a93d7129680df15b9575638f0aad3e 24-Mar-2011 Jim Grosbach <grosbach@apple.com> Fix comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128182 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionMachO.h
65c8bca78854712ab2bf135c2008ed455ef0c9b7 19-Mar-2011 Stuart Hastings <stuart@apple.com> Reapply 127939 since Daniel fixed the breakage. <rdar://problem/9012638>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127944 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionMachO.h
825dd969189357cf0e7084e015d938467b0136eb 19-Mar-2011 Stuart Hastings <stuart@apple.com> Revert 127939. <rdar://problem/9012638>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127943 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionMachO.h
7257897402fc61df3c494abad27397a100e5f32c 19-Mar-2011 Stuart Hastings <stuart@apple.com> Revise r126127 to address Daniel's comments. <rdar://problem/9012638>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127939 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionMachO.h
ba9934648f1b8f5b1749548963f385f1147c1f68 12-Mar-2011 Duncan Sands <baldrick@free.fr> Speculatively revert commit 127478 (jsjodin) in an attempt to fix the
llvm-gcc-i386-linux-selfhost and llvm-x86_64-linux-checks buildbots.
The original log entry:
Remove optimization emitting a reference insted of label difference, since
it can create more relocations. Removed isBaseAddressKnownZero method,
because it is no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127540 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
CSectionELF.h
e4f6d7461aea7308e85c219c1cea5bd6059d4841 11-Mar-2011 Jan Sjödin <jan_sjodin@yahoo.com> Remove optimization emitting a reference insted of label difference, since it can create more relocations. Removed isBaseAddressKnownZero method, because it is no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127478 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
CSectionELF.h
01dff9646173fea0c38df4471f41272557ca831a 09-Mar-2011 Jan Sjödin <jan_sjodin@yahoo.com> Add constructors to MCElfStreamer and MCObjectStreamer to take an extra MCAssembler * argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127343 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
cdc06fa3c7d68b92f56a5a9c537ac159aefc6323 08-Mar-2011 John McCall <rjmccall@apple.com> Typo. Patch by arrowdodger.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127256 91177308-0d34-0410-b5e6-96231b3b80d8
CDisassembler.h
57caad7a33ff145b71545f10dcfbbf2fd0f595d3 05-Mar-2011 Anton Korobeynikov <asl@math.spbu.ru> Preliminary support for ARM frame save directives emission via MI flags.
This is just very first approximation how the stuff should be done
(e.g. ARM-only for now). More to follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127101 91177308-0d34-0410-b5e6-96231b3b80d8
CInstPrinter.h
CStreamer.h
b5e16af9ea04cc1f94ca631104e5e6be96546aa1 05-Mar-2011 Anton Korobeynikov <asl@math.spbu.ru> Some first rudimentary support for ARM EHABI: print exception table in "text mode".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127099 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CStreamer.h
f754f50805fee2bb4d461a9b41107122a22cd6f6 25-Feb-2011 Cameron Zwarich <zwarich@apple.com> Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126488 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
93c65e6e661eda75711363bdd5ca15909920e1f0 24-Feb-2011 Joerg Sonnenberger <joerg@bec.de> Restore r125595 (reverted in r126336) with modifications:
Introduce a variable in the AsmParserExtension whether [] is valid in an
expression. If it is true, parse them like (). Enable this for ELF only.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126443 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmParserExtension.h
f410608271b6318bfc9e26c0d199f185d5a89ccb 24-Feb-2011 Devang Patel <dpatel@apple.com> Enable DebugInfo support for COFF object files.
Patch by Nathan Jeffords!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126425 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
5129bdecd87c518713765acd6998c80f9eef36a2 23-Feb-2011 Stuart Hastings <stuart@apple.com> Omit private_extern declarations of extern symbols; followup to
r124468. Patch by Rafael Avila de Espindola!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126297 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
7d0805dcb82e9ba1d90ce8d702169683b9caded7 21-Feb-2011 Joerg Sonnenberger <joerg@bec.de> Use a vector of pairs to implement the section stack, not two
independent vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126099 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
908159b46ae118d36fccbc1d5145dcedfc3d4185 16-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Gas is very inconsistent about when a relaxation/relocation is needed. Do
the right thing and stop trying to copy it. Fixes PR8944.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125648 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
7768a9dce14431018133cd586f5c8ce3e057f069 16-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Add support for pushsection and popsection. Patch by Joerg Sonnenberger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125629 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
CStreamer.h
9de3a0701a06505aeab824fdc88f361a5018e473 14-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Move broken HasCommonSymbols to ELFWriter.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125490 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
e5ec5a41775c6ef1a69070c218fb4b6b4775ca41 11-Feb-2011 Jim Grosbach <grosbach@apple.com> Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125385 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmLexer.h
98311ecb4ae9c82baba9e3a48acf756a81c8e9a4 11-Feb-2011 Jim Grosbach <grosbach@apple.com> Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125327 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmLexer.h
CParser/MCAsmParser.h
CParser/MCParsedAsmOperand.h
c67b1a3a76ea6ff642d30610cf63595ccb661e6b 04-Feb-2011 Bob Wilson <bob.wilson@apple.com> Remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124830 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
96aa78c8c5ef1a5f268539c9edc86569b436d573 23-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add support for the --noexecstack option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124077 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CStreamer.h
1c13026e8f94bd332c0979baa9c777da99d48736 23-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Remove more duplicated code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124056 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
c85dca66e68c9fa6ffa8471c64113b12d8d94fb1 23-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Remove duplicated code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124054 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
3965b5e974d57f3e56a2c7f37d76d73e572dfb20 14-Jan-2011 Anton Korobeynikov <asl@math.spbu.ru> Add a possibility to switch between CFI directives- and table-based frame description emission. Currently all the backends use table-based stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123476 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
7597212abced110723f2fee985a7d60557c092ec 13-Jan-2011 Evan Cheng <evan.cheng@apple.com> Model :upper16: and :lower16: as ARM specific MCTargetExpr. This is a step
in the right direction. It eliminated some hacks and will unblock codegen
work. But it's far from being done. It doesn't reject illegal expressions,
e.g. (FOO - :lower16:BAR). It also doesn't work in Thumb2 mode at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123369 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
b2624eda5ad0ead99ec5ab7ead47b586c96d1109 29-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/Thumb: Set the thumb bit in the symbol table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122630 91177308-0d34-0410-b5e6-96231b3b80d8
CMachOSymbolFlags.h
b40a71fda188f8ca564e606ac2cb051a44ada311 29-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement cfi_def_cfa. Also don't convert to dwarf reg numbers twice. Looks
like 6 is a fixed point of that and so the previous tests were OK :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122614 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
fe024d0a624404ada11fb330e7360abc5f88742e 28-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement .cfi_remember_state and .cfi_restore_state.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122602 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
CStreamer.h
245a1e20419aa5a3c833d7a8e89168e19d5f4d2c 28-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Relax address updates in the eh_frame section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122591 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CDwarf.h
CObjectStreamer.h
CStreamer.h
5bba08425374ca36fe5fbc7423ce1a09858e4097 28-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Start adding basic support for emitting the call frame instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122590 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
bdc3167c086dd4358e24692075db5e7784140843 27-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for .cfi_lsda.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122584 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
CStreamer.h
3a83c40ab61d5ca624f2bbadd70237c6adbdb304 27-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for the same encodings of the personality function that gnu as
supports.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122577 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
CFixup.h
CStreamer.h
d7c8ccae8e48dce3ab7c3e9b4d8a309998c47961 26-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Add basic support for .cfi_personality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122566 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
fea753b397823c340608925eb7f3256a64a30017 24-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Merge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We now
have a single point where targets test if a relocation is needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122549 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
90a5a0cd7c353651c953020b1e41b4c6e2f21883 22-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Rename NeedsSetToChangeDiffSize to HasAggressiveSymbolFolding which is a much
better name and matches what is used in the MachO writer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122443 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
33a38a1b5a35acd15c867193bc2175f3d4e7b83d 22-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Use references and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122405 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
7a45903bf40a023ce96f4da953bb6cb2cb1a1b50 21-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't relax org or align. They change size as the relaxation happens, but they
are not actually relaxed. For example, a section with only alignments will never
needs relaxation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122356 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
e1feeb9da41fd48002e363c6dbb0a3d7bf0b7811 21-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Shuffle enums a bit to make it harder to inadvertently use the wrong
type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122334 91177308-0d34-0410-b5e6-96231b3b80d8
CMachObjectWriter.h
62b83b62f377ac248038672015dc65970327f786 21-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Layout one section until no relaxations are done and then move to the next
section.

This helps because in practice sections form a dag with debug sections pointing
to text sections. Finishing up the text sections first makes the debug section
relaxation trivial.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122314 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
7529b164104f802b59fbf96f5a88d9709ac3ff1a 18-Dec-2010 Roman Divacky <rdivacky@freebsd.org> Add support for lexing single quotes like 'c'.

This fixed 8615.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122150 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmLexer.h
3132780a2ed58945b0ec5033002be44bedb6b785 18-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Merge isAbsolute into IsSymbolRefDifferenceFullyResolved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122148 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
1ec5bd31fe491e610839ea448bd99fd171785837 18-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Remove the MCObjectFormat class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122147 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectFormat.h
CObjectWriter.h
d076482ab7e672d1d65a43809695e8d0d3995203 18-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert 122011, 122012, 122013, 122023 adding back an important optimization.
I added a note, but suggestions on how to add a test are really welcome.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122138 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
bff66a86e6e44dc7424cd2d7719ac80630b3a5f8 18-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Move some data to the TargetWriter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122134 91177308-0d34-0410-b5e6-96231b3b80d8
CELFObjectWriter.h
6024c97ffa15766bc0f200ffd309d9e017ae0d4b 17-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Stub out explicit MCELFObjectTargetWriter interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122067 91177308-0d34-0410-b5e6-96231b3b80d8
CELFObjectWriter.h
285b3e5b61af15f11e59a7700375aefa2a326bd8 17-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Move createELFObjectWriter to its own header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122064 91177308-0d34-0410-b5e6-96231b3b80d8
CELFObjectWriter.h
CObjectWriter.h
b87422778c4e7b828e6e846b81fd77509439c622 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: On second thought, use a custom hook for enabling aggressive
IsSymbolRefDifferenceFullyResolved, it turns out this does change behavior on
enough cases for x86-32 that I would rather wait a bit on it.
- In practice, we will want to change this eventually because it only means we
generate less relocations (it also eliminates the need for the horrible
'.set' hack that Darwin requires in some places).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122042 91177308-0d34-0410-b5e6-96231b3b80d8
CMachObjectWriter.h
1f3662abba2abdf5a0ab77095834271fcf846579 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format specific hook.
- Currently just has stub implementations for Mach-O, ELF, and COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122037 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
5d2477cecf53bef911f57423a5cecb743d4286fa 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Assembler: Strip out object writer arguments, now that it is always available
-- and remove FIXME asking for the same!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122032 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
feb7ba3d9abfa1eb89f6da93c51649baaa931ab8 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Assembler: Make the MCObjectWriter available through the lifetime of the
assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122031 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
8f714fedba35bc454ff372f084090f14a25c8933 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Expr: Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122023 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
2d8e3e741f49baadfc72403de9c4b362a07af8d9 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC: Remove another dead MCAssembler argument, and update clients.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122013 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
92c66c7bf9533d0ab7cece9532c5060e7d3db6ca 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC: Remove dead MCAssembler argument -- Rafael, can you check the FIXME I added
here?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122012 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
f249e5d5d71d50323e7a60af1ee555de14378515 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> Fix 80-col viola.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122010 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
5d05d9769ec98cdee359fd934a56c9455e21232b 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Lift some MachObjectWriter arguments into the target specific

interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121981 91177308-0d34-0410-b5e6-96231b3b80d8
CMachObjectWriter.h
ae5abd595f5442767313a4c8a24008ad19323ceb 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Stub out explicit MCMachObjectTargetWriter interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121973 91177308-0d34-0410-b5e6-96231b3b80d8
CMachObjectWriter.h
aa4b7dd13ba83152473950d7014a29686dc7eef6 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Move createMachObjectWriter into MCMachObjectWriter.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121971 91177308-0d34-0410-b5e6-96231b3b80d8
CMachObjectWriter.h
CObjectWriter.h
2761fc427082215c2affcc9d8db8491400bc9e5d 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC: Move target specific fixup info descriptors to TargetAsmBackend instead of
the MCCodeEmitter, which seems like a better organization.
- Also, cleaned up some magic constants while in the area.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121953 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
745dacc91d7ee9531bfba76b21beb5d4eef93a7d 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC: Make TargetAsmBackend available to the AsmStreamer.
- Treaty talks on the non-proliferation of MC objects broke down.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121949 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
1d6547eb49ef46d2606810f0abad2570c41e38bd 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC: Split MCFixupKindInfo out into its own header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121948 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
CFixupKindInfo.h
9754ab010e3897457e75cbf0aa74e276fc944174 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC: Remove a FIXME I no longer agree with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121947 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
47dbd429daefa9b3f19347194ddfb6f69642465e 15-Dec-2010 Owen Anderson <resistor@mac.com> Implement cleanups suggested by Daniel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121875 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
2bf6afc277edb32b1d940def5b3eb0e0d32a22b9 15-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Relax alignment fragments.

With this we don't need the EffectiveSize field anymore. Without that field
LayoutFragment only updates offsets and we don't need to invalidate the
current fragment when it is relaxed (only the ones following it).

This is also a very small improvement in the accuracy of the layout info as
we now use the after relaxation size immediately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121857 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
475002078848d102b6577fe7283464c039b38af6 14-Dec-2010 Jim Grosbach <grosbach@apple.com> ARM Fixups relative to thumb functions need to have the low bit of the value
set for interworking to work properly. rdar://8755956

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121778 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
89b9372605db2ce3b0085c84089e389f7bc1fbdd 10-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Fixed version of 121434 with no new memory leaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121471 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
CObjectStreamer.h
CStreamer.h
f7fd4aa2610f46467369de07f3ec669561d79be0 10-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert my previous patch to make the valgrind bots happy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121461 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
CObjectStreamer.h
CStreamer.h
1c952b9cc98e84b28f68f0f6cf11197263f89863 10-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Initial support for the cfi directives. This is just enough to get

f:
.cfi_startproc
nop
.cfi_endproc

assembled (on ELF).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121434 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
CObjectStreamer.h
CStreamer.h
05018c2f2872a05b1a2fff1a9934621ba1f38084 09-Dec-2010 Owen Anderson <resistor@mac.com> Fix an issue in some Thumb fixups, where the effective PC address needs to be 4-byte aligned when calculating
the offset. Add a new fixup flag to represent this, and use it for the one fixups that I have a testcase for needing
this. It's quite likely that the other Thumb fixups will need this too, and to have their fixup encoding logic
adjusted accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121408 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
4f4363a490721fe6e4f275193e783f77fa631ef2 08-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Layout each section independently. With the testcase in PR8711:

before:
4 assembler - Number of assembler layout and relaxation steps
78563 assembler - Number of emitted assembler fragments
8693904 assembler - Number of emitted object file bytes
271223 assembler - Number of evaluated fixups
330771677 assembler - Number of fragment layouts
5958 assembler - Number of relaxed instructions
2508361 mcexpr - Number of MCExpr evaluations

real 0m26.123s
user 0m25.694s
sys 0m0.388s

after:

4 assembler - Number of assembler layout and relaxation steps
78563 assembler - Number of emitted assembler fragments
8693904 assembler - Number of emitted object file bytes
271223 assembler - Number of evaluated fixups
231507 assembler - Number of fragment layouts
5958 assembler - Number of relaxed instructions
2508361 mcexpr - Number of MCExpr evaluations

real 0m2.500s
user 0m2.113s
sys 0m0.273s

And yes, the outputs are identical :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121207 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
85f2ecc697a8ca6c8cf08093054cbbb9d2060ccf 07-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Sorry for such a large commit. The summary is that only MachO cares about the
actuall addresses in a .o file, so it is better to let the MachO writer compute
it.

This is good for two reasons. First, areas that shouldn't care about
addresses now don't have access to it. Second, the layout of each section
is independent. I should use this in a subsequent commit to speed it up.

Most of the patch is just removing the section address computation. The two
interesting parts are the change on how we handle padding in the end
of sections and how MachO can get the address of a-b when a and b are in
different sections.

Since now the expression evaluation normally doesn't know the section address,
it will think that a-b needs relocation and let the MachO writer know. Once
it has computed the section addresses, it calls back the expression evaluation
with the section addresses to resolve these expressions.

The remaining problem is the handling of padding. Currently it will create
a special alignment fragment at the end. Since that fragment doesn't update
the alignment of the section, it needs the real address to be computed.

Since now the layout will not compute a-b with a and b in different sections,
the only effect that the special alignment fragment has is update the
address size of the section. This can also be done by the MachO writer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121076 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
CExpr.h
CObjectStreamer.h
CObjectWriter.h
22373b230a053a154f6c7792c6a33d4f78f5479d 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Use references to simplify the code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121050 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
179821ac1f282ef6f8d24d5ea346028aee8ba4c7 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Remove the instruction fragment to data fragment lowering since it was causing
freed data to be read. I will open a bug to track it being reenabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121028 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
0bbe0b440ee2cef47dcb7b281825eb70341c16dd 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Second try at making direct object emission produce the same results
as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc
bootstrap on darwin10 using darwin9's assembler and linker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121006 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
6d86492f5ed0f9853ddd3b24e1aa037e305e1784 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert previous two patches while I try to find out how to make both
linux and darwin assemblers happy :-(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121004 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
2303c9dd69476d045af7cee94e112dd77d22fd28 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Add an EmitAbsValue helper method and use it in cases where we want to be sure
that no relocations are used (on MochO).
Fixes llc producing different output from llc + llvm-mc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121000 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
f8803fe4177739f9a6900198f601808eb27934d9 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Remove the getAddress getter, initialize Ordinal in the constructor and use
that on the ELF writer to detect a section we created.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120981 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
ffd902bfb743f0564c8f7689c49403074b6f694d 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Add a getSymbolOffset method and use it in the ELF writer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120977 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
db74aeadcd1b9a597ad0f80c0036e67e63ba20ed 04-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Remember the contents of leb and dwarfline fragments when relaxing. This avoids
having to evaluate the expression again when writing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120920 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CDwarf.h
5d4918dbd116b0b5e561c431b1ea527ee1b9302a 04-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> There are two reasons why we might want to use

foo = a - b
.long foo
instead of just
.long a - b

First, on darwin9 64 bits the assembler produces the wrong result. Second,
if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not
consider a - b to be a constant but will if the dummy foo is created.

Split how we handle these cases. The first one is something MC should take care
of. The second one has to be handled by the caller.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120889 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CObjectStreamer.h
CStreamer.h
767b1be3900bdc693aa0ad3e554ba034845f67f7 04-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Next step: Only pad debug_line when the target is darwin. Add a FIXME to avoid
doing that if the target is darwin10 or newer.

This fixes
*) Direct object emission was producing objects without the workaround on
darwin9.
*) Assembly printing was producing objects with the workaround on linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120866 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CDwarf.h
2df042cb32ecb8d2e1d499dfa27d5074c8b40e13 03-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Make EmitIntValue more efficient and more like what we do for leb128. The
difference is much smaller (about 0.3s) but significant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120787 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
32a006e606742b1c5401e49607e33717bb5441f0 03-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Try to resolve symbol differences early, and if successful create a plain
data fragment. This reduces the time to assemble the test in 8711 from 60s to
54s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120767 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
CExpr.h
CObjectStreamer.h
CStreamer.h
5113cdbfff7df4c7a79a92e5aa971126254202c6 03-Dec-2010 Devang Patel <dpatel@apple.com> It may not be an option to skip .debug_line if there are file reference in already emitted debug info. So, for now, emit dummy line table entry to make older linker and assemblers happy. This is not a new behavior, original AsmPrinter emitted similar line table entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120760 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
ee4854faf3a4dc622dcb75fe352e33fb32385b3f 02-Dec-2010 Devang Patel <dpatel@apple.com> Use set directive for StartMinusEndExpr.
This is a fix for llvm-gcc-i386-darwin9 buildbot failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120742 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
CStreamer.h
e23930543c0de0adcfec00cd18e9243ad812a167 02-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Move EmitValueToOffset to the ObjectStreamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120691 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
dedb045c3296c831962c4ae101531c38c273ba89 02-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Add EmitInstToFragment to the generic object streamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120690 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
6db8a9f3fabefeb00163295f0611d09134651f3f 02-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> The sections that the ELF object writer has to create are very simple and
contain only data. Handle them specially instead of using AddSectionToTheEnd.
This moves a hack from the generic assembler to the elf writer. It is also
a bit faster and should make other improvements easier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120683 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
ec99c90ea54806ae59eb8ea7686e201ed7eb0d29 02-Dec-2010 Chris Lattner <sabre@nondot.org> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120644 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
6a13ddbd9b2159303996db44db6045730d0fe479 02-Dec-2010 Devang Patel <dpatel@apple.com> If tehre are not any line entry then do not try to emit .debug_line section.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120637 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
6566e0a55e3d9403f77db81a79a5dadedb4e666e 01-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120621 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
9f44724be058d17944dcd9ef6a6b57734b3744b8 01-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Rename temporary symbols if they conflict with artificial symbols created
by the assembler. This was blocking parsing any large .s produced by clang for
example.

Fixes PR8596.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120603 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
1f6efa3996dd1929fbc129203ce5009b620e6969 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
DInstInfo.h
CAssembler.h
CDisassembler.h
CExpr.h
CFixup.h
CInst.h
CObjectWriter.h
CParser/AsmLexer.h
CParser/MCAsmLexer.h
CParser/MCAsmParser.h
CStreamer.h
CValue.h
ec0b428398c5fb91fdce5d3d003ab0e4b75b5d6a 29-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Make EmitIntValue non virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120271 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
6f95023a7f27075011a6eb7b84e03732b00a785b 29-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Move EmitValue to MCObjectStreamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120269 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
ea4afa91eb453323948588ad1e1706d842fb9007 28-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Fixed verson of r120245.
Factor some duplicated code into MCObjectStreamer::EmitLabel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120248 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
ba210243ef7d325ef6954d459091edf580a241f9 28-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert previous patch while I debug the darwin bootstrap failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120246 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
f90a2de72c25e24f26577b0dd8145ac21fe10f5e 28-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Factor some duplicated code into MCObjectStreamer::EmitLabel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120245 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
175ccab75f3a355285cf4533c201cbcecfd5928d 28-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Make EmitSymbolValue non virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120244 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
3e03211625bba5bbb70a193c140ebf4dd8388bb7 28-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Avoid code duplication in the many unsupported EmitGPRel32Value implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120243 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
71e7f9210d87fa29202d851c43b5e91bbbd2fa51 28-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Make EmitULEB128IntValue and EmitSLEB128IntValue non virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120242 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
e04ed7e45f194f14a7b28bbf3f55694d8e2bcf80 28-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Define generic 1, 2 and 4 byte pc relative relocations. They are common
and at least the 4 byte one will be needed to implement the .cfi_* directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120240 91177308-0d34-0410-b5e6-96231b3b80d8
CFixup.h
326990f1eb7ff005adabe46a1f982eff8835813e 26-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120166 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
a9d4281cc0557ef679b7917e0741ddb01651dab1 23-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Invalidate the layout on any relaxation, not just Instructions. Bug found by David Meyer.
While here, remove unused argument and rename UpdateForSlide to Invalidate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120009 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
0e11dfc4a6f7e3a3d3bc0365e1da43bc2fa0aac2 23-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Reuse data fragments while lowering. Patch by David Meyer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119999 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
cdfecc8759941c2996214070478d30084b79d463 22-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add basic CFI methods to the streamer interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119972 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
ad8aaa069cfdb3bdc32b1becc8881f67b5272e14 22-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Remove some #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119967 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
e8e98d7f2eaa0613442ce21ab6a040c0f04f5b4d 19-Nov-2010 Kevin Enderby <enderby@apple.com> Added support for the Mach-O .symbol_resolver directive. rdar://8673046


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119816 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CDirectives.h
CMachOSymbolFlags.h
17fd7bda5ac08f873c063c64e1456f8960a0c765 19-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add a MCLineSectionOrder vector so that we produce the line tables in a
deterministic order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119795 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
195a0ce484cd12a5adae9184188f6d0fb52b84c0 19-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Change some methods in MCDwarf.cpp to be able to handle an arbitrary
MCStreamer instead of just MCObjectStreamer. Address changes cannot
be as efficient as we have to use DW_LNE_set_addres, but at least
most of the logic is shared.

This will be used so that, with CodeGen still using EmitDwarfLocDirective,
llvm-gcc is able to produce debug_line sections without needing an
assembler that supports .loc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119777 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
CStreamer.h
5c0556341e29246e697c73844a5f9b1e14474715 18-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Change CodeGen to use .loc directives. This produces a lot more readable output
and testing is easier. A good example is the unknown-location.ll test that
now can just look for ".loc 1 0 0". We also don't use a DW_LNE_set_address for
every address change anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119613 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
f2dc4aa562e2478a73fe5aeeeec16b1e496a0642 17-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> make isVirtualSection a virtual method on MCSection. Chris' suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119547 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
CSectionCOFF.h
CSectionELF.h
CSectionMachO.h
abc756216dbace87826398f8fa1e8e57e401cc86 17-Nov-2010 Daniel Dunbar <daniel@zuster.org> MC-JIT: Stub out "pure" streamer.
- No immediate use, but maybe someone feels like hacking on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119510 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
af6b5808756d6ce335df9eb158efa33894b401c4 16-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add .loc methods to the streamer.

Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer
and then switch codegen to use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119384 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
342e39f9e55d3f4465748c9ab84bf27df7a92478 16-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119380 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
94ed5fca3f5ab5acb74e70b8393b837131e7110c 15-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Change MCExpr::EvaluateAsRelocatableImpl of variables to return the original
variable if recursing fails to simplify it.

Factor AliasedSymbol to be a method of MCSymbol.

Update MCAssembler::EvaluateFixup to match the change in
EvaluateAsRelocatableImpl.

Remove the WeakRefExpr hack, as the object writer now sees the weakref with
no extra effort needed.

Nothing else is using MCTargetExpr, but keep it for now.

Now that the ELF writer sees relocations with aliases, handle

.weak foo2
foo2:
.weak bar2
.set bar2,foo2
.quad bar2

the same way gas does and produce a relocation with bar2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119152 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
db9835d0895337eb94c19e3a30b7d3fc8fcddfd5 15-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR8565.

This moves most of the isUsed logic to the MCSymbol itself. With this we
get a bit more relaxed about allowing definitions after uses: uses that
don't evaluate their argument immediately (jmp foo) are accepted.

ddunbar, this was the smallest compromise I could think of that lets us
accept gcc (and clang!) assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119144 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
1e61e69d401045c54b15815f15a0fdb3ca56a9b5 15-Nov-2010 Chris Lattner <sabre@nondot.org> add targetoperand flags for jump tables, constant pool and block address
nodes to indicate when ha16/lo16 modifiers should be used. This lets
us pass PowerPC/indirectbr.ll.

The one annoying thing about this patch is that the MCSymbolExpr isn't
expressive enough to represent ha16(label1-label2) which we need on
PowerPC. I have a terrible hack in the meantime, but this will have
to be revisited at some point.

Last major conversion item left is global variable references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119105 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
6135a96792ca05f6366e5dbaee6208e84589c47f 14-Nov-2010 Chris Lattner <sabre@nondot.org> reimplement ppc asmprinter "toc" handling to use a VariantKind
on the operand, required for .o file writing and fixing
the PowerPC/mult-alt-generic-powerpc64.ll failure with the new
instprinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119087 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
115a3dd066c277c5417f4d9b9f642b732b76f4e7 13-Nov-2010 Daniel Dunbar <daniel@zuster.org> MC: Simplify Mach-O and ELF object writer implementations.
- What was I thinking?????

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118992 91177308-0d34-0410-b5e6-96231b3b80d8
LFObjectWriter.h
CObjectWriter.h
achObjectWriter.h
e13a0ff8ac6c86a04397801061e1a702d4e0eab1 13-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Parse and record the gnu_unique_object type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118980 91177308-0d34-0410-b5e6-96231b3b80d8
CDirectives.h
c50a0fd7cb6da0e674e154205da65241f9c90e1d 13-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Parse and remember discriminators in .loc line. I try to output them with
another patch.
This lets us parse a bit more of the gcc 4.5 output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118975 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
2ff9e83a826c1c2ee0f1c6072d3d97d5b10678ee 11-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Initial comdat implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118805 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSectionELF.h
4283f4b81e8c1cbf5c7a7b51e949e109ae25ff8c 10-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Use MCSectionELF in places we know we have an ELF section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118699 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
2c4d5125c708bb35140fc2a40b02beb1add101db 10-Nov-2010 Jim Grosbach <grosbach@apple.com> Update ARMConstantPoolValue to not use a modifier string. Use an explicit
VariantKind marker to indicate the additional information necessary. Update
MC to handle the new Kinds. rdar://8647623



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118671 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
34be396a12b00a95a1353c356d64868798ea3098 10-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Fixed version of 118639 with an extra assert to catch similar problems
earlier. Implicit bool -> int conversions are evil!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118651 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSectionELF.h
037b5be15a421b99066bb284027750a16ddd0fae 09-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert previous patch. Missed a case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118645 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSectionELF.h
e61a1ac595deddd291912930efac3616f7c61d08 09-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Remove IsExplicit. It was always false.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118639 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSectionELF.h
187d8339dbc0530850e54a86edf36f1a865a5823 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Relax dwarf line fragments. This fixes a crash in the included testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118365 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
ba21957cbd7b25e3d25a3e9befe6151000242853 05-Nov-2010 Jim Grosbach <grosbach@apple.com> Add '.code 32' assembler directive to MC streamers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118309 91177308-0d34-0410-b5e6-96231b3b80d8
CDirectives.h
ce79299f78bb04e76e1860ab119b85d69f3a19c7 05-Nov-2010 Jim Grosbach <grosbach@apple.com> MC'ize the '.code 16' and '.thumb_func' ARM directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118301 91177308-0d34-0410-b5e6-96231b3b80d8
CDirectives.h
CStreamer.h
d54986f6092ac23dd02c0edf5fc85f692edcc72d 05-Nov-2010 Jim Grosbach <grosbach@apple.com> Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118296 91177308-0d34-0410-b5e6-96231b3b80d8
CDirectives.h
c9d1439051d130cfb947ef9ab4a95737c41e2fd1 05-Nov-2010 Jim Grosbach <grosbach@apple.com> Allow targets to specify the MachO CPUType/CPUSubtype information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118288 91177308-0d34-0410-b5e6-96231b3b80d8
achObjectWriter.h
187ce544b2c6fa5ee6545390f2d07bc471e4159b 02-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Do relaxations with FT_Org fragments. Fixes the FIXME:

// FIXME: We should compute this sooner, we don't want to recurse here, and
// we would like to be more functional.

In MCAssembler::ComputeFragmentSize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118080 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
3ff57094a7d176a759ddb1e1668489d89064f56c 02-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for expressions in .sleb/.uleb directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118023 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CObjectStreamer.h
CStreamer.h
f89671d994ba27e2816a7e49eb8bbc1b43d2a147 01-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Move EmitInstruction to MCObjectStreamer so that ELF and MachO can share it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117925 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
484291c27319668ad99cb87def000254357736fb 01-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement .weakref.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117911 91177308-0d34-0410-b5e6-96231b3b80d8
CELFSymbolFlags.h
CObjectStreamer.h
CStreamer.h
b4d1721eff7b43577e5f2e53f885973fb6c43683 28-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement TLSLD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117547 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
0cf15d61b7e3bf53f5a99f58ada37b93bc039559 28-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement DTPOFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117546 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
a264f72d3fb9dec1427480fcf17ef3c746ea723a 28-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement TLSLDM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117544 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
a0a2f8734cdfc19d44201b791a969bcdda96bb70 28-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement VK_GOTNTPOFF and switch RelocNeedsGOT to use VariantKind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117543 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
eecb858ca86fa949c06f819d6127e2ac68d165c8 22-Oct-2010 Wesley Peck <peckw@wesleypeck.com> Making the e_machine configurable by the target backend in ELFObjectWriter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117099 91177308-0d34-0410-b5e6-96231b3b80d8
LFObjectWriter.h
b5a2d3f8e3b40c3076d03c5db7c4f0387e58b53b 19-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Move the definition of this to the source file to anchor the vtable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116779 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectFormat.h
1be4ab681e086ec83e96d543d37e3474ef400282 19-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Add a virtual destructor to silence a GCC warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116766 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectFormat.h
f230df9af4012f9510de664b6d62b128e26a5861 16-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Add a MCObjectFormat class so that code common to all targets that use a
single object format can be shared.

This also adds support for

mov zed+(bar-foo), %eax

on ELF and COFF targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116675 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
CObjectFormat.h
82635f080c14ee0b979916ffb34f0c8daf08f78c 12-Oct-2010 Jim Grosbach <grosbach@apple.com> Comment grammar tweakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116322 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
17b443df4368acfad853d09858c033c45c468d5c 12-Oct-2010 Jason W Kim <jason.w.kim.2009@gmail.com> Second set of ARM/MC/ELF changes.

Added ARM specific ELF section types.
Added AttributesSection to ARMElfTargetObject
First step in unifying .cpu assembly tag with ELF/.o
llc now asserts on actual ELF emission on -filetype=obj :-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116257 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
60cb528246dd01b80b1b1260a2a877ea488e620a 11-Oct-2010 Chris Lattner <sabre@nondot.org> Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116190 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
6313944845265dbf38e68046a047d78162f5b89e 08-Oct-2010 Jim Grosbach <grosbach@apple.com> Allow << streaming of MCOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116107 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
069594a94f485729e82aec29d2e8d16eb47744fa 07-Oct-2010 Jim Grosbach <grosbach@apple.com> Add output stream operator for MCInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115974 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
4778643912832bc8118eace1aee16554117a8eef 06-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Cleanup Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115829 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionCOFF.h
CSectionELF.h
CSectionMachO.h
8f413fa9c00dbaea000ddfe265ab5edd285ea3ab 05-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> On ELF we need to know which symbols are used in relocations to decide if
they should be in the symbol table or not. Instead of "guessing", just compute
the symbol table after the relocations are known.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115619 91177308-0d34-0410-b5e6-96231b3b80d8
LFObjectWriter.h
CObjectWriter.h
achObjectWriter.h
3f55c24df9527de345f6cc960944840a7a101c6a 04-Oct-2010 Kevin Enderby <enderby@apple.com> Incorporate suggestions by Daniel Dunbar after his review. Thanks Daniel!

1) Changed ValidateDwarfFileNumber() to isValidDwarfFileNumber() to be better
named. Since it is just a predicate and isn't actually changing any state.

2) Added a missing return in the comments for setCurrentDwarfLoc() in
include/llvm/MC/MCContext.h for fix formatting.

3) Changed clearDwarfLocSeen() to ClearDwarfLocSeen() since it does change
state.

4) Simplified the last test in isValidDwarfFileNumber() to just a one line
boolean test of MCDwarfFiles[FileNumber] != 0 for the final return statement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115551 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
083cf1574facc9ce468fba1735c794bd7e520108 04-Oct-2010 Jan Wen Voung <jvoung@google.com> Add hook in MCSection to decide when to use "optimized nops", for each
section kind. Previously, optimized nops were only used for MachO.
Also added tests for ELF and COFF.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115523 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
CSectionCOFF.h
CSectionELF.h
CSectionMachO.h
3bb435301a2b5c901a993b0e151d05b596697038 30-Sep-2010 Kevin Enderby <enderby@apple.com> Did my commit for the last patch for the .loc directory from the wrong place and
missed a bunch of files. Here the rest. Sorry about that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115173 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CContext.h
CDwarf.h
CObjectWriter.h
CStreamer.h
186e7a0fb1b2028e4fa9c3efe29d9433c91b3f66 30-Sep-2010 Jan Wen Voung <jvoung@google.com> Move logic of determining ELF entsize from the .s printer to initialization
time. That way, the EntrySize field is initialized for other code paths,
namely, the .ll -> .o code path.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115141 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
afd1cc25786f68ca56a63d29ea2bd297990e9f81 30-Sep-2010 Jason W Kim <jason.w.kim.2009@gmail.com> Tiny patch for proof-of-concept cleanup of ARMAsmPrinter::EmitStartOfAsmFile()
Small test for sanity check of resulting ARM .s file.
Tested against -r115129.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115133 91177308-0d34-0410-b5e6-96231b3b80d8
CDirectives.h
7070387f08f7dc797b554ed8013cba9f8b74121a 30-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Make it possible for the MCObjectWriter to decide if a given fixup is fully
resolved or not. Different object files have different restrictions and
different native assemblers have different idiosyncrasies we want to emulate
for now.

Move the existing MachO logic to the new place and implement an ELF one that
gets fixups to globals right.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115131 91177308-0d34-0410-b5e6-96231b3b80d8
LFObjectWriter.h
CAssembler.h
CObjectWriter.h
achObjectWriter.h
4f2afe3d399eb9485dc605f3cc3a6382dcae757a 27-Sep-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Handle exponents in floating point literals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114861 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmLexer.h
b814110612024a092fd884050fbab9d012b16dc7 27-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114852 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
54f0a625b0eb9afeece652a8462755010d237c78 24-Sep-2010 Daniel Dunbar <daniel@zuster.org> MC/Lexer: Add 'Real' token type for floating point literals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114718 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmLexer.h
f10dfa910def9cdca566edbd6d2089b075a57b21 23-Sep-2010 Jim Grosbach <grosbach@apple.com> trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114680 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
637d89fe0eca4fa2b9c95f6c15eb69a99bae83bc 23-Sep-2010 Jim Grosbach <grosbach@apple.com> Add support for ELF PLT references for ARM MC asm printing. Adding a
new VariantKind to the MCSymbolExpr seems like overkill, but I'm not sure
there's a more straightforward way to get the printing difference captured.
(i.e., x86 uses @PLT, ARM uses (PLT)).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114613 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
59ff3c913449402ad5447bbe3ae6338402fb84b0 23-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Avoid some Mach-O specific alignment being done on ELF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114594 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CObjectStreamer.h
e07b75e069969558c3fbb2f5bfb9a652f6ea1d6b 23-Sep-2010 Chris Lattner <sabre@nondot.org> allow target-specific label suffixes, patch by Yuri Gribov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114592 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
fd2eaed4f0a9375071a448993c573a124370ed34 17-Sep-2010 Jim Grosbach <grosbach@apple.com> trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114211 91177308-0d34-0410-b5e6-96231b3b80d8
CInstPrinter.h
6dbe29e34e0017dac703f951429964d9c95b528c 16-Sep-2010 Jim Grosbach <grosbach@apple.com> make this non brain dead...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114100 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
dc01b2e1df93b02bcee8457a91ab66e4110a599a 16-Sep-2010 Jim Grosbach <grosbach@apple.com> Remove unnecessary by-reference return.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114099 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
a8e47b3319db56675f8e80f4bb015c163110b902 16-Sep-2010 Jim Grosbach <grosbach@apple.com> store MC FP immediates as a double instead of as an APFloat, thus avoiding an
unnecessary dtor for MCOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114064 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
d80781b98b771d370730ab7c630018f23e202b57 15-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Add a InitSections method to the streamer interface.

The ELF implementation now creates text, data and bss to match the gnu as
behavior.

The text streamer still has the old MachO specific behavior since
the testsuite checks that it will error when a directive is given
before a setting the current section for example.

A nice benefit is that -n is not required anymore when producing
ELF files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114027 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
26edbcb8d5da5fb65816a97f740c9868fa798df4 15-Sep-2010 Jim Grosbach <grosbach@apple.com> Add support for floating point immediates to MC instruction printing. ARM
VFP instructions use it for loading some constants, so implement that
handling.

Not thrilled with adding a member to MCOperand, but not sure there's much of
a better option that's not pretty fragile (like putting a double in the
union instead and just assuming that's good enough). Suggestions welcome...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113996 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
0dd2c9331887b9d0aa06b1e201c5eda4361365fc 15-Sep-2010 Jim Grosbach <grosbach@apple.com> trailing whitespace and 80 column cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113977 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
CStreamer.h
cbf8a98c7c652e96967623c80cb945fef001b090 11-Sep-2010 Chris Lattner <sabre@nondot.org> fix the asmparser so that the target is responsible for skipping to
the end of the line on a parser error, allowing skipping to happen
for syntactic errors but not for semantic errors. Before we would
miss emitting a diagnostic about the second line, because we skipped
it due to the semantic error on the first line:

foo %eax
bar %al

This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113688 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmParser.h
5baf79edc067a4b17d024cc10324ac88c17e3e43 09-Sep-2010 Roman Divacky <rdivacky@freebsd.org> Make ELF OS ABI dependent on the OS from target triple.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113508 91177308-0d34-0410-b5e6-96231b3b80d8
LFObjectWriter.h
1674b0b0e4972b844833f253286cbf99a6e99d6e 02-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Add AsmParser support for the ELF .previous directive. Patch by Roman Divacky.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112849 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
b1fcfbe89bd155fb88485b2a3a995adba3994003 02-Sep-2010 Devang Patel <dpatel@apple.com> Fix .debug_range for linux. Patch by Krister Wombell.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112830 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
ae84d5b9bafd1ba88aa12e8398e5385f229fa306 01-Sep-2010 Devang Patel <dpatel@apple.com> Use absolute label for DW_AT_stmt_list if a target does not prefer offset here.
This patch was developed on top of original patch by Artur Pietrek.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112678 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
47b7efc0828d9587613b2f2865a6d07ed55c5bec 01-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove noisy semicolon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112673 91177308-0d34-0410-b5e6-96231b3b80d8
CDwarf.h
232ab949d5ed04c4ab45c763e0597fc3fc3fa5bc 01-Sep-2010 Kevin Enderby <enderby@apple.com> This is the second of three patches to implement support for the .loc directive
and output the dwarf line number tables. This takes the current loc info after
an instruction is assembled and saves the needed info into an object that has
vector and for each section. These objects will be used for the final patch to
build and emit the encoded dwarf line number tables. Again for now this is only
in the Mach-O streamer but at some point will move to a more generic place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112668 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
c1840b3da25222680b51f853697a871fedda51d5 24-Aug-2010 Kevin Enderby <enderby@apple.com> First bit of support for the dwarf .loc directive. This patch updates the
needed parsing for the .loc directive and saves the current info from that
into the context. The next patch will take the current loc info after an
instruction is assembled and save that info into a vector for each section for
use to build the line number tables. The patch after that will encode the info
from those vectors into the output file as the dwarf line tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111956 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
da0bfcdaf95d95a66e306ef6d45f638939272d34 21-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC: Add partial x86-64 support to COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111728 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
d7343ddce500c8043a58dd50cac6127ba7d9d9a3 17-Aug-2010 Anton Korobeynikov <asl@math.spbu.ru> Add some win64 coff goodness.
Patch by Cameron Esfahani!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111287 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
73c32f60c41f5078d5b460e3e7c23e40ab7e3e55 17-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Revert r111230, we have to find a better place for the host-specific code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111232 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
8466efc36f57ec24fc42f91d70d5a70f38690a48 17-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Micro-optimize MCObjectWriter to do a byteswap if necessary and then write the
whole integer to the stream instead of doing byte-sized writes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111230 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
3565a06ebf44a193a8b333cbeff2ee154298d450 16-Aug-2010 Matt Fleming <matt@console-pimps.org> Add ELF ObjectWriter and Streamer support.

I forgot to add these files in commit 111172.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111174 91177308-0d34-0410-b5e6-96231b3b80d8
LFObjectWriter.h
CELFSymbolFlags.h
6b2e257e74b2c8e2f93bb244e0c80cb73005b74a 16-Aug-2010 Matt Fleming <matt@console-pimps.org> Add ELF ObjectWriter and Streamer support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111172 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
CStreamer.h
a8bf473fb15bbedc78144ec57438f884616283b0 16-Aug-2010 Matt Fleming <matt@console-pimps.org> Layout helper function.

Introduce a helper method to add a section to the end of a layout. This
will be used by the ELF ObjectWriter code to add the metadata sections
(symbol table, etc) to the end of an object file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111171 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
6c8b3d2f1f6fe6eb6a7ae81eab24c1b6db9232ae 16-Aug-2010 Matt Fleming <matt@console-pimps.org> Record a symbol's size which is needed for ELF symbol tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111170 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
3e09669bc44aeb053e58ae8245ad0e49570b0e21 16-Aug-2010 Matt Fleming <matt@console-pimps.org> ELF entry size support.

Some ELF sections contain fixed-sized entries. Provide a way to record
the entry size of a section.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111169 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSectionELF.h
3c14ca47fc057c5999cd41ce2782e0ebaa2bcf7d 11-Aug-2010 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add -show-inst-operands, for dumping the parsed instruction representation before matching.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110791 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmParser.h
b3cb6967949493a2e1b10d015ac08b746736764e 11-Aug-2010 Daniel Dunbar <daniel@zuster.org> MCAsmParser: Add dump() hook to MCParsedAsmOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110790 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCParsedAsmOperand.h
b07ce60981368f816af4caa3257e1e4ebf059133 10-Aug-2010 Kevin Enderby <enderby@apple.com> Next bit of support for the dwarf .file directive. This patch takes the
previously collected info from the .file directives and outputs the encoded
bytes for it. For now this is only in the Mach-O streamer but at some point
will move to a more generic place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110617 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
991808005a27b2e0049e124bf69250281276c317 08-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove unused variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110551 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
c257c669df0412606bfd06668367a0fc7f96df0a 06-Aug-2010 Daniel Dunbar <daniel@zuster.org> MC: Add default value for AddrSpace argument to EmitValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110475 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
e2195d8b357d7081edb5eb09d1d6e9d7b4bfc308 31-Jul-2010 Michael J. Spencer <bigcheesegs@gmail.com> Add relax all support to the COFF object streamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109947 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
1abcd06856df324eac98d4bf5ba673fb77ae6a11 29-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109767 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
3bce5adb32fbbe5c5549b902f4d65737f40c1499 29-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Stop leaking std::strings in GetDwarfFile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109746 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
7cbf73a73f296167b6e978dbd919ed249e88eeb5 28-Jul-2010 Kevin Enderby <enderby@apple.com> Added first bit of support for the dwarf .file directive. This patch collects
the info from the .file directive and makes file and directory tables that
will eventually be put out as part of the dwarf info in the output file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109651 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CDwarf.h
36880e704f63d4c77a3c5a94047b5afdf79e82db 28-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Put back the MCFragment vtable, so subclasses are destroyed properly (duh).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109649 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
c96a82a53415fd0b6cb1bbea2593dc18683c70cc 22-Jul-2010 Reid Kleckner <reid@kleckner.net> Initial modifications to MCAssembler and TargetMachine for the MCJIT.

Patch by Olivier Meurant!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109080 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
8067adc271d7ccfcd28a238d73942b21a5e2bc62 19-Jul-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC: Add WinCOFFStreamer implementation and merge common code from MachO
into MCObjectStreamer.

Origonal Windows COFF implementation by Nathan Jedffords.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108678 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
1edf6ca2cbb4b01db44683d5e9479a240cfcf497 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Stop playing unsafe member function pointer calls, this isn't
portable enough.
- Downside is we now double dispatch through a stub function, but this isn't
performance critical.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108661 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmParser.h
CParser/MCAsmParserExtension.h
6a46d571b461246e36f82c146e17bf614d2114ea 18-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Fix .abort and .secure_log_unique to accept arbitrary token
sequences, not just strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108655 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmParser.h
f21e4e9326aa3ebc78bc2770722fb5150fe7ede9 18-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Fix TokError() to accept a Twine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108647 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmParser.h
CParser/MCAsmParserExtension.h
aef87e3307f61fa54004b5ea01b619bf4e901ac3 18-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Hide the AsmParser implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108646 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
d1e3b44d6c0094eda2e2a854d5fdb6a0d7ba327e 17-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Lift Run() and TargetParser to base class.

Also, add constructor function for creating AsmParser instances.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108604 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
CParser/MCAsmParser.h
38e59891ee4417a9be2f8146ce0ba3269e38ac21 15-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Don't pass StringRef by reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108366 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
a838bae1863b463c07056c086ab7c23faa9759e7 13-Jul-2010 Chris Lattner <sabre@nondot.org> use a typedef instead of its expansion, patch by Michael Spencer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108229 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
4d5fe97c479ed3a2736755a3b821f5ff99c67cdc 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Move .section parsing to Darwin specific parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108190 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
19ad3b88f71fdc0fe0ec19e05bb37c3ef1a42b5b 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmLexer: Raise LexUntilEndOfStatement to MCAsmLexer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108189 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmLexer.h
CParser/MCAsmLexer.h
47f5608029cbb7213b8624294f7ff1c39c952b6b 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Move special section directive parsing to Darwin specific parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108187 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
4c7c08bfbfc3858bddf0ba52550edb683f0070c9 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Inline AsmParser::CreateSymbol into callers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108183 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
b6c3a607ac91dc4fdd0b195e9df2b04eaa53a1ef 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Move .tbss and .zerofill parsing to Darwin specific parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108180 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
492b7a21cb28adf8819ee369f42a8129de5227ae 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Move .desc parsing to Darwin specific parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108179 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
38a4e2acb7d01fbba3544882084bc9955812b7d3 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Move .lsym parsing to Darwin specific parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108176 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
CParser/MCAsmParser.h
9ac66b008d74d0a981455a2220136c59cf363226 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Move some misc. Darwin directive handling to DarwinAsmParser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108174 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
4e82bbb745160f19d76b9b5de5b93ebe224e1acf 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MCAsmParser: Add getSourceManager().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108171 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
CParser/MCAsmParser.h
CParser/MCAsmParserExtension.h
e47497087b00fd4519057d3bd30e8bd4af61c6ca 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Add a DarwinAsmParser extension.
- Currently initialization is a bit of a hack, but harmless. We need to rework
various parts of target initialization to clean this up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108165 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
81ea00f45d59953d34a1db4973dd72d14080ab15 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MCAsmParser: Pull some directive handling out into a helper class, and change
DirectiveMap to be based on MCAsmParserExtension.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108161 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
CParser/MCAsmParser.h
53131982d6290e3a865f400174778deaac452ff3 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Add MCAsmParserExtension, a base class for all the target/object specific
classes which want to extend the basic asm parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108158 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
CParser/MCAsmParserExtension.h
dc4c7da5d4c73bef2ce73ce0f96019457337c402 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Move AsmParser::TokError to MCAsmParser().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108155 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
CParser/MCAsmParser.h
ca90dc6d295f7f6a5ef4240f26bcebe54276def5 12-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Move getLoc() to MCAsmLexer().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108154 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmLexer.h
CParser/MCAsmLexer.h
b162290e39afd49d4c7d342333b331bc96232720 12-Jul-2010 Chris Lattner <sabre@nondot.org> introduce WinCOFFObjectWriter, patch by Michael Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108103 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
eb72dcaef7423069cf8f9e802fa8de64dc8f8f30 12-Jul-2010 Chris Lattner <sabre@nondot.org> introduce WinCOFFStreamer.cpp, patch by Michael Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108102 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
1b02acb2a0513b3ec20585196d485ebc3da0ccec 08-Jul-2010 Kevin Enderby <enderby@apple.com> Revert some unneeded parts of the change in r107886 for the
.weak_def_can_be_hidden directive. Chris pointed out that the MCAsmInfo.h/.cpp
chunks aren't needed for this until the compiler starts generating these. And
when that happens it will be more convenient for it to be a bool than a const
char*.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107906 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
f59cac5ed36360b4c462781051f996b3499d7e0f 08-Jul-2010 Kevin Enderby <enderby@apple.com> Added the darwin .weak_def_can_be_hidden directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107886 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CDirectives.h
b57096842479bc67111a16f0a0bcee717eb6df8c 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Fix some stray hunks I didn't intend to commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107428 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
9186fa6b0c8806786cae78bed50f95d1c7ce2b00 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Pass the target instance to the AsmParser constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107426 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
94610588af55ae7d16ba7d72d1e68324631ec249 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Move COFF enumeration constants to llvm/Support/COFF.h, patch by Michael
Spencer!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107418 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionCOFF.h
dd2ad8432f104282ff43c94457f474ea0a264175 01-Jul-2010 Mikhail Glushenkov <foldr@codedgers.com> Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107360 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
ectionKind.h
07d317711781d8c9268f7d6afcf1ba7eadf1d127 30-Jun-2010 Bill Wendling <isanbard@gmail.com> Revert r107205 and r107207.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
207855cff9b4811004b9720f28a5bd0adf3784b7 29-Jun-2010 Bill Wendling <isanbard@gmail.com> Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
f187ac5a23213f85c3c1f0f80b3592295ee6441d 28-Jun-2010 Kevin Enderby <enderby@apple.com> Added the darwin .secure_log_unique and .secure_log_reset directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107077 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CParser/AsmParser.h
843aa1f15b06fc3c2b39740ffb5bffd2fa6827ce 16-Jun-2010 Daniel Dunbar <daniel@zuster.org> MC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106142 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
83b467178a8295048f3ee7b44ff9c7ea244a96cc 16-Jun-2010 Daniel Dunbar <daniel@zuster.org> MC: Lift SwitchSection() and Finish() into MCObjectStreamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106141 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
8dc68ab931e0f0a7c5caf9cd341b2ec855733863 16-Jun-2010 Daniel Dunbar <daniel@zuster.org> MC: Factor out an MCObjectStreamer class, which will be shared by the concrete
object file format writers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106140 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectStreamer.h
4b1000d117f1b7cc5411bc251d141fe182a4ae1c 01-Jun-2010 Dan Gohman <gohman@apple.com> Don't call flush() at a library level which isn't checking for errors
and doesn't know where the output is going.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105274 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
d86e6ac9892ee61742d85f9f14f1179216d2e47b 01-Jun-2010 Dan Gohman <gohman@apple.com> Fix a typo in a comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105272 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
c90e30aa6f3792a460202017523171f435e2ba34 26-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Eliminate MCAsmFixup, replace with MCFixup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104699 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CObjectWriter.h
achObjectWriter.h
0dd0c941c9eb4adc13319ed7adcaffe58a68d294 26-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Simplify MCFixup and increase the available offset size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104698 91177308-0d34-0410-b5e6-96231b3b80d8
CFixup.h
482ad802f1b1885542ea8a30e144a228a1526912 26-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Use accessors for access to MCAsmFixup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104697 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
e614e393c7f80a39430b8a69813f5fd1f4c77cf9 26-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Eliminate MCFragment vtable, which was unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104689 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
96ac5156cadde7e4494990d5b4f873e76787a370 26-May-2010 Eric Christopher <echristo@apple.com> Start adding mach-o tls reloc support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104651 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
fdb5a8617996a20370756962e34c2e80176d6e87 23-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Add an MCLoggingStreamer, for use in debugging integrated-as mismatches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104463 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
0df4a80e2063424929bbfaa61dd7973062218ad4 22-May-2010 Eric Christopher <echristo@apple.com> Fix comment and whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104392 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
0783fb7e6d2f03cbb398dc0f083c96ba8af9ab21 21-May-2010 Nathan Jeffords <blunted2night@gmail.com> added an assertion to MCObjectWriter::WriteBytes to catch misuse of the ZeroFillSize parameter

If the size of the string is greater than the zero fill size, the function will attempt to write a very large string of zeros to the object file (~4GB on 32 bit platforms). This assertion will catch the scenario and crash the program before the write occurs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104334 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
924c5e58f2a7c89019000e7dee3391dcebdf8a21 21-May-2010 Matt Fleming <matt@console-pimps.org> Add support for parsing the ELF .type assembler directive.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104316 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
CParser/MCAsmLexer.h
51f5d6af8c45bf145808ced9e867ac711acc9955 20-May-2010 Eric Christopher <echristo@apple.com> Fix build by actually declaring the variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104201 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
c1a887d76d95100e7e05aa76e077710bc4e0b1cf 20-May-2010 Eric Christopher <echristo@apple.com> Partial code for emitting thread local bss data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104197 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
4d01cbe93b0e1a349b5c2881f1b319963f9e0504 18-May-2010 Eric Christopher <echristo@apple.com> Make EmitTBSSSymbol take a section argument so that we can find it later.
Fix up callers and users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104057 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
ebe7fcd041e1e9c3a0c535b26d8cdb45805bbeb8 18-May-2010 Kevin Enderby <enderby@apple.com> Added support in MC for Directional Local Labels.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103989 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CLabel.h
c6177a4531a5d7e2207a3184cc8a4f1792073a7d 18-May-2010 Eric Christopher <echristo@apple.com> More data/parsing support for tls directives. Add a few more testcases
and cleanup comments as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103985 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionMachO.h
9a744e38607bc3046dffea56efec0b2dfc51d5e4 17-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Add dyn_cast support to MCSection.
- Of questionable utility, since in general anything which wants to do this should probably be within a target specific hook, which can rely on the sections being of the appropriate type. However, it can be useful for short term hacks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103980 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
CSectionCOFF.h
CSectionELF.h
CSectionMachO.h
423c9e3e589a79be757842d421600590c68d5b43 17-May-2010 Eric Christopher <echristo@apple.com> Add some section and constant support for darwin TLS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103974 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionMachO.h
525a3a67c16c2d1d9ce9d75ed1b44296be6c2270 17-May-2010 Daniel Dunbar <daniel@zuster.org> llvm-mc: Support reassignment of variables in one special case, when the
variable has not yet been used in an expression. This allows us to support a few
cases that show up in real code (mostly because gcc generates it for Objective-C
on Darwin), without giving up a reasonable semantic model for assignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103950 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
482eba054ab3543ee0e1f453d3d6441092f4b76d 14-May-2010 Eric Christopher <echristo@apple.com> Add AsmParser support for darwin tbss directive.

Nothing uses this yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103757 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
CStreamer.h
3fa0c8ca96edbd2c77541c937b10149c6fb08cac 14-May-2010 Nick Lewycky <nicholas@mxc.ca> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103755 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
47b3ec4daa12019b98468e8f646501ec285bbb59 14-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Switch to completely lazy layout.
- The eliminates the last major algorithmic problem with MC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103754 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
9005d45a990ef46f06800bd6bd6a7d1298a33645 14-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Extend MCAsmLayout to explicitly track which fragments have been layed out, and enforce several invariants to LayoutFragment to ensure we only do layout in a sensible order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103753 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
337718e09c99349939a53643984c04f5dc118bb7 14-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Switch MCFragment to storing the layout order index, not its index in the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103751 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
afc6acdab7ba3544d76329ab461f14a93cee67a2 14-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Change LayoutSection() to only do the section initializiation.

Also, elimminate MCAsmLayout::set*, which are no longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103750 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
b69fc044db8c193348b6611f46432bb21b3cbe90 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Move Layout{Fragment,Section} into MCAsmLayout, and add LayoutFile().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103738 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
2c18d3b0fec25b2b7befc7ac5751e84005f4a869 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Factor out MCAssembler::ComputeFragmentSize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103724 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
f60c736c64d6c9d683df1cead3631958359c14f1 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Add section layout order indices to MCSectionData.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103715 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
aa0d350fe54b0bf13947cdb08d8e76e4ec233d6f 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Add MCAsmLayout::FragmentReplaced() helper function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103709 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
2661f11e4602ad017fa155f6fdcee0a4f2d1ae86 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Eliminate MCSectionData::{,Address,File}Size, which can now be computed by
utility functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103695 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
456b5012704bcece2c8c28783e6efabb7b998616 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Add MCAlignFragment::OnlyAlignAddress bit. This is a bit of magic that says the align fragment shouldn't contribute to the logical section size, it is will be used for cleaning up the code to handle section alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103690 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
b5844ff1c44f0427bcf132eaece945da411e650f 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Add MCSectionData::AddressSize, which is the size of the address space consumed by the section. This can differ from both the section logical size, and the section size on disk (although the current code handles this without making an explicit distinction).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103689 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
1c15413ebc8f4a35545a381a789a718627396d03 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Move MCAlignFragment::EmitNops value out of the constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103665 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
4e544870c4c3f81b150e4c3b38a18d629d706b74 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Eliminate MCZeroFillFragment, it is no longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103664 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
3153fec733acd079a9e681d16d39253b9517e02c 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Switch MCFillFragment to storing total fill size instead of a count. This allows using ValueSize==0 to represent a virtual fill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103662 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
e73d49eda2cb4fc30b52c4a241acf69c8af98302 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Drop support for alignment in ZeroFill fragment, we can just use
MCAlignFragments for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103661 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
f0d17d2461a6458568672f611ba4a590d26b1e1a 12-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Factor out MCAssembler::LayoutFragment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103649 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
d13a0caf726e05c9bd939d752ef371d6d467ef28 12-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Simplify LayoutSection to just take the index of the section to layout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103627 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
bc1a0cf13950dcd64d6d0398df5419a0a2931721 12-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Track section layout order explicitly, and use to simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103616 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
18c1021ec108722506125926087b1e5fcfb28046 12-May-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for movi32 of global values to the new (MC) asm printer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103576 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
624d466a671feb563c137d1216ecad9d03d1a2ed 12-May-2010 Nathan Jeffords <blunted2night@gmail.com> Added a trivial function to modify the flags field of MCSymbolData class. The function takes the value and a mask, and clears the mask bits before applying the value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103534 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
651804c3d63a05f72221a6d133e5b344e6aaa093 11-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O x86_64: Switch to using fragment atom symbol.
- This eliminates getAtomForAddress() (which was a linear search) and
simplifies getAtom().
- This also fixes some correctness problems where local labels at the same
address as non-local labels could be assigned to the wrong atom.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103480 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
071f73db4a0c3f7f00ef14d38af17f3c8d69827a 11-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Explicitly track atoms, as represented by their defining symbol, for each fragment (not yet used).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103438 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
b54b9ddaaf2d258767d360583642ed1b91075fc9 08-May-2010 Chris Lattner <sabre@nondot.org> break coff symbol definition stuff out into proper MCStreamer callbacks,
patch by Nathan Jeffords!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103346 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
6e5ce287b0e53c264af0ba37169ad964e19b5bb7 07-May-2010 Chris Lattner <sabre@nondot.org> add COFF support for COMDAT sections, patch by Nathan Jeffords!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103304 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSectionCOFF.h
a6eeb6e226d7d86d04e34e3b6464f66e0a052f43 07-May-2010 Kevin Enderby <enderby@apple.com> Fix i386 relocations to Weak Definitions. The relocation entries should be
external and the item to be relocated should not have the address of the
symbol added in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103302 91177308-0d34-0410-b5e6-96231b3b80d8
CMachOSymbolFlags.h
eb40a0fd98c44ecc6360e7fab33cf9e9911bed4f 07-May-2010 Chris Lattner <sabre@nondot.org> switch MCSectionCOFF from a syntactic to semantic representation,
patch by Peter Housel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103267 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSection.h
CSectionCOFF.h
8d627d31531ad45fecca82d52cd34092c7c4cc1d 05-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Make setVariableValue check the redefinition condition a bit more strongly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103110 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
08a408a4b3224627db07eb27e174085d8e1d2426 05-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103095 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
ae7fb0b03ebc524e6c47f0262b8dc87810fee1a8 05-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/x86_64: Relocations in debug sections should use local relocations
when possible.
- <rdar://problem/7934873>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103092 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionMachO.h
b9a01bcf486814a44098745920d43daaf9f7c260 29-Apr-2010 Mon P Wang <wangmp@apple.com> Add support for assemblers that don't support periods in a name


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102594 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
a5370f11d9c27b2cb37fa61eb29eb56356582978 19-Apr-2010 Dan Gohman <gohman@apple.com> Add a const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101777 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
eef6d78be1c3a685f277be3e89ff17f67ed65f49 17-Apr-2010 Chris Lattner <sabre@nondot.org> teach the x86 asm parser how to handle segment prefixes
in memory operands. rdar://7874844


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101661 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
7834facff938cccce294e5c4065202d922411a5d 17-Apr-2010 Chris Lattner <sabre@nondot.org> refactor .if handling code a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101659 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
d305035155ef3d138e102434bf5a733ea2e32405 14-Apr-2010 Chris Lattner <sabre@nondot.org> implement mc asmparser support for '.', which gets the
current PC. rdar://7834775

We now produce an identical .o file compared to the cctools
assembler for something like this:

_f0:
L0:
jmp L1
.long . - L0
L1:
jmp A
.long . - L1

.zerofill __DATA,_bss,A,0



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101227 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmLexer.h
535f4de469c58e326e8bf49310ac30fe4e792a02 13-Apr-2010 Sean Callanan <scallanan@apple.com> Quick fix for build errors caused by undefined
NULL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101180 91177308-0d34-0410-b5e6-96231b3b80d8
CDisassembler.h
9899f70a7406d632c82849978bf6981f1ee4ccb5 13-Apr-2010 Sean Callanan <scallanan@apple.com> Fixed a nasty layering violation in the edis source
code. It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.

Also removed hacky #define-controlled initialization
of targets in edis. If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101179 91177308-0d34-0410-b5e6-96231b3b80d8
DInstInfo.h
CDisassembler.h
287df1bc0309962770b6c176f2d143795dd3cc2f 08-Apr-2010 Chris Lattner <sabre@nondot.org> delete a forwarding function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100815 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
74aae4726a66733c5872588287535a984f9a94c7 08-Apr-2010 Chris Lattner <sabre@nondot.org> move elf section uniquing to MCContext. Along the way
merge XCore's section into MCSectionELF


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100812 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CContext.h
CSectionELF.h
CSectionMachO.h
22772214de79aa1c5ca38c4fb1da137d8fb30a05 08-Apr-2010 Chris Lattner <sabre@nondot.org> remove the TargetLoweringObjectFileMachO::getMachoSection
api and update clients to use MCContext instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100808 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
f0559e4b242e85d4b9d1dd08758814c599bdce13 08-Apr-2010 Chris Lattner <sabre@nondot.org> move macho section uniquing from MCParser and TLOF to MCContext where
the compiler and asmparser now unique to the same sections. This fixes
rdar://7835021.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100807 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CParser/AsmParser.h
CSectionMachO.h
79180e2ef5ff4aa3c8f64b13736e8648663f3965 06-Apr-2010 Chris Lattner <sabre@nondot.org> Give AsmParser an option to control whether it finalizes
the stream. New demo:

$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
000000000000000b movl %eax,(%rsp)
000000000000000e movl %eax,0x04(%rsp)
0000000000000012 addq $0x08,%rsp
0000000000000016 ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100492 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
3d2251361171b1a41bdb2ac71882e69d48617f49 05-Apr-2010 Chris Lattner <sabre@nondot.org> eliminate the magic AbsoluteDebugSectionOffsets MAI hook,
which is really a property of the section being referenced.
Add a predicate to MCSection to replace it.

Yay for reduction in magic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100367 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CSection.h
CSectionELF.h
0887fa0b8c966234025535d4adcbd5f562a3c0a5 04-Apr-2010 Chris Lattner <sabre@nondot.org> isAbsoluteEHSectionOffsets always returns false, eliminate it
and substitute false at the one call site.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100354 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
d374087be5360a353a4239a155b1227057145f48 04-Apr-2010 Chris Lattner <sabre@nondot.org> fix an ugly wart in the MCInstPrinter api where the
raw_ostream to print an instruction to had to be specified
at MCInstPrinter construction time instead of being able
to pick at each call to printInstruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100307 91177308-0d34-0410-b5e6-96231b3b80d8
CInstPrinter.h
58bc4dd4a91443ddd3120b0a2f1801ad4d6aae1c 04-Apr-2010 Chris Lattner <sabre@nondot.org> add a twine form of MCStreamer::EmitRawText, and mc'ize
a few more things in AsmPrinter.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100294 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
91bead790518fcf5cb26019fb1ebf2372e8a5b3f 03-Apr-2010 Chris Lattner <sabre@nondot.org> add a new EmitInlineAsm function to asmprinter to handle inline asm.
If we have an MCAsmStreamer, we continue to emit asm textually,
otherwise we (currently) emit an error to errs and ignore it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100289 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
9b97a73dedf736e14b04a3d1a153f10d25b2507b 30-Mar-2010 Chris Lattner <sabre@nondot.org> Rip out the 'is temporary' nonsense from the MCContext interface to
create symbols. It is extremely error prone and a source of a lot
of the remaining integrated assembler bugs on x86-64.

This fixes rdar://7807601.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99902 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CExpr.h
ac2884a717daf3ad2aa8425320795d661e8a980b 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always need
exactly two passes in that case, and don't ever need to recompute any layout,
so this is a nice baseline for relaxation performance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99563 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CStreamer.h
0cc8bd48619b943379f5c2cc11a19fb189342925 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Stop restarting layout on every relaxation.
- Still O(N^2), just a faster form, and now its the MCAsmLayout's fault.

On the .s I am tuning against (combine.s from 403.gcc):
--
ddunbar@lordcrumb:MC$ diff stats-before.txt stats-after.txt
5,10c5,10
< 1728 assembler - Number of assembler layout and relaxation steps
< 7707 assembler - Number of emitted assembler fragments
< 120588 assembler - Number of emitted object file bytes
< 2233448 assembler - Number of evaluated fixups
< 1727 assembler - Number of relaxed instructions
< 6723845 mcexpr - Number of MCExpr evaluations
---
> 3 assembler - Number of assembler layout and relaxation steps
> 7707 assembler - Number of emitted assembler fragments
> 120588 assembler - Number of emitted object file bytes
> 14796 assembler - Number of evaluated fixups
> 1727 assembler - Number of relaxed instructions
> 67889 mcexpr - Number of MCExpr evaluations
--
Feel free to LOL at the -before numbers, if you like.

I am a little surprised we make more than 2 relaxation passes. It's pretty
trivial for us to do relaxation out-of-order if that would give a speedup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99543 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
f476b00f51c98d12dda1f3a7c8455f8d74812c6d 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Simplify main section layout process by moving alignment into LayoutSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99529 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
be644a38c09bd0fa03bb07f48f2c1dec32052de8 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Sink Section address assignment into LayoutSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99528 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
5a6e97a7e4e25265cd491f10cc9b0676ff5c0746 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Explicity track section and fragment ordinals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99500 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
5d428511ca9607d52a09d3483d0738f483e09934 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Route access to SectionData offset and file size through MCAsmLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99474 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
432cd5fd9b4c97f1e4a53fcf45e16f7dd6bc085e 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Route access to Fragment offset and effective size through MCAsmLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99473 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
7c3d45a03e64ac1b5b2ecdb7153989fd7cebfd2c 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Eliminate MC{Fragment,{Section,Symbol}Data}::getAddress.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99467 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
6a4824c466bbfbcbe7dc4d95ec1e23a14ec73d87 25-Mar-2010 Dan Gohman <gohman@apple.com> Docuemntation corrections from John Myers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99454 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
207e06ea0446c51cb1d89f6400ec7becc46487f8 24-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Direct all {fragment,section,symbol} address access through the MCAsmLayout object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99380 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
CObjectWriter.h
achObjectWriter.h
337055e62f28f18a9a8c4a090633cae1c2256ae1 23-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Add TargetAsmBackend::MayNeedRelaxation, for checking whether a particular instruction + fixups might need relaxation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99249 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
9799de910e97879bf9f30f359551071a94d61570 23-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Tweak MCInstFragment to include the encoded data and fixups, so that we don't need to recompute them during relaxation. I will revisit this once all the other pieces of fast relaxation are in place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99244 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
1ccd91a5b156ff8b415806b0d60fd7c302d62693 23-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Put MCSectionCOFF::Name into the MCContext instead of leaking it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99231 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
3f4dcd92daef80f87919507b6baf2a97d4bfaa2e 23-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Add MCInstFragment, not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99229 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
9d39e616cc0f43e91e509e5c8129c7d46327fd0d 22-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Fix a few more cases we were passing an MCDataFragment when a MCFragment would do, and sprinkle in some const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99218 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
67c076cf59d14fc96feb5c915447f8ea79cf8325 22-Mar-2010 Daniel Dunbar <daniel@zuster.org> MCInst: Add ::dump_pretty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99216 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
b751418a3992c9da6f48c988f549c8e4c65e26f1 22-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Change MCObjectWriter::RecordRelocation to take an MCFragment (instead of a MCDataFragment). Object files should only need the generic MCFragment features.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99205 91177308-0d34-0410-b5e6-96231b3b80d8
CObjectWriter.h
achObjectWriter.h
2a6e3f5be21fdcb1fa81533ec81ba879df815607 22-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Eliminate MCFragment::getMaxFileSize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99203 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
8d39eb47d6a15d36be7ac0d0154a6897e42f5adc 22-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Share the MCAsmLayout object, although its still not used for anything important.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99202 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
d4d4a90a8c1ec76bb572cfeb4fadcad329b8cab9 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Acccess control is lame

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98962 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
1a07bc5cf4dfa8e4b2fcde47de95839a5d4d7626 19-Mar-2010 Douglas Gregor <dgregor@apple.com> struct -> class, to silence a Clang warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98961 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
b36052f0e4f59525b34bb4b56648c9121a8beda8 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MCCodeEmitter: Add target independent fixup flag for is-pc-relative.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98954 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
cf871e5abff63a53f9e97ff9e37fb7297d0cb847 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Sink code emitter into MCAssembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98953 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
2df4ceba15c130005967ee9e5fb4aa5568de1b0c 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Move to MachObjectWriter.{h,cpp}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98952 91177308-0d34-0410-b5e6-96231b3b80d8
achObjectWriter.h
53b2338a1d061ad15a858ff0d641431f4d4ac101 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Split MCObjectWriter out of MCAssembler.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98949 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CObjectWriter.h
b1e98945e4b107eb3f2ac1b54706c49864842dc4 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Lift the fixup evaluation and application up (to the same place), and eliminate MCAsmFixup::FixedValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98944 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
bacba997782f624d3c43591a913b8f1e3d733a52 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Factor out ExecutePostLayoutBinding, to separate the post-layout changes the object writer may need to make to the assembler from the actual .o writing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98943 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
4c42a6de9f5456cc1b28f2d37db589f580f2adc7 19-Mar-2010 Chris Lattner <sabre@nondot.org> fix an MCInstPrinter leak that jyasskin pointed out:
createAsmStreamer now takes ownership of the instprinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98939 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
8ad0dccbf2f0c5ecf9fdad93ac0207f6eaabaa1b 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/x86_64: Add getAtom[ForAddress].
- These find the defining symbol which identifies the containing atom for a symbol or address. They are currently very slow, but will be eliminated eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98925 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
238698566311e9dba4092dfa6c0bfe253279702e 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Factor out isSymbolLinkerVisible method; "linker visible" is a made up term to refer to non-temporary labels + temporary labels in sections-which-require symbols. For Darwin, it corresponds to symbols which effectively define an atom.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98923 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
9a1d20042f6a6ec648a3588f9b13264a4570aab0 18-Mar-2010 Daniel Dunbar <daniel@zuster.org> MCValue: Change to holding MCSymbolRefExprs instead of MCSymbols, we will need this for accessing to symbol modifiers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98791 91177308-0d34-0410-b5e6-96231b3b80d8
CValue.h
daf97333697e1d243e531f4be648b1640d6a58bb 18-Mar-2010 Daniel Dunbar <daniel@zuster.org> Add MCSymbol::isInSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98790 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
77e76940269b1bed36bc31ee5139b5c90fd13836 17-Mar-2010 Chris Lattner <sabre@nondot.org> fix GetOrCreateTemporarySymbol to require a name, clients
should use CreateTempSymbol() if they don't care about the
name.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98712 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
4e815f8a8cae6c846cdca52420046cab902865de 16-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.
- Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue.
- This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98592 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
99d22adcadc750b2949283d562bdb4d480b8d11c 15-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Add MCSectionMachO::getType()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98582 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionMachO.h
ad181304e1e203bb0a039f7581188afdbc1afb42 15-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Don't save a temporary string into a StringRef field.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98538 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
1f8008cf214b984954de2e986fb8cb0e5cc58606 15-Mar-2010 Chris Lattner <sabre@nondot.org> fix MCSectionELF to not leak memory, just like I did for MCSymbol.
MCSectionMachO is already fine (yay for fixed size arrays?),
MCSectionCOFF still leaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98537 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
CSectionELF.h
c28cc093e3b5b8601cb5024a5365a6f31f49839a 15-Mar-2010 Chris Lattner <sabre@nondot.org> fix a memory leak yjasskin pointed out: MCSymbol is bump pointer
allocated and thus not freed. This is cool except that it contains
and std::string so the string data didn't get freed. In any case
there is no reason to redundantly store the string data in the
MCSymbol anyway, just make the MCSymbol ref the string data in the
MCContext StringMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98536 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSymbol.h
1d72a7661611395a1c4fd3a88a2151921180e510 14-Mar-2010 Chris Lattner <sabre@nondot.org> add a new CreateTempSymbol method, the use case for
CreateTempSymbol vs GetOrCreateTemporarySymbol are
completely different.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98486 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
669f6b3beeee4a5a6f979a8e332e1d885aa30566 13-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Add some parens and silence a warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98428 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
5e6a7a248b980dd2a98a3613c72b75ba9d01d162 13-Mar-2010 Daniel Dunbar <daniel@zuster.org> llvm-mc: Support -n, useful for comparing -integrated-as output since the
compiler may not lead with the text section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98418 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
f08fde41f34d739c157b1d75dadbb864e7957cab 12-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Implement initial support for relaxation.
- The implementation is currently very brain dead and inefficient, but I have a
clear plan on how to fix it.

- The good news is, it works and correctly assembles 403.gcc (when built with
Clang, at '-Os', '-Os -g', and '-O3'). Even better, at '-Os' and '-Os -g',
the resulting binary is exactly equivalent to that when built with the system
assembler. So it probably works! :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98396 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
8a29fa6e02c8a76a71f43fc8bf4e51dd12bac4bc 12-Mar-2010 Chris Lattner <sabre@nondot.org> move fastcall/stdcall mangling up into Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98384 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
df3c8f29691a1e3f9ac4afbf05be52dbc898dae9 12-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Factor out MCAssembler::EvaluateFixup, and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98381 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
a0e36d55c495b3325805c659ac365b5faea84e34 12-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Constify MCAsmLayout argument to MCExpr::EvaluteAs...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98380 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
CExpr.h
8315a357e48f2eeb4fa929168d3cb65924d9893e 12-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Add MCAssembler::addFixup, which enforces that fixups are added in order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98379 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
5ef31a039dbb9c36cfd78442b3554d1b6974ec4c 12-Mar-2010 Chris Lattner <sabre@nondot.org> make the mangler take an MCContext instead of an MAI.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98363 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
fdab14b10564283028e9bdb628d095feae7fa071 12-Mar-2010 Chris Lattner <sabre@nondot.org> remove MAI argument from createAsmStreamer since it
can get it from the context now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98361 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
c18409aed80ba1c6c5998befd3c3c8edc865c423 11-Mar-2010 Chris Lattner <sabre@nondot.org> change MCContext to always have an MCAsmInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98293 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
8f0448cabcc37f3ecd7099c658346c0ece521e22 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Add MCSymbolData::getAddress() utility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98266 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
18ff2cced7e08ac76d8d5bcff8160a5f9a109cbb 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Start passing in the basic MCAsmLayout object.
- Also, drop the current location part of AsmLayout, I think I prefer to implement this via explicit symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98240 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
f82f4490b130eca55b08d605456a4ceacccf288a 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Sketch initial MCAsmLayout class, which encapsulates the current layout of an assembly file. The MCAsmLayout is also available for use by MCExpr::EvaluateAs{Absolute,Relocatable}, to allow target specific hooks and "absolutizing" of symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98227 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLayout.h
CAssembler.h
CExpr.h
1f3e445184e5ca2aa4295c2a77f2a4e0b957fea1 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Provide MCAssembler with a TargetAsmBackend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98222 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CStreamer.h
46836a783ab29f9cb49655d8b9cb8f5538a626fe 10-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Move the backend section and symbol data maps to MCAssembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98186 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
d80066eea98a3d5540d895bb77bc1ad50037f9e9 10-Mar-2010 Daniel Dunbar <daniel@zuster.org> Remove unneeded declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98185 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
CParser/MCAsmParser.h
09d53fecfcc93377627b6ee7b4d92f8a6ff152e9 10-Mar-2010 Chris Lattner <sabre@nondot.org> move three lowering hooks from MAI to TLOF and make one of them
semantic instead of syntactic. This completes MCization of
darwin/x86[-64]!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98145 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
98cdab53c302a2d6686fa428c0e896b1fb195311 10-Mar-2010 Chris Lattner <sabre@nondot.org> set the temporary bit on MCSymbols correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98124 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
00685bb5cf791fcda9fa0ceb42a6a62a07478461 10-Mar-2010 Chris Lattner <sabre@nondot.org> eliminate MCContext::CreateSymbol and CreateTemporarySymbol.
Add a new GetOrCreateTemporarySymbol method and a version that
takes a twine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98118 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
6cde3e6e993126df756e3be5b9ef43540b904644 09-Mar-2010 Chris Lattner <sabre@nondot.org> add a EmitSymbolValue convenience method to MCStreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98017 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
6e72048add2a6464e038121c6c275da37528aa0a 23-Feb-2010 Kevin Enderby <enderby@apple.com> This is the first patch to put the needed bits in place to eventually allow code
to be aligned with optimal nops. This patch does not change any functionality
and when the compiler is changed to use EmitCodeAlignment() it should also not
change the resulting output. Once the compiler change is made and everything
looks good the next patch with the table of optimal X86 nops will be added to
WriteNopData() changing the output. There are many FIXMEs in this patch which
will be removed when we have better target hooks (coming soon I hear).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96963 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CStreamer.h
fb76fe09297ee292129e44d723127f2408602a3d 22-Feb-2010 Dan Gohman <gohman@apple.com> Fix various doxygen warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96779 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CStreamer.h
2be2fd073003c0988723d2894dfb117ad90be11b 13-Feb-2010 Daniel Dunbar <daniel@zuster.org> MCAssembler: Switch MCAsmFixup to storing MCFixupKind instead of just a size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96094 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CFixup.h
0bcf074867d4d366f7988a219c7a53265fcb4f23 13-Feb-2010 Daniel Dunbar <daniel@zuster.org> MCAssembler: Sink fixup list into MCDataFragment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96093 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
a4766d7af91b7e25151b3e97a0831b3615d2abc3 13-Feb-2010 Daniel Dunbar <daniel@zuster.org> MCAssembler: Switch MCFillFragment to only taking constant values. Symbolic expressions can always be emitted as data + fixups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96092 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
3a30b827a5c9bf0ed8f31177b6e447083ce9afec 13-Feb-2010 Daniel Dunbar <daniel@zuster.org> MCAssembler: Start applying fixups in the data section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96090 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
b7c3a4b195597848e7c2559937914ae1087f3131 13-Feb-2010 Daniel Dunbar <daniel@zuster.org> MCAssembler: Add assorted dump() methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96089 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
42cefa1ea34bfe01b3073d27a1e78f1c1d75cedc 12-Feb-2010 Chris Lattner <sabre@nondot.org> doxygenize some comments, patch by Peter Collingbourne!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96018 91177308-0d34-0410-b5e6-96231b3b80d8
CDirectives.h
7e85180d15c4d5a451fbc078f7194a41c6230a57 11-Feb-2010 Chris Lattner <sabre@nondot.org> add a new MCInstPrinter::getOpcodeName interface, when it is
implemented, llvm-mc --show-inst now uses it to print the
instruction opcode as well as the number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95929 91177308-0d34-0410-b5e6-96231b3b80d8
CInstPrinter.h
cb7d743b4242345fa1081223b021b1504dce6fb7 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC: Move assembler-backend's fixup list into the fragment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95926 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
27ade18431a3504b412e6359e80c9b88e3b0f932 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC: Move MCSectionData::Fixup out to MCAsmFixup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95925 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
8d31de62680f28ac13594a14dde46216c82a3708 11-Feb-2010 Chris Lattner <sabre@nondot.org> make getFixupKindInfo return a const reference, allowing
the tables to be const. Teach MCCodeEmitter to handle
the target-indep kinds so that we don't crash on them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95924 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
e3e7a369f20af66a96830d8bfe52668c9e2e1fa1 10-Feb-2010 Chris Lattner <sabre@nondot.org> add a virtual dtor to MCTargetExpr, hopefully silencing some warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95810 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
f451cb870efcf9e0302d25ed05f4cac6bb494e42 10-Feb-2010 Dan Gohman <gohman@apple.com> Fix "the the" and similar typos.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
5d5a1e13a129e18ee6031fe6354acd2ab4d39f37 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC: Switch MCFixup to just hold an MCExpr pointer instead of index into the
MCInst it came from.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95767 91177308-0d34-0410-b5e6-96231b3b80d8
CFixup.h
4c6e18aefebf88b5602458c186cd395e22011f0a 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> Fix a signed comparison warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95766 91177308-0d34-0410-b5e6-96231b3b80d8
CFixup.h
37145b6e4ce1984b54d7fb79116d57e203437136 10-Feb-2010 Chris Lattner <sabre@nondot.org> "fixup" a comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95754 91177308-0d34-0410-b5e6-96231b3b80d8
CFixup.h
5532cf44a012149ce3afce43dbd0651b4d87a505 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> llvm-mc: Remove --show-fixups and always show as part of --show-encoding.

Also, fix a silly memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95752 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
5d672cfab096390690a1a5f33b0057c4cf252c55 10-Feb-2010 Chris Lattner <sabre@nondot.org> Add ability for MCInstPrinters to add comments for instructions.
Enhance the x86 backend to show the hex values of immediates in
comments when they are large. For example:

movl $1072693248, 4(%esp) ## imm = 0x3FF00000



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95728 91177308-0d34-0410-b5e6-96231b3b80d8
CFixup.h
CInstPrinter.h
6b71653c82f86626f64356c308d7356a17b05834 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add --show-fixups option, for displaying the instruction fixup information in the asm comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95710 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
73c557458c0e28899f37c557bcaf36c2b6701260 09-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC: First cut at MCFixup, for getting fixup/relocation information out of an MCCodeEmitter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95708 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
CFixup.h
8a872d0215b04e13f0c63274d385ebc5ad9f167e 09-Feb-2010 Chris Lattner <sabre@nondot.org> stop using reserved identifiers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95630 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmParser.h
159f527cb269002de85e671023b9231a2c8792e9 09-Feb-2010 Dan Gohman <gohman@apple.com> Add explicit keywords.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95626 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
036c130e90eb5c93b0dc0a70ad07b9343623c2a8 09-Feb-2010 Dan Gohman <gohman@apple.com> Document that MCExpr::Mod is actually remainder.

Document that MCExpr::Div, Mod, and the comparison operators are all
signed operators.

Document that the comparison operators' results are target-dependent.

Document that the behavior of shr is target-dependent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95619 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
df9c4380ee7e60c1de5cae32685b113170b1faa2 08-Feb-2010 Chris Lattner <sabre@nondot.org> don't make hte dtor private or we can't construct the class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95587 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
5d917a8952c09a345180ec36f0df4ee5dd5eddea 08-Feb-2010 Chris Lattner <sabre@nondot.org> add scaffolding for target-specific MCExprs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95559 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
73163f875ad7e5d56aa7d0d29509eb1e04542742 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC: Change default comment column to 40 characters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95378 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
9dee8e3009408fd08c656558397a8ac8604139ba 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95227 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
ac7798e9062f9bc371709ed445e1b3153b581e9a 03-Feb-2010 Chris Lattner <sabre@nondot.org> Hook up -filetype=obj through the MachO streamer. Here's a demo:

$ cat t.ll
@g = global i32 42
$ llc t.ll -o t.o -filetype=obj
$ nm t.o
00000000 D _g

There is still a ton of work left. Instructions are not being encoded
yet apparently.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95162 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
56591ab218639d8a6e4c756ca37adaf20215c3b6 03-Feb-2010 Chris Lattner <sabre@nondot.org> refactor code so that LLVMTargetMachine creates the asmstreamer and
mccontext instead of having AsmPrinter do it. This allows other
types of MCStreamer's to be passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95155 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
e1ec617c6abf0b9dc1eecbbfe483bda3bb2b7795 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95135 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
cee63322eaccc2f1067bdf5eab506e440f867da1 26-Jan-2010 Chris Lattner <sabre@nondot.org> Eliminate SetDirective, and replace it with HasSetDirective.
Default HasSetDirective to true, since most targets have it.

The targets that claim to not have it probably do, or it is
spelled differently. These include Blackfin, Mips, Alpha, and
PIC16. All of these except pic16 are normal ELF targets, so
they almost certainly have it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94585 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
2e2563bf8e0f0a7f8c923000c0206855f16968b2 26-Jan-2010 Rafael Espindola <rafael.espindola@gmail.com> Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.

Original patch by Sandeep Patel and updated by me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94582 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
6a315c358ca35625ffd50fdc74556acb26ec7396 26-Jan-2010 Chris Lattner <sabre@nondot.org> eliminate MCAsmInfo::NeedsSet: we now just use .set on any platform
that has it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94581 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
718fb59801320b8cb22363d115b5fc5ec40dc1f5 25-Jan-2010 Chris Lattner <sabre@nondot.org> mcstreamerize gprel32 emission.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94452 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
78f485afb723121eedf4b6907ae6eb53da8af03c 25-Jan-2010 Chris Lattner <sabre@nondot.org> rename MAI::PICJumpTableDirective to MAI::GPRel32Directive to
make it clear what it is, instead of how it is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94448 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
cba386ccac87c2446579ef235d2b4dc7951c0941 25-Jan-2010 Chris Lattner <sabre@nondot.org> remove JumpTableDirective, it is always null.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94445 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
a6594fc7156c0afbe6fd5a6aab9b099aaf950c53 25-Jan-2010 Chris Lattner <sabre@nondot.org> mcstreamerize .file and .file. This also fixes an issue where the
normal form of .file would fail if the filename had a weird character
in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94437 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
ed0ab15170f0f8fc4269d58757378bc8726b56a1 25-Jan-2010 Chris Lattner <sabre@nondot.org> add symbol attribute support for the ELF .type directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94435 91177308-0d34-0410-b5e6-96231b3b80d8
CDirectives.h
99328add833807f12a4950c7de29fb2a5df04703 25-Jan-2010 Chris Lattner <sabre@nondot.org> emit the .size directive for global variables on ELF through
mcstreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94416 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
6559d7688e24e204af273a1e1252639320a7b309 25-Jan-2010 Chris Lattner <sabre@nondot.org> all supported target now have aligned common support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94413 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
9eb158d5b4cd4f6fc80912e2dd77bdf13c3ca0e7 23-Jan-2010 Chris Lattner <sabre@nondot.org> mcize lcomm, simplify .comm, extend both to support 64-bit sizes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94299 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CStreamer.h
f9f93e4388962b678fd59b7af5212d4cc0d38be2 23-Jan-2010 Chris Lattner <sabre@nondot.org> resolve a fixme: the "nonexecutable stack directive" is actually
a .section. Switch to it with SwitchSection.

However, I think that this directive should be safe on any ELF target.
If so, we should hoist it up out of the X86 and SystemZ targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94298 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CSectionELF.h
152a29bfa6fa505182658d046bc75626e10d67c3 23-Jan-2010 Chris Lattner <sabre@nondot.org> mcize visibility directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94295 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
a5ad93a10a5435f21090b09edb6b3a7e44967648 23-Jan-2010 Chris Lattner <sabre@nondot.org> move the various directive enums out of the MCStreamer class
into a new MCDirectives.h file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94294 91177308-0d34-0410-b5e6-96231b3b80d8
CDirectives.h
CParser/AsmParser.h
CStreamer.h
3a9be0ee36fe2143f514d28315f3dc1bda132b2e 23-Jan-2010 Chris Lattner <sabre@nondot.org> mcstreamerize .no_dead_strip and .reference for static ctors/dtors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94290 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
3924868a957d5a6d468b61741cbb7db77324d1f6 23-Jan-2010 Chris Lattner <sabre@nondot.org> mcize jump table and constant pool entry labels, .local on elf,
and some .weak directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94284 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
5d74e1f64445713cca863af03b8b6ab39321046e 22-Jan-2010 Sean Callanan <scallanan@apple.com> Added a Register token to AsmToken and the appropriate
accessor method for its value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94241 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/MCAsmLexer.h
0fd90fd8d1c2143a763dee509c66a5b3c74088b1 22-Jan-2010 Chris Lattner <sabre@nondot.org> Convert some more random-comment-printing stuff to use
AddComment and GetCommentOS. Add a blank line between globals
(even in non-verbose mode) to make the assembly more readable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94202 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
d79d9dce47d505369662ae5111dba24f9ccdef68 22-Jan-2010 Chris Lattner <sabre@nondot.org> add a new MCAsmStreamer::GetCommentOS method to simplify stuff
that doesn't want to use twines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94199 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
d32c7cfa248f685e6e3064c0958dc2f0c31a4df6 22-Jan-2010 Chris Lattner <sabre@nondot.org> rename addComment -> AddComment for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94190 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
a46918d2b1b63aa3db94aa10b9ea70209b84e274 22-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify some uses of str(n)cmp with StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94189 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
86e2211d0a496f470ea1d320161c8dc43593c5c6 22-Jan-2010 Chris Lattner <sabre@nondot.org> Add the ability for MCStreamer to emit comments on the same line as directives.
Switch over the asm-verbose comment for double values to use it. We now get:

_x:
.long 343597384 ## double 1.231200e+02
.long 1079953326

For example, note that the comment is on the same line as the .long. Woo.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94166 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
07404415ab97883b80d0dd87f1c5308e4eccbfd4 22-Jan-2010 Chris Lattner <sabre@nondot.org> pass "-fasm-verbose" into createAsmStreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94165 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
be343b3ca3f53d5d5e29f3591af8b9bb831daa98 22-Jan-2010 Chris Lattner <sabre@nondot.org> move some files out of the llvm-mc tool into the MCParser library so
other tools can link it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94131 91177308-0d34-0410-b5e6-96231b3b80d8
CParser/AsmCond.h
CParser/AsmLexer.h
CParser/AsmParser.h
c6ef277a0b8f43af22d86aea9d5053749cacfbbb 22-Jan-2010 Chris Lattner <sabre@nondot.org> create a new MCParser library and move some stuff into it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94129 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
CAsmParser.h
CParsedAsmOperand.h
CParser/MCAsmLexer.h
CParser/MCAsmParser.h
CParser/MCParsedAsmOperand.h
79036e421f22cf3f661386c560fda36aa5bd04cc 20-Jan-2010 Sean Callanan <scallanan@apple.com> Modified MCAsmLexer to return error information upward
rather than printing it locally, reducing its dependence
on SourceMgr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94041 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
1658202529cf371e7e5f1a46d9ef80def5b3c3e0 20-Jan-2010 Chris Lattner <sabre@nondot.org> give createAsmStreamer an 'isLittleEndian' argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93986 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
8eeba35babf3114966fc4e6e8522057e46b610db 20-Jan-2010 Chris Lattner <sabre@nondot.org> revert 93934, removing the MCAsmInfo endianness bit. I can't
stomache MCAsmInfo having this, and I found a better solution to
this layering issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93985 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CAsmInfoCOFF.h
CAsmInfoDarwin.h
c7b8814bb4f2e6052060d6118d3bc3b66f5c5b0b 19-Jan-2010 Chris Lattner <sabre@nondot.org> give MCAsmInfo a 'has little endian' bit. This is unfortunate, but
I really want clients of the streamer to be able to say "emit this
64-bit integer" and have it get broken down right by the streamer.

I may change this in the future, we'll see how it works out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93934 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CAsmInfoCOFF.h
CAsmInfoDarwin.h
32ae3fe0ba469240753e2342e36485f7c9acfb5c 19-Jan-2010 Chris Lattner <sabre@nondot.org> add a new EmitIntValue method that MCStreamer impls can optionally define
and that clients can use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93923 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
6449abfbc86310edbbe0b5ffb3fad5c14301307f 19-Jan-2010 Chris Lattner <sabre@nondot.org> eliminate AsmPrinter::EmitZeros: just use MCStreamer directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93918 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
18b8323de70e3461b5d035e3f9e4f6dfaf5e674b 19-Jan-2010 Sean Callanan <scallanan@apple.com> Promoted the getTok() method to MCAsmParser so that
the two token accessor functions are declared consistently.
Modified the clients of MCAsmParser to reflect this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93916 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
b9a25b7744ed12b80031426978decce3d4cebbd7 19-Jan-2010 Sean Callanan <scallanan@apple.com> Propagated the parser-side Lex function's declaration to
MCAsmParser, and changed the target-specific AsmParsers
to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93900 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
aaec205b87637cd0d59d4f11630db603686eb73d 19-Jan-2010 Chris Lattner <sabre@nondot.org> Generalize mcasmstreamer data emission APIs to take an address space
identifier. There is no way to work around it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93896 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
ddf6bdde44287b5b559bc403a02ff971e15e8303 19-Jan-2010 Chris Lattner <sabre@nondot.org> add a "MCStreamer::EmitFill" method, and move the default implementation
(which just iteratively emits bytes) to MCStreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93888 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
f03ffd13f8f31fb8ead74b94eb2ef71b80ac7739 19-Jan-2010 Chris Lattner <sabre@nondot.org> remove MAI::ZeroDirectiveSuffix, which is only used by MASM,
which we don't support anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93886 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
814819f6ea7fb0638fe73920299fda0da941a59e 19-Jan-2010 Chris Lattner <sabre@nondot.org> stop using the .lcomm pseudoop on darwin, instead, directly use the
.zerofill directive. Streamerize its generation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93868 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
41eb8b47717e1fe1a6d0e99ec1b4e890091f77aa 19-Jan-2010 Chris Lattner <sabre@nondot.org> hookize the cygwin ".linkonce" directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93855 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
7517b249caa793a9a01e4b6aff9c47fd88a153cc 19-Jan-2010 Chris Lattner <sabre@nondot.org> add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93852 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
71eae713153e564ec743c5c4162ff258c255de78 19-Jan-2010 Chris Lattner <sabre@nondot.org> move production of .reference directives for static ctor/dtor list on
darwin into common code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93849 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
ce8749e445fdd0493758932874bad50293647df9 19-Jan-2010 Chris Lattner <sabre@nondot.org> make TLOF subclassify BSS based on linkage type into private, external
and everything else (weak).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93846 91177308-0d34-0410-b5e6-96231b3b80d8
ectionKind.h
a3839bc3714e6a84222f45cf4c0f1a20a88b10cd 19-Jan-2010 Chris Lattner <sabre@nondot.org> introduce a section kind for common linkage. Use this to slightly
simplify and commonize some of the asmprinter logic for globals.

This also avoids printing the MCSection for .zerofill, which broke
the llvm-gcc build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93843 91177308-0d34-0410-b5e6-96231b3b80d8
ectionKind.h
aac138e84dee1cb3ffc1035b2a1e4361fe0b4f80 19-Jan-2010 Chris Lattner <sabre@nondot.org> Cleanup handling of .zerofill on darwin:

1. TargetLoweringObjectFileMachO should decide if something
goes in zerofill instead of having every target do it.
2. TargetLoweringObjectFileMachO should assign said symbols to
the right MCSection, the asmprinters should just emit to the
right section.
3. Since all zerofill stuff goes through mcstreamer anymore,
MAI can have a bool "haszerofill" instead of having the textual
directive to emit.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93838 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
aad30363fb410c3e5e08756d972be77833593791 18-Jan-2010 Chris Lattner <sabre@nondot.org> switch x86 zerofill emission over to use MCStreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93702 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
8cb9a3b13f3226b7e741768b69d26ecd6b5231f1 18-Jan-2010 Chris Lattner <sabre@nondot.org> remove the MAI argument to MCExpr::print and switch overthing to use << when printing them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93699 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
10b318bcb39218d2ed525e4862c854bc8d1baf63 17-Jan-2010 Chris Lattner <sabre@nondot.org> now that MCSymbol::print doesn't use it's MAI argument, we can
remove it and change all the code that prints MCSymbols to use
<< instead, which is much simpler and cleaner.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93695 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
CValue.h
acd03ae6791fc0fb9f1b05247a1dc082b46b8d8b 17-Jan-2010 Chris Lattner <sabre@nondot.org> Get MCSymbol out of the mangling business, and move all the logic
to Mangler. Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.

This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93690 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
54482b472a888c9efe003ad694ecf47b21878f0e 15-Jan-2010 Chris Lattner <sabre@nondot.org> fix a bug in range information for $42, eliminate an
unneeded argument from ParseExpression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93536 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
b4307b33705ef9e660db640b2f70d6246aa51165 15-Jan-2010 Chris Lattner <sabre@nondot.org> extend MCAsmParser::ParseExpression and ParseParenExpression
to return range information for subexpressions. Use this to
provide range info for several new X86Operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93534 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
3581d662e9c39b38c1cd8c243bbf7f03869f30de 15-Jan-2010 Jeffrey Yasskin <jyasskin@google.com> Make sure include/llvm/MC/MCParsedAsmOperand.h can be compiled alone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93492 91177308-0d34-0410-b5e6-96231b3b80d8
CParsedAsmOperand.h
9d3c755fd6bf33335fad66dca9a629c630fc3bf2 14-Jan-2010 Chris Lattner <sabre@nondot.org> add virtual methods to get the start/end of a MCParsedAsmOperand,
the default implementation returns "unknown".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93470 91177308-0d34-0410-b5e6-96231b3b80d8
CParsedAsmOperand.h
f007e853e26845cd6866b52d646455fc69f4e0af 14-Jan-2010 Chris Lattner <sabre@nondot.org> prune #includes in TargetAsmParser.h
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93457 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
CParsedAsmOperand.h
45220a84394758c86cc29ee0e3fe6738946fbcd0 14-Jan-2010 Chris Lattner <sabre@nondot.org> introduce the MCParsedAsmOperand class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93454 91177308-0d34-0410-b5e6-96231b3b80d8
CParsedAsmOperand.h
4564ec9ca7a01cea24b6491ffd90268bf2aa509c 13-Jan-2010 Chris Lattner <sabre@nondot.org> expose a static function as a static method on the MCSymbol class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93350 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
cabdd7425d30f7eb659ecb0cc5efbc4052dd78a8 19-Dec-2009 Douglas Gregor <dgregor@apple.com> Fix a bunch of little errors that Clang complains about when its being pedantic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91764 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
2928c83b010f7cfdb0f819199d806f6942a7d995 06-Nov-2009 Daniel Dunbar <daniel@zuster.org> Pass StringRef by value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
CContext.h
CExpr.h
CSection.h
CSectionELF.h
CSectionMachO.h
CStreamer.h
CSymbol.h
cf3f89249deabb47c48f21abe3dcf44dbff3401f 30-Oct-2009 Dan Gohman <gohman@apple.com> Remove a redundant copy constructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85547 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
8b67f774e9c38b7718b2b300b628388f966df4e0 26-Oct-2009 Chandler Carruth <chandlerc@gmail.com> Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
CAsmParser.h
CAssembler.h
CDisassembler.h
CExpr.h
CInst.h
CStreamer.h
CSymbol.h
CValue.h
7c5b021793e8c8184c655040ea5e169b55c55063 20-Oct-2009 Chris Lattner <sabre@nondot.org> add a twine version of MCContext::GetOrCreateSymbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84561 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
7eb85194f2b07bc7ba3f274fc00dc389b77b63bf 16-Oct-2009 Daniel Dunbar <daniel@zuster.org> Minor formatting tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84235 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
1253a6fa3b0d79dc6ea25f2578f6473219d40047 16-Oct-2009 Daniel Dunbar <daniel@zuster.org> MC: Switch assembler API to using MCExpr instead of MCValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84234 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
e00b011e6a2597fcc3da88da91a8ffda6eebfcda 16-Oct-2009 Daniel Dunbar <daniel@zuster.org> MC: Remove unneeded context argument to MCExpr::Evaluate*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84233 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
7c3600de949347bf5ea6369b2546fac15bd96415 16-Oct-2009 Daniel Dunbar <daniel@zuster.org> MC: Move assembler variable values from MCContext to MCSymbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84229 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSymbol.h
e579849652f2ba062e6c91a3af4d9a3843411b44 16-Oct-2009 Daniel Dunbar <daniel@zuster.org> MC: Switch MCContext value table to storing MCExprs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84228 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
c6f729ed5519cdf398ca4039dbdbea4f81433ec0 18-Sep-2009 Anton Korobeynikov <asl@math.spbu.ru> Allow symbols to start from the digit if target requests it. This allows, e.g. pinning
variables to specified absolute address. Make use of this feature for MSP430.
This unbreaks PR4776.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82227 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
8c6ed05157e9c97ff8f3ccb211dd797e53228da1 16-Sep-2009 Chris Lattner <sabre@nondot.org> Big change #1 for personality function references:
Eliminate the PersonalityPrefix/Suffix & NeedsIndirectEncoding
fields from MAI: they aren't part of the asm syntax, they are
related to the structure of the object file.

To replace their functionality, add a new
TLOF::getSymbolForDwarfGlobalReference method which asks targets
to decide how to reference a global from EH in a pc-relative way.

The default implementation just returns the symbol. The default
darwin implementation references the symbol through an indirect
$non_lazy_ptr stub. The bizarro x86-64 darwin specialization
handles the weird "foo@GOTPCREL+4" hack.

DwarfException.cpp now uses this to emit the reference to the
symbol in the right way, and this also eliminates another
horrible hack from DwarfException.cpp:

- if (strcmp(MAI->getPersonalitySuffix(), "+4@GOTPCREL"))
- O << "-" << MAI->getPCSymbol();



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81991 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
4f3e7aa154577c86791908e73a9fec075fdea0ba 16-Sep-2009 Chris Lattner <sabre@nondot.org> add a helper method for creating MCSymbol and MCSymbolRefExpr at
the same time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81984 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
bfd1e50c4f51e5f22ba68f28172b0ed9ab66a61a 16-Sep-2009 Chris Lattner <sabre@nondot.org> remove some horrible MAI hooks which fortunately turn out to be always empty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81946 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
90edac0e8b35f766599362b6301863229f0ddcdb 14-Sep-2009 Chris Lattner <sabre@nondot.org> Change MCAsmStreamer to take an MCInstPrinter instead of a
full AsmPrinter, and change TargetRegistry to keep track
of registered MCInstPrinters.

llvm-mc is still linking in the entire
target foo to get the code emitter stuff, but this is an
important step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81754 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
c493fb2f4d67bfe4b695d9067eae178ced5970cc 14-Sep-2009 Chris Lattner <sabre@nondot.org> Give MCInstPrinter a MCAsmInfo member, make X86ATTInstPrinter
be a MCInstPrinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81746 91177308-0d34-0410-b5e6-96231b3b80d8
CInstPrinter.h
65b0b297db16252835ab4d78f33578baa3ace28a 14-Sep-2009 Chris Lattner <sabre@nondot.org> add a new MCInstPrinter class, move the (trivial) MCDisassmbler ctor inline.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81745 91177308-0d34-0410-b5e6-96231b3b80d8
CDisassembler.h
CInstPrinter.h
56d339f68751aee16c032ed646158b992a200335 13-Sep-2009 Chris Lattner <sabre@nondot.org> second part to r81695, I missed a directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81696 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
b6a2fc080f47eabdcaabf0101e9ca7c95e9d8bdc 12-Sep-2009 Chris Lattner <sabre@nondot.org> eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
MBB labels like everything else.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81628 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
892e44a07c2422dedff9c5f0532286e677a64842 11-Sep-2009 Chris Lattner <sabre@nondot.org> default construct MCInst's ctor to 0, which is "PHI" which is invalid for MCInsts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81525 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
b8b70521def36d0da103b8a103872f37b3b49aa2 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> MC: Give target specific parsers access to the MCStreamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81416 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
c5ea263a23f4f15587e35c9cb07cf72a9fba7613 10-Sep-2009 Chris Lattner <sabre@nondot.org> remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter. Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter. This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81396 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
251ef612a812ac99edeab6c08a752bf8ca220921 10-Sep-2009 Sean Callanan <scallanan@apple.com> Added an abstract superclass, MCDisassembler, for
all disassemblers.

Modified the MemoryObject to support 64-bit address
spaces, regardless of the LLVM process's address
width.

Modified the Target class to allow extraction of a
MCDisassembler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81392 91177308-0d34-0410-b5e6-96231b3b80d8
CDisassembler.h
65c060064d129e1bacc9204fd032fe81c4c669c4 09-Sep-2009 Chris Lattner <sabre@nondot.org> add a gross hack to get "SrcLine" comments to show up with the
new asmprinter. Differently gross hack coming next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81379 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
fb0f0dedd74dab13737a77671a724ee88465f5da 05-Sep-2009 Kevin Enderby <enderby@apple.com> Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' in
preparation of supporting other targets. Then changed the lexer to parse these
as tokens.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81050 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
9823ca971d5cb475401e59fde244caf5087c74a1 04-Sep-2009 Kevin Enderby <enderby@apple.com> Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation of
supporting other targets. Changed the code to pass MCAsmInfo to the parser
and the lexer. Then changed the lexer to use CommentString from MCAsmInfo
instead of a literal '#' character.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81046 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
7b4608dfa018455021050ccd31d3c49aaecf7ff6 03-Sep-2009 Kevin Enderby <enderby@apple.com> Removed the non-target independent AsmToken::Register enum constant
from MCAsmLexer.h in preparation of supporting other targets. Changed the
X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking
for AsmToken::Percent when parsing in places that used AsmToken::Register.
Then changed X86ATTAsmParser::ParseRegister to parse out registers as an
AsmToken::Percent followed by an AsmToken::Identifier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80929 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
684c593d05db0bd277268fc9d8c05bce138c745a 03-Sep-2009 Chris Lattner <sabre@nondot.org> Thread an MCAsmInfo pointer through the various MC printing APIs,
and fix a few things using << on MCSymbols to use ->print(). No
functionality change other than unbreaking my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80890 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
CInst.h
CSymbol.h
CValue.h
efbb5330b8d383a393c83d2da5d631c98b0bb3fd 01-Sep-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Store MCSymbolData value as a pointer (to make MSVC happy).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80652 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
821e3334ed3390d931f497300e6a5f1dc21bcfb3 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80578 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
e2ace509fc1205bed97a5114b13534610d4dbf5e 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80577 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
883f920acb6d347c2be0c937302d621ca21ec9dd 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Remove MCAsmParser::Parse[Paren]RelocatableExpression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80576 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
8c2eebe4074ef218b30d94358f6b2e45c079605c 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.

Also, use MCInst::print instead of custom code in MCAsmPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80575 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
c18274ba9cabd5699452870daae3c2d9accecc37 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add MCAsmParser::Parse[Paren]Expression forms which return an MCExpr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80574 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
cb579b3338fe8d9e4424b138f597a4696cb89de3 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Make MCSymbolData symbol member const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80573 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
a03a368acca1c5ea7eb7de7a4164cbd22308c82f 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add MCContext to MCAssembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80572 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
6ce004dc76a8761a7e1a8830206ccaaf96736615 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add MCAsmParser::getContext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80571 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
87392fde1f261fea161b48886fafbedddb18dcce 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add MCExpr::{dump,print}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80570 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
9643ac55142d40da404caa8e5fedfef2cd7b4afc 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Switch MCExpr construction to using static member functions, and taking the MCContext (which now owns all MCExprs).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80569 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
869a5e7d66cdc756608190bff1e837fe5809d16e 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add some doxyment markers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80568 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
28c251b54b0b311749f07babe0f6909e71e877bc 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Move AsmExpr into MC lib (as MCExpr).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80567 91177308-0d34-0410-b5e6-96231b3b80d8
CExpr.h
4a1fadaf5207e46d19c64e5773ff8d9e65e607d7 30-Aug-2009 Daniel Dunbar <daniel@zuster.org> Tweak comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80516 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
7092c7e1dcf9d05741b400dd54bbd7d3419773b2 30-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported for now.

- Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80484 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
8f4d146c340c9423271ebd7bb3fd32b880000bc9 28-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Support .comm emission.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80351 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
d5a8e98ef627a35284c9b5989664514f8f163968 28-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Support .zerofill emission.
- I'm still trying to figure out the cleanest way to implement this and match the assembler, currently there are some substantial differences.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80347 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
edc670f3f2ba629b6803a1a7ed4aa47061afd276 28-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Tweak section alignment and size computation to match 'as' closer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80345 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
e6cdbf2f92a753ad547e3287e279bf47585b228d 28-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Emit .lcomm as .zerofill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80343 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
8751b94ffbd9c49df8949a37f78d6bd0be87b256 28-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add const to EmitZeroFill section argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80341 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
4fac74950a1ff08b995b366bfb84369c1507faef 27-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Add MCCodeEmitter support, for encoding instructions.
- No relocations yet, of course.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80235 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
4b770c20778ccb5d2f304fa73e0522a7ab8c4623 27-Aug-2009 Daniel Dunbar <daniel@zuster.org> Add {MCInst,MCOperand}::{print,dump}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80231 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
04baf9094ada38a518ba7eda87d4c478a874dbb1 27-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Tweak MCCodeEmitter skeleton.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80193 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
8dcf70080280dcf8d6861f2da9f8f9dd1a61aed6 27-Aug-2009 Daniel Dunbar <daniel@zuster.org> Add missing declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80190 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
4a0abd80f18f9c2a10bf5b14cd6731d51972a426 27-Aug-2009 Daniel Dunbar <daniel@zuster.org> Sketch TargetRegistry support for MCCodeEmitter abstract interface.
- Of course, nothing actually can provide this interface yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80188 91177308-0d34-0410-b5e6-96231b3b80d8
CCodeEmitter.h
CStreamer.h
81e400092f55c2eba157172bfc0dd0df8317638d 27-Aug-2009 Daniel Dunbar <daniel@zuster.org> Try to make MSVC just a little happier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80187 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
959fd883346384e742fff049327a6815e36017e0 27-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.
- I moved section creation back into AsmParser. I think policy decisions like
this should be pushed higher, not lower, when possible (in addition the
assembler has flags which change this behavior, for example).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80162 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSymbol.h
6009db486e7fba448ccb28dff676c012efade8f0 26-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Set .subsections_via_symbols flag properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80144 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
3f6a960f9c9ad27f2ac573020df414e8b8cdda04 26-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Add support for relocations.
- I haven't really tried to find the "right" way to store the fixups or apply
them, yet. This works, but isn't particularly elegant or fast.

- Still no evaluation support, so we don't actually ever not turn a fixup into
a relocation entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80089 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
be9635569401b9a40984c02c6e171aa9da9ad0a2 26-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Move symbol indices into the MCSymbolData structure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80088 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
383cbff0311237bfd60daaa77d07bc9785a07ee8 26-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Change MCContext value table to take const MCSymbol*s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80079 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
d644c32a52c36c2e52c91512d156d4332772cb1f 26-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Make MCValue take const MCSymbol*s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80078 91177308-0d34-0410-b5e6-96231b3b80d8
CValue.h
6742e34385bff89b897ef0fc930c4bca9e75ac4a 26-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Add section padding where needed (to align the next section).

Also, simplify some of Mach-O writer code which can now use section addresses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80067 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
5e835967dd5dda294d0ef3392f4c1d4a2260f532 26-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Set addresses for symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80065 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
e1f62b247c1096b501951ac7253658334c038b65 26-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add MCSection::isDefined()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80057 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
415c8cf837439401f2df75d992d7e296d1d6746a 25-Aug-2009 Bill Wendling <isanbard@gmail.com> Revert last patch. We need to put this into TargetLowering. There will be a lot
of EH stuff going into there, so we can wait to add them all then.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80036 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
eb2fde2c939892f620de93f56dc21ec0c36824ef 25-Aug-2009 Bill Wendling <isanbard@gmail.com> Comment formatting. Removing of unused #include and type forwarding.

OCD is fun!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80030 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
b9e7689c89acf9324fba9242e00a9a4b8a3a83a6 25-Aug-2009 Bill Wendling <isanbard@gmail.com> Add a target asm info hook to specify that particular bits of data in the FDE
should be forced to 32-bits (.long) even on 64-bit architectures. Darwin wants
these bits to be 64-bits (.quad). However, other platforms may disagree.

This is just the info right now and is part of a work-in-progress which needs
this. We'll add the actual *use* of this soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80024 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
0c7761b3f98fee270d73f5b9c440fe15e82af263 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Preliminary support for indirect symbols.
- The indirect table itself isn't being filled in yet.

- This isn't factored properly and is rather FIXMEd, but at the moment I'm more
focused on figuring out what it needs to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79910 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
6aff2fbd56d4bc2d6029f7c9bd49a97f6dc01213 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Support symbol attributes.
- This is mostly complete, the main thing missing is .indirect_symbol support
(which would be straight-forward, except that the way it is implemented in
'as' makes getting an exact .o match interesting).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79899 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
5ec2e6b586bf4029763711d6860b57d312eb2d2e 22-Aug-2009 Chris Lattner <sabre@nondot.org> fix a build error on the clang-i686-linux tester.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79778 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
33adcfb4d217f5f23d9bde8ba02b8e48f9605fc5 22-Aug-2009 Chris Lattner <sabre@nondot.org> rename TAI -> MAI, being careful not to make MAILJMP instructions :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79777 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
CSectionELF.h
CSectionMachO.h
CStreamer.h
90aa1f92c1e3a0fa9f66197ef851ab995afb37ae 22-Aug-2009 Chris Lattner <sabre@nondot.org> mcasminfo doesn't use std::string


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79774 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
2807afa664b579af4c559b3880d6763b9e7e236a 22-Aug-2009 Chris Lattner <sabre@nondot.org> rename COFFMCAsmInfo -> MCAsmInfoCOFF, likewise for darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79773 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfoCOFF.h
CAsmInfoDarwin.h
82d748d55c549dd055528ed10dbb534618ca8115 22-Aug-2009 Chris Lattner <sabre@nondot.org> move the MCAsmInfo .cpp/.h files into the right
directories and rename them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79768 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CAsmInfoCOFF.h
CAsmInfoDarwin.h
af76e592c7f9deff0e55c13dbb4a34f07f1c7f64 22-Aug-2009 Chris Lattner <sabre@nondot.org> Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79763 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmInfo.h
CAsmInfoCOFF.h
CAsmInfoDarwin.h
CSection.h
CSectionELF.h
CSectionMachO.h
CStreamer.h
3edd9bb7a3da8526eb2f4a5dae2962a987d3d566 22-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Improve symbol table support:
- Honor .globl.

- Set symbol type and section correctly ('nm' now works), and order symbols
appropriately.

- Take care to the string table so that the .o matches 'as' exactly (for ease
of testing).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79740 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
CSymbol.h
f3d2ef0c9712381a105118336975adcfbf733db0 22-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Sketch symbol table support.
- The only .s syntax this honors right now is emitting labels, and some parts
of the symbol table generation are wrong or faked.

- This is enough to get nm to report such symbols... incorrectly, but still.

Also, fixed byte emission to extend the previous fragment if possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79739 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
2ae58f2851188c21517d2d0409db1c37dca84b24 22-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Move more logic for writing the Mach-O file into the writer
class, and kill off MCSectionData::FileOffset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79735 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
a5441fea1f5d4f86d6211af16dbf7d190f2a3c83 22-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Rename / redefine MCFragment::FileOffset to MCFragment::Offset (the
section offset).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79734 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
8906ff1b9dfde28f1ff00706643ca10843b26e01 22-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Clean up some handling of symbol/section association to be more correct
(external was really undefined and there wasn't an explicit representation for
absolute symbols).
- This still needs some cleanup to how the absolute "pseudo" section is dealt
with, but I haven't figured out the nicest approach yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79733 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
CValue.h
361ae1d28dfa4c22ddec58b2b742eb514f97c694 22-Aug-2009 Daniel Dunbar <daniel@zuster.org> Make MSVC happy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79689 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
d6f761e0eb610936a6b8495360b62696dcd85164 22-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Support .o emission for .org and .align.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79684 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
0705fbf52fcaade0c6b9d5d33bec163ee4c2daf4 21-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/Mach-O: Support byte and fill value emission.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79652 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
1f2b32c5c6502c74890c188b0224e4c01ff22da4 21-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Fix build on platforms where stdint.h is not implicitly included in the standard headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79629 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
fb4a6b397665df011348ade24a8e38d2219f095a 21-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Start MCAssembler and MCMachOStreamer.

- 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79612 91177308-0d34-0410-b5e6-96231b3b80d8
CAssembler.h
dabf07c70a5e13a4560d75667fa5c7db28921a92 18-Aug-2009 Chris Lattner <sabre@nondot.org> Make AsmStreamer maintain a notion of the current section, pushing it up from the
MCAsmStreamer. Based on this, eliminate the current section from AsmPrinter.

While I'm at it, clean up the last of the horrible "switch to null section" stuff
and add an assert. This change is in preparation for completely eliminating
asmprinter::switchtosection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79324 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
975780bb595b57a45a8e6d72d8151b436314ce22 17-Aug-2009 Chris Lattner <sabre@nondot.org> change AsmPrinter to switch sections using AsmStreamer instead of
doing it directly. This requires const'izing a bunch of stuff that
took sections, but this seems like the right semantic thing to do:
emitting a label to a section shouldn't mutate the MCSection object
itself, for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79227 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
CSymbol.h
CValue.h
f3ce009fcb0a04a245c437d86657e9bd61ecc18f 17-Aug-2009 Chris Lattner <sabre@nondot.org> give MCAsmStreamer a TargetAsmInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79222 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
7d996d907f593d9d1a4c9d79805b2b7adee63f24 15-Aug-2009 Chris Lattner <sabre@nondot.org> add support for target-specific ELF section flags, add a new MCSectionXCore
class which represents the XCore cp/dp section flags. No functionality
change yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79077 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
abd7514a68b0687f00d9df73cf5c79cb61ff08b6 14-Aug-2009 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> *try* to use a better name to describe how common symbols are marked on the elf object file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79029 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
c22e0b2443afdedb6d9b225b938ad404d63cdbe6 14-Aug-2009 Daniel Dunbar <daniel@zuster.org> Update llvm-mc / MCAsmStreamer to print the instruction using the actual target
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. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78986 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
1689e0cf55205042b830fdbe3fc5f7b483997334 14-Aug-2009 Daniel Dunbar <daniel@zuster.org> Add MCSymbol::{print, dump}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78983 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
2c11624b65a65fe487f335603dc0bf6372a50a89 14-Aug-2009 Daniel Dunbar <daniel@zuster.org> Add MCValue::{print, dump}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78982 91177308-0d34-0410-b5e6-96231b3b80d8
CValue.h
011e4db845b5c4166142338c77adc8ac03e5e041 14-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add dummy MCStreamer implementation, (eventually) for use in profiling.
- Currently unused.

- A few other random comment fixes lumped in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78960 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
fdf229eda95a542fc34d5182e1a91a22789ba122 14-Aug-2009 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove HasCrazyBSS and add a flag in TAI to indicate that '.section'
must be emitted for PowerPC-Linux '.bss' section


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78958 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
4aa688e9973ec7e80ef60ecbc024c57e769b8cbf 13-Aug-2009 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add a method to return if the ELF section contains only common symbols!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78937 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionELF.h
b808588a3a5febe931896b3779d159ba90d836f7 13-Aug-2009 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Change MCSectionELF to represent a section semantically instead of
syntactically as a string, very similiar to what Chris did with MachO.
The parsing support and validation is not introduced yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78890 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
CSectionELF.h
38cff389af1d78bd80df0479ef258493e0c5897e 13-Aug-2009 Chris Lattner <sabre@nondot.org> sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF implementations.

MCContext no longer maintains a string -> section map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78874 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSection.h
c9d31524eec562f719d6818508b722b55a787d67 13-Aug-2009 Chris Lattner <sabre@nondot.org> add some comments: MCContext owns the MCSections, but it bump pointer allocates
them, so it doesn't have to explicitly free them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78870 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
e309cfa0d8945af47dd798357549c815164d53d6 13-Aug-2009 Chris Lattner <sabre@nondot.org> reject invalid code like:
int x __attribute__((section("_foo, _bar"))) = 4;
int y __attribute__((section("_foo, _bar, 4byte_literals"))) = 1;




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78867 91177308-0d34-0410-b5e6-96231b3b80d8
CSectionMachO.h
f9bdeddb96043559c61f176f8077e3b91a0c544f 10-Aug-2009 Chris Lattner <sabre@nondot.org> split MachO section handling stuff out to its out .h/.cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78576 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
CSectionMachO.h
ff4bc460c52c1f285d8a56da173641bf92d49e3f 10-Aug-2009 Chris Lattner <sabre@nondot.org> Make the big switch: Change MCSectionMachO to represent a section *semantically*
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?



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78547 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
93b6db3de934a3cfca5586df25184fef4a54c500 09-Aug-2009 Chris Lattner <sabre@nondot.org> sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78517 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSection.h
892e18239308f8a02a4c83758616be84a459c19d 09-Aug-2009 Chris Lattner <sabre@nondot.org> 1. Make MCSection an abstract class.
2. Move section switch printing to MCSection virtual method which takes a
TAI. This eliminates textual formatting stuff from TLOF.
3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and
TLOFELF::AtIsCommentChar.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78510 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
7c599d056a41262681aa7fcd771eeed53a8e0bd2 08-Aug-2009 Chris Lattner <sabre@nondot.org> make target-specific TLOF impls (except PIC16) create target-specific
MCSection instances.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78500 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
a1c31b779cdde0090b8efcde87d7d0d898cabd38 08-Aug-2009 Chris Lattner <sabre@nondot.org> stub out PECOFF/MachO/ELF MCSection classes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78499 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
3b24c0172069a2546cd095e4b91f8b88c1ea0722 04-Aug-2009 Chris Lattner <sabre@nondot.org> make MergeableCString be a SectionKind "abstract class", and
add new concrete versions for 1/2/4-byte mergable strings.

These are not actually created yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78055 91177308-0d34-0410-b5e6-96231b3b80d8
ectionKind.h
cdcb388a589846e7e7ca8c88f77cf53933539074 02-Aug-2009 Daniel Dunbar <daniel@zuster.org> Change MCOperand to use Create style instead of Make style for constructing
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77837 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
7b1dcdfce1b199f314df3de697c791fde38b175e 02-Aug-2009 Chris Lattner <sabre@nondot.org> make SectionKind::Kind completely private now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77836 91177308-0d34-0410-b5e6-96231b3b80d8
ectionKind.h
1ef9be28831ad2d0b16d9934dc65c98e17b429a7 02-Aug-2009 Chris Lattner <sabre@nondot.org> Make SectionKind::get() private.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77835 91177308-0d34-0410-b5e6-96231b3b80d8
ectionKind.h
2798119ab4d7e0b42812b3acdf37821f40dee627 02-Aug-2009 Chris Lattner <sabre@nondot.org> (re)introduce new simpler apis for creation sectionkinds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77834 91177308-0d34-0410-b5e6-96231b3b80d8
ectionKind.h
f9650c061ee89ac55740555530ca5c2842c28738 01-Aug-2009 Chris Lattner <sabre@nondot.org> it turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77812 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
0064e85050e3a324aa66ee29af56546e0c31f6cc 01-Aug-2009 Chris Lattner <sabre@nondot.org> fix a layering violation by moving SectionKind out to its own header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77808 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
ectionKind.h
968ff1196768c0b6dbcc5508025a2923bfa73fab 01-Aug-2009 Chris Lattner <sabre@nondot.org> Change SectionKind to be a property that is true of a *section*, it
should have no state that is specific to particular globals in the
section. In this case, it means the removal of the "isWeak" and
"ExplicitSection" bits. MCSection uses the new form of SectionKind.

To handle isWeak, I introduced a new SectionInfo class, which is
SectionKind + isWeak, and it is used by the part of the code generator
that does classification of a specific global.

The ExplicitSection disappears. It is moved onto MCSection as a new
"IsDirective" bit. Since the Name of a section is either a section
or directive, it makes sense to keep this bit in MCSection. Ultimately
the creator of MCSection should canonicalize (e.g.) .text to whatever
the actual section is.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77803 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
4a7bc1e5aafbb543a9a535bce54fc62d18723b35 01-Aug-2009 Chris Lattner <sabre@nondot.org> All MCSections are now required to have a SectionKind.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77787 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
76c4d7696c1eb566d53467a76024c5fdadd448e4 31-Jul-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Support quoted identifiers.
- Uses MCAsmToken::getIdentifier which returns the (sub)string representing the
meaningfull contents a string or identifier token.

- Directives aren't done yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77739 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
a87dea4f8c546ca748f1777a8d1cabcc06515d91 31-Jul-2009 Chris Lattner <sabre@nondot.org> switch off of 'Section' onto MCSection. We're not properly using
MCSection subclasses yet, but this is a step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77708 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
ed47a0409b187d5dcd2bddfd054326fc809d00ae 31-Jul-2009 Chris Lattner <sabre@nondot.org> split MCSection stuff out to its own .cpp file, add a new
MCSectionWithKind subclass of MCSection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77684 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
fcdbf4ecc33d6d9a197c88ac06218741a9228375 31-Jul-2009 Chris Lattner <sabre@nondot.org> create sections with MCSection::Create instead of Context->getOrCreateSection.
This is needed to allow polymorphic sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77680 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSection.h
9004e8d412acd991cb754cd52f10401079696633 29-Jul-2009 Daniel Dunbar <daniel@zuster.org> Add missing include.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77470 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
e240beb0652f47adb5f58040ce17e43dcf25653f 29-Jul-2009 Daniel Dunbar <daniel@zuster.org> Make expression parsing and error/warning reporting available through the
generic MCAsmParser interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77381 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
cbbe2484418536264b1a26c517c16d505a61d5c8 28-Jul-2009 Daniel Dunbar <daniel@zuster.org> Expose Tokens to target specific assembly parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77337 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
f9507ffa5b1c8697009e86bbedaacb51e4c6735d 28-Jul-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Implement .abort fully in the front end


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77272 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
9a7e2ccf574368b60455f8c8975030475a1f3ce0 27-Jul-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.
- My DFS traversal of LLVM is, at least for now, nearly complete! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77258 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
b5261ebabb215330d6549048b825d236fb3c9b6b 27-Jul-2009 Daniel Dunbar <daniel@zuster.org> Move MCContext and friends to StringRef based APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77251 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSection.h
CSymbol.h
5026ae4514caf5bb88d6c09fbf56a9db2753ed43 20-Jul-2009 Kevin Enderby <enderby@apple.com> Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as
the parsing of the .dump and .load should be done in the assembly parser and
not have any need for an MCStreamer API. Changed the code for now so these
just produce an error saying these specific directives are not yet implemented
since they are likely no longer used and may never need to be implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76462 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
dbd692a66e6a5f60ec3ff120ed27ae3a918c375f 20-Jul-2009 Daniel Dunbar <daniel@zuster.org> Add MCAsmLexer interface.
- This provides the AsmLexer interface to the target specific assembly parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76460 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmLexer.h
CAsmParser.h
a3af370dc12f6d5100da5d614ab0a62da135569a 20-Jul-2009 Daniel Dunbar <daniel@zuster.org> Add MCAsmParser interface.
- This provides the AsmParser interface to the target specific assembly
parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76453 91177308-0d34-0410-b5e6-96231b3b80d8
CAsmParser.h
f96db468fcf62d671cda99b68b6cfd3f2dc0b839 16-Jul-2009 Kevin Enderby <enderby@apple.com> Removed the SubsectionsViaSymbols MCStreamer API and replaced it with a generic
EmitAssemblerFlag API which takes a value from the added AssemblerFlag
enumerated constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76087 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
8e25e2d801bb1119cea080c7c860adcfbf85d65d 16-Jul-2009 Chris Lattner <sabre@nondot.org> implement .include in the lexer/parser instead of passing it into the streamer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75896 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
6e68cd96b2c76c80bfff07e8121ba19691ec1276 15-Jul-2009 Kevin Enderby <enderby@apple.com> Added llvm-mc support for parsing the .dump and .load directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75786 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
1f049b24c7e520ecfd2291b7d30eb5abc3aee852 15-Jul-2009 Kevin Enderby <enderby@apple.com> Added llvm-mc support for parsing the .include directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75711 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
711482476c55f99c34c516f9e035b7c59b00ef42 14-Jul-2009 Kevin Enderby <enderby@apple.com> Added llvm-mc support for parsing the .lsym directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75685 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
95cf30c444707634bbd950f13405b6c8bcfe496b 14-Jul-2009 Kevin Enderby <enderby@apple.com> Added llvm-mc support for parsing the .desc directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75645 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
5f1f0b8f7e7087d456ddc3efdb4bed21a4ae359c 14-Jul-2009 Kevin Enderby <enderby@apple.com> Added llvm-mc support for parsing the .abort directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75545 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
a5c783280f83df5c60a8ed9e32c61b05a11048e3 13-Jul-2009 Kevin Enderby <enderby@apple.com> add llvm-mc support for parsing the .subsections_via_symbols directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75500 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
9be3fee2bdc3126fb87e4e1b31935905f4bcc4d0 11-Jul-2009 Chris Lattner <sabre@nondot.org> add support for .zerofill, patch by Kevin Enderby!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75301 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
1fc3d7558139eb6081a7ee5a8f88506d44c8dd7f 09-Jul-2009 Chris Lattner <sabre@nondot.org> add llvm-mc support for parsing the .lcomm directive, patch by Kevin Enderby!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75148 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
4e4db7adfc9858a8f77f841c7467bc6fcbb8110e 07-Jul-2009 Chris Lattner <sabre@nondot.org> Implement parsing support for the .comm directive. Patch by
Kevin Enderby!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74944 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
d6bb283de9f81428762f13b7f6bae31adaba5768 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Tweak MCSymbol doxyments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74599 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
80f62d0062a6008403eb889c35fa19939c5c50cf 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Rename MCValue::isConstant to isAbsolute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74596 91177308-0d34-0410-b5e6-96231b3b80d8
CValue.h
a0faf7ae555eacf75f5a482968b27e447d71c99f 01-Jul-2009 Chris Lattner <sabre@nondot.org> add comments, privatize interface


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74592 91177308-0d34-0410-b5e6-96231b3b80d8
CSection.h
36e74871b881112c17ffdcd421162ab588c3456b 01-Jul-2009 Chris Lattner <sabre@nondot.org> disable some ctors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74591 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
14022f2a5a51d8ac0d8066a87dfd2dc2f2fabfdf 01-Jul-2009 Chris Lattner <sabre@nondot.org> add some comments to MCSymbol header, make the ctor private so that only MCContext can create these.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74590 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
e18e0c58dcd740c64e962fefde44249d685d0568 01-Jul-2009 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74589 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
e303503da3dd928b70ab371161e33b515e8dfc95 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Fill in some methods for the MCValue field of an MCOperand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74572 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
374d8bddacbffce7c82ce81103d30b5ee42032df 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Symbols in a relocatable expression of the (a - b + cst) form are
allowed to be undefined when the expression is seen, we cannot enforce the
same-section requirement until the entire assembly file has been seen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74565 91177308-0d34-0410-b5e6-96231b3b80d8
CValue.h
15d170709608e2f1efcada74c297c10c8c71fdcf 30-Jun-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Evaluation for relocatable expressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74496 91177308-0d34-0410-b5e6-96231b3b80d8
CSymbol.h
CValue.h
c29dfa786a23c9ff0827ce4a56b5b178e4087aaa 30-Jun-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Parse .{,b,p2}align{,w,l} directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74478 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
dce0f3c556474092f10b082adff0a2a58f428317 30-Jun-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Diagnose misuse (mix) of defined symbols and labels.
- For example, we diagnose errors on:
--
a:
a = 10
--

- For now we reject code like:
--
.long a
a = 10
--
which "as" accepts (on Darwin).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74476 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CSymbol.h
7908a6a189d12c38269df2891a24382525d00591 29-Jun-2009 Daniel Dunbar <daniel@zuster.org> Rename MCValue::getCst to getConstant and add MCValue::isConstant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74440 91177308-0d34-0410-b5e6-96231b3b80d8
CValue.h
84a2926fb7ab388d688a133b0b375a26e669fd55 24-Jun-2009 Daniel Dunbar <daniel@zuster.org> Sketch streamer support for .align, .org functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74109 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
71d259bc4be4f5c7a8a30c6be8da105074ff805a 24-Jun-2009 Daniel Dunbar <daniel@zuster.org> We decided to not worry about Atoms for now, it should be straightforward to
reintroduce them later.

Also, don't require MCSection* when creating a symbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74081 91177308-0d34-0410-b5e6-96231b3b80d8
CAtom.h
CContext.h
CStreamer.h
CSymbol.h
d814b2150950114a44b607c90ea7a0725c40a8e6 24-Jun-2009 Daniel Dunbar <daniel@zuster.org> MCStreamer: Add a few more "symbol attributes".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74077 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
c69485e34d57e17fe2c3acab64e519d6a6945197 24-Jun-2009 Chris Lattner <sabre@nondot.org> add trivial support for passing label definitions through the MCStreamer.

This is suboptimal in several aspects, see the commented out assertion.
I need to talk to Daniel about this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74057 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
a11af531ec48ad84f790b9511f003ac5c934a999 24-Jun-2009 Daniel Dunbar <daniel@zuster.org> Start MCAsmStreamer implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74044 91177308-0d34-0410-b5e6-96231b3b80d8
CAtom.h
CContext.h
CSection.h
CStreamer.h
CSymbol.h
f4a9061b6b224da1b671673a606cda2627d946b7 24-Jun-2009 Chris Lattner <sabre@nondot.org> stub out a trivial constructor method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74038 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
ba1da8a7b10b8a7df04f3ca47ca36ad18adad80e 24-Jun-2009 Daniel Dunbar <daniel@zuster.org> Update for MCImm -> MCValue rename.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74024 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CStreamer.h
a33ccc795659919b2c0d8575a704821eb1972149 24-Jun-2009 Chris Lattner <sabre@nondot.org> rename MCImm ->MCValue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74023 91177308-0d34-0410-b5e6-96231b3b80d8
CImm.h
CInst.h
CValue.h
381e92c66a98ee766ea53039b0cd8ce3bde7be2d 24-Jun-2009 Daniel Dunbar <daniel@zuster.org> Add comments for the MCStreamer interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74019 91177308-0d34-0410-b5e6-96231b3b80d8
CStreamer.h
ecc63f8687c4eb746b69336316685fe9b224adfb 24-Jun-2009 Daniel Dunbar <daniel@zuster.org> Start flushing out MCContext.
- Lives inside new library lib/MC (LLVMMC.a)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74013 91177308-0d34-0410-b5e6-96231b3b80d8
CAtom.h
CContext.h
CSection.h
CSymbol.h
25e0d8f755736b0a17400adbdd367aee89fbecfc 23-Jun-2009 Daniel Dunbar <daniel@zuster.org> Start sketching MCStreamer interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73994 91177308-0d34-0410-b5e6-96231b3b80d8
CContext.h
CStreamer.h
dcee6847555373c6f352370042486ef904a3d55b 23-Jun-2009 Bill Wendling <isanbard@gmail.com> Add include file to get the type for in64_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73991 91177308-0d34-0410-b5e6-96231b3b80d8
CImm.h
35d0e8793737201d9e24f8944f0ead5636a695f4 23-Jun-2009 Chris Lattner <sabre@nondot.org> add a simple MCImm class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73984 91177308-0d34-0410-b5e6-96231b3b80d8
CImm.h
CInst.h
f28d6311896d7de6221465c3918fdc5cbd7d5a6f 23-Jun-2009 Chris Lattner <sabre@nondot.org> add an accessor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73966 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
c12430644a9f49a056286f8ebe0e55ccc23bdde0 20-Jun-2009 Chris Lattner <sabre@nondot.org> implement support for lowering subregs when preparing to print
LEA64_32r, eliminating a bunch of modifier logic stuff on addr modes.

Implement support for printing mbb labels as operands.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73817 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
bb5d44d7c496f9576e7b1fcfa3f51f544512d158 20-Jun-2009 Chris Lattner <sabre@nondot.org> make immediates be int64_t like machineoperand. Add some apis


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73809 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
d5fb7906130989a579d1bfe4490b414331e94fee 20-Jun-2009 Chris Lattner <sabre@nondot.org> stub out some hacky code for wiring up the new asmprinter interfaces
on X86. Not useful yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73799 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
8ebf83b2cc67e53ac55d5022dc3866c13df88c69 19-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Include DataTypes.h for 'uint64_t'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73748 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h
475370b036a9e355b51c899465efc00532bb3c41 19-Jun-2009 Chris Lattner <sabre@nondot.org> Add some scaffolding for a new experimental asmprinter
implementation. The idea is that we want asmprinting to
work by converting MachineInstrs into a new MCInst class,
then the per-instruction asmprinter works on MCInst. MCInst
and the new asmprinters will not depend on most of the
llvm code generators. This allows building diassemblers
that don't link in the whole llvm code generator. This is
step #1 of many.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73743 91177308-0d34-0410-b5e6-96231b3b80d8
CInst.h