History log of /external/llvm/lib/MC/MCAssembler.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cf5a1461acaace0f3e7d11fbbcfbf635b8c8ea9d 24-Apr-2012 Shih-wei Liao <sliao@google.com> Merge with LLVM upstream r155090.

Conflicts:
lib/Support/Unix/PathV2.inc

Change-Id: I7b89833849f6cbcfa958a33a971d0f7754c9cb2c
f1d0f7781e766df878bec4e7977fa3204374f394 26-Mar-2012 Craig Topper <craig.topper@gmail.com> Prune some includes and forward declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
014bc6e3ceac59ea7d1d435cfb88642157c5270c 19-Mar-2012 TDYa127 <tdy@google.com> Restore to use private and LLVM coding style

Change-Id: I5650b0de503f5b44e7dc38bcb204f65a9b8a4ddc
/external/llvm/lib/MC/MCAssembler.cpp
8b8825ac164c2e7cce8b6987cea78cd8b301360d 17-Mar-2012 Shih-wei Liao <sliao@google.com> Integrated linker.

Change-Id: Iec22c1b717750cb428c61c5319cdd77378e4af1e
/external/llvm/lib/MC/MCAssembler.cpp
7b25ecf6adbf3c4709c48033acfeb6ebbb4452ab 27-Feb-2012 Jim Grosbach <grosbach@apple.com> ARM BL/BLX instruction fixups should use relocations.

We on the linker to resolve calls to the appropriate BL/BLX instruction
to make interworking function correctly. It uses the symbol in the
relocation to do that, so we need to be careful about being too clever.

To enable this for ARM mode, split the BL/BLX fixup kind off from the
unconditional-branch fixups.

rdar://10927209

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
858143816d43e58b17bfd11cb1b57afbd7f0f893 07-Feb-2012 Craig Topper <craig.topper@gmail.com> Convert assert(0) to llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
f3c936769b948b53a7c03d2d5fca1ef75284f977 27-Jan-2012 Jim Grosbach <grosbach@apple.com> Source information in 'expected relocatable expression' diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
ec3433852dd11e8ff60c9610b4c84468e5935f2b 18-Jan-2012 Jim Grosbach <grosbach@apple.com> Tidy up. MCAsmBackend naming conventions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
9b5b125c34b47e0e7eef2548acee8bf1448c4b71 18-Jan-2012 Jim Grosbach <grosbach@apple.com> Move some ARM specific MCAssmebler bits into the ARMAsmBackend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
2d24e2a396a1d211baaeedf32148a3b657240170 20-Dec-2011 David Blaikie <dblaikie@gmail.com> Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
370b78d795154899a22ca2b4674e890661ff1d59 06-Dec-2011 Jim Grosbach <grosbach@apple.com> Move target-specific logic out of generic MCAssembler.

Whether a fixup needs relaxation for the associated instruction is a
target-specific function, as the FIXME indicated. Create a hook for that
and use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
f68a26b5d8e06a85edba97702884a74673b60807 06-Dec-2011 Jim Grosbach <grosbach@apple.com> Tidy up. Hard tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
f77d5b14af6b92403b93f7ed249f9023e99028cc 06-Dec-2011 Jim Grosbach <grosbach@apple.com> Switch MCAssembler to method names starting w/ lower-case.

per http://llvm.org/docs/CodingStandards.html#ll_naming

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
6200611dffd301c49cb19d52eaedff79623adb98 29-Nov-2011 Jim Grosbach <grosbach@apple.com> Better fix for ARM MOVT relocation encoding of thumb bit.

Replaces r145318 with a more targetted fix for the relocation handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
958da85b937a26f47eb2412e6e05656b93c07066 29-Nov-2011 Jim Grosbach <grosbach@apple.com> Thumb2 only force the fixup thumb bit for data relocations.

rdar://10493453

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
684457d179fcfdf8c1f8ee9f66cc40665ecc648c 27-Oct-2011 Jim Grosbach <grosbach@apple.com> Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
3e74d6fdd248e20a280f1dff3da9a6c689c2c4c3 24-Aug-2011 Evan Cheng <evan.cheng@apple.com> Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
c8497b6a2565046b5e6b5f2ea9dedc62b53dd966 29-Apr-2011 Daniel Dunbar <daniel@zuster.org> MCAsmLayout: Add support for computing the symbol offset of variables. Not
currently used, because variables don't get reported as being "defined".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
d88cac0a6e908a366f403b37725e765604bc15d3 26-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> No relocation produces a SLEB or ULEB, make sure they are handled in MC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
835439a397407e421263bd476e5b18bf787ffb6a 22-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Assert that the AddrDelta expression is really constant and wrap it in a set
if we have a lame assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
175fb36f101a20df10db90bfe4d0c44a7d05325b 17-Dec-2010 Owen Anderson <resistor@mac.com> Thumb's forced-PC-alignment requirement applies to the _total_ displacement, not just to the fragment relative
portion. While the fragment boundary is usually already aligned, it is possible for it not to be, which
would lead to a non-aligned final displacement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
d18e011cbb3df090166d9f49aa51fda077f09fcd 15-Dec-2010 Owen Anderson <resistor@mac.com> Fix typo in r121875.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
f9a447617329186976fe5ab8b48fe3c9c0698bc7 15-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Patch by David Meyer to avoid a O(N^2) behaviour when relaxing fragments.

Since we now don't update addresses so early, we might relax a bit more than
we need to. This is simillar to the issue in PR8467.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
b4172fa72915bd031383e81c83cd313c8c4b2e74 04-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Once the layout is done we don't need to keep updating which fragments are
valid. Addresses will not change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
b651a96ef21a1f3e14c5cf5a317f9fe2bb648414 19-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
e25e1ef48b029795fd03be13791e5d19834bd503 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Speed up AddSectionToTheEnd. It was walking all fragments in all sections.
This is really slow with we have 1000s of sections each with a corresponding
relocation section. Also, it is only used by the ELF writer to add
basic data, so there is no need to force a new layout pass.

Should fix PR8563.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
c095793b4ab027181605c79c9808df12afe45d63 30-Sep-2010 Kevin Enderby <enderby@apple.com> This is the last major patch to implement support for the .loc directive
and output the dwarf line number tables. This contains the code to emit and
encode the dwarf line tables from the previously gathered information in the
MCLineSection objects. This contains all the details to encode the line and
address deltas into the dwarf line table.

To do this an MCDwarfLineAddrFragment has been added.

Also this moves the interface code out of Mach-O streamer into
MCDwarf so it should be useable by other object file formats.

There is now one call to be made from an MCObjectStreamer
EmitInstruction() method:
MCLineEntry::Make(this, getCurrentSection());
to create a line entry after each instruction is assembled.

And one call call to be made from an MCObjectStreamer Finish() method:
MCDwarfFileTable::Emit(this, DwarfLineSection);
when getContext().hasDwarfFiles() is true and is passed a object file specific
MCSection where to emit the dwarf file and the line tables.

This appears to now be correct for 32-bit targets, at least x86. But the
relocation entries for 64-bit Darwin needs some further work which is next
up to work on. So for now the 64-bit Mach-O target does not output the
dwarf file and line tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
75413b146443f4ee2d495969127dc1fc1ddb87c1 24-Sep-2010 Daniel Dunbar <daniel@zuster.org> MC: Add missing ')' in diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
a6c329d66b5327a2ecaa27f3a64797f1a57711f3 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> MC: Give a (lame) hard error if a .org directive would create an unreasonably
large object file (> 1GB).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
c983b20661d574b7adb2675478210c03ad1d0a33 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> MC/ELF: Allow null values in virtual sections, ELF doesn't use special
directives for putting contents in .bss, for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
0ecdb6f3d8af4bac2c18f90d369ad25cd9ef4f2d 30-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC: Initialize MCFragment::Offset, noticed by Cameron Esfahani.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
6f74f69ff4a6e365272a754f0984c0321755976d 29-Jun-2010 Duncan Sands <baldrick@free.fr> The variable ValueSize is set to 1 on both code paths, and then
ignored! Remove it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
83194de76a34e240927cf45c0debf12efe845c9b 26-May-2010 Daniel Dunbar <daniel@zuster.org> MC: When running with -mc-relax-all, we can eagerly relax instructions and avoid creating unnecessary MCInstFragments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
95506d40c5bafc72aeebd96dca2b0f92bd0480f1 26-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Change RelaxInstruction to only take the input and output instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
84882528551bd816464a0657ad581c1fed0ac865 26-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Simplify MayNeedRelaxation to not provide the fixups, so we can query it
before encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
11c411151643e80b9da0acf16f8bb3ec9c6d2754 14-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Implicitly assign section addresses when the previous fragment is layed out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
49ed9211905ec586f1d23a7f337d335ae63b4635 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Move ordinal calculation, to make sure fragments synthesized for layout get assigned ordinals properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
09d3465f0e4e5bb1bb858e0e4dececf4f7ab6741 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Create dummy fragments to avoid ever having empty sections, which simplifies layout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
054be92e1da7015190377d6bade57196f28cf33a 13-May-2010 Daniel Dunbar <daniel@zuster.org> Fix -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
61066dbdf2f035e146c11a40d4cf6531cf2dfd6c 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Switch to using explicit MCAlignFragments with OnlyAlignAddress bit instead
of manually doing padding/editing layout in LayoutSection().
- This probably seems like six-of-one and half-dozen of another, but there
is a method to my madness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
e2fee5b2369b4d6c31d3ad3b0a7d257e6df22041 13-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Explicitly check that only virtual fragments appear in virtual sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
52f8dff671280dc13143ba2a5d09d2da243cbb0a 12-May-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
2d891a20e665136a603cc0a076ed1ebbd4703f47 12-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Tweak section layout to not relying on accumulating address value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
a5f1d57f65ae601ec181c0f4e36cf0df5e8d79d8 12-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/x86_64: Add a new hook for checking whether a particular section can
be diced into atoms, and adjust getAtom() to take this into account.
- This fixes relocations to symbols in fixed size literal sections, for
example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
31e8e1d08566c9b169df003d499a7e22856e5408 04-May-2010 Daniel Dunbar <daniel@zuster.org> llvm-mc: Fix case were we would skip a line in the .s file after an instruction
match failure.

Also, fixes a few memory leak FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
75361b69f3f327842b9dad69fa7f28ae3b688412 08-Apr-2010 Chris Lattner <sabre@nondot.org> rename llvm::llvm_report_error -> llvm::report_fatal_error



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
ff54784683591b2cdbdc18690aeac12c8d87f97b 24-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Sprinkle in some more interesting statistics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
d8036fb0deb7daff7959b0a5407c8a45acb5e603 23-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Switch to using MCInst fragments to do relaxation.

Also, both MCMachOStreamer and MCAssembler are now target independent!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
8f9b80e5df12779a56d763ebf20864dad2bc72da 23-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Add TargetAsmBackend::WriteNopData and use to eliminate some target dependencies in MCMachOStreamer and MCAssembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
c6f598209a6ffc1e5273d867c7fd545359c4f209 22-Mar-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
1a9158c301b58d8119664f416461d5a5549170c4 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Add TargetAsmBackend::createObjectWriter.
- MCAssembler is now object-file independent, although we will surely need more work to fully support ELF/COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
cc5b84c6fba79a798e86ea604e54ca9429273a13 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Add TargetAsmBackend::isVirtualSection hook.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
bdd9281f356d326155dc2ca5585a708e09e90600 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MCAssembler: Pull out MCObjectWriter class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
87190c473c216e481e0a70475577e496b3a3449e 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MCAssembler: Move ApplyFixup to the TargetAsmBackend, this is a target specific not object writer specific task.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
17a0650641915ffc430dfc78e2d4e2e27b884333 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Lift relocation emission logic a bit higher to separate evaluation / relocation handling from the actual .o writing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
034843ac8bca36d14ef9d83b50596354b5f3420f 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Add isScatteredFixupFullyResolved, which implements the correct algorithm (used on x86_64) for determining whether an evaluated fixup is fully resolved (doesn't need relocation).
- Test cases will follow, once we have x86_64 relocation support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
939f8d7ca23b95acdd5d1e71a7579ee8d33e7fd6 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix some corner cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
d6e59084d07500f68548652b8197325809a0c0c2 15-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and external relocations, but we don't have x86_64 relocations yet).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
5691e74f97fc8cad671d50450ad986347875e1d1 13-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/X86_64: Symbol support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
ee0d89245eabf93d89b5fef7ac8707680796826d 13-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Initial x86_64 support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
da3e9f760ce2328f6dfe69663c2b17da02ece2db 13-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: PCrel relocations weren't using the right base address, they are
relative to the fragment address, not its offset. This was masked by the text
section normally being at address 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
979ba5b3c7c818b826d06298ee7f79c4234faedb 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Implement "absolutizing" semantics of .set, by evaluating the assembly time value of variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
2101d9c4af4da04939db988c9fe07262b247faa4 10-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Use the MCAssembler symbol map instead of reconstructing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
07a9641ebf420ae90aa3667ab4df83cd1ade2117 10-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Resolve a FIXME; these relocation types are no longer semanticaly different.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
a015c1c876bb74a83cbbae06449056e0c6f0e9c9 10-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Use the SECTDIFF relocation type for (A - B + constant) where A is external.
- I'm not sure why, but this is what 'as' does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
f3a066f7c3ef4e729c92929acab352a93f8d7563 09-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: For PCrel relocations, we need to compensate for the PCrel adjustment when determining if we need a scattered relocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
aef9d7af69913740f313c5cc1dfe2a8e1d352227 09-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Also set the PCrel bit in the second half of paired relocation entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
e180fa962cc629255bbb0c5f185299c981b042ef 09-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Don't generate relocations for PCrel fixups to local labels.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
45aefff64c64d5bd7804f39d994883b98ce4415a 09-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Tweak .dump() formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
f8b8ad77a8b5632886a4cfe41d798bae7277efcb 09-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Don't adjust section sizes when aligning zero fill sections, just pad the address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
b2b4acd757194b4b75e571ec7225811f94e753f3 08-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Macho-O: Align the zerofill section itself to the maximum alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
37fad5ce4d81fd459fafe1517d6cd17e7ab49958 08-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Fix address compution for zero fill sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
0ce6bd55c38b2e146b5ce887bae576ee538bb575 08-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Error out instead of crashing on invalid scattered relocation expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
76687083a5185cedc00fb8bb0d384b814492849a 23-Feb-2010 Kevin Enderby <enderby@apple.com> This is the second patch to allow x86 code to be aligned with optimal nops.
With the compiler changed to use EmitCodeAlignment() it does change the
functionality. But X86 assembly code assembled with llvm-mc does not change
its output. For that we will eventually change the assembler frontend to
detect a '.align x, 0x90' when used in a section that 'hasInstructions' and use
EmitCodeAlignment, but will wait until we have better target hooks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
eb3804e39a76a267f13e72a00695f5b18c75b932 18-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Update fixup values for change to X86 offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
9a7795cbed47159566fd8f57b846fcf14ffb0272 17-Feb-2010 Duncan Sands <baldrick@free.fr> Pacify gcc-4.5, which warns (correctly) that these switches have
cases that are not part of the enum.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
591047f7149c2e57113c60ed194bc9534a7c1cce 13-Feb-2010 Daniel Dunbar <daniel@zuster.org> MCAssembler: Fix pcrel relocations. Oh and,
--
ddunbar@ozzy:tmp$ clang -m32 -integrated-as hello.c && ./a.out
hello world!
--

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
f6346769b344f9b134f0661e8bd2b4245f6490ea 13-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Start emitting fixups/relocations for instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
45f8c095ad94888716ceff54daf2fdf2f2f668a4 02-Feb-2010 Chris Lattner <sabre@nondot.org> Add a new top-level MachO.h file for manifest constants, fixing
a layering violation from MC -> Target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
60a17740b845565f664e81a91b7019a520af88d7 19-Jan-2010 Nate Begeman <natebegeman@mac.com> Remove this fixme, looking at the linker source, all targets pad to 4 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
6c31b0575c3ce9f67ed6cd371216556893707af8 28-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Fix thinko in emitting values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
ad7c3d55932f949e6bd428232999088a53f54a4f 26-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Improve indirect symbol support (add the indirect index table).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
0adcd35f78b89bf70eb634b7f9ac2103516ca2b2 25-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Add statistic for number of fragments emitted by the assembler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
50e48b359eb4e3d3e22d6e447583619d1feaeeae 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Tweak undefined symbol handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
23132b188ba651ba172380cd082cc286df73d440 24-Aug-2009 Chris Lattner <sabre@nondot.org> prune the #includes in raw_ostream.h by moving a
member out of line. ftostr is not particularly speedy,
so that method is presumably not perf sensitive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
bea2c957046e43622b43bed814dd96d772eb0628 22-Aug-2009 Chris Lattner <sabre@nondot.org> tweak #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp
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
/external/llvm/lib/MC/MCAssembler.cpp