1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

72 Commits

Author SHA1 Message Date
Daniel Dunbar
5ed90337ff MC/Mach-O: Fail faster/harder when we see .file, which isn't yet supported.
llvm-svn: 104031
2010-05-18 17:28:17 +00:00
Daniel Dunbar
ee5ac7a69b MC/Mach-O: Reverse order of SymbolData scanning when emitting instructions.
- This fixes a string table mismatch with 'as' when two new symbols are defined
   in a single instruction.

llvm-svn: 103979
2010-05-17 21:19:59 +00:00
Daniel Dunbar
80719b2d36 MC/Mach-O: Fix some differences in symbol flag handling.
- Don't clear weak reference flag, 'as' was only "trying" to do this, it wasn't
   actually succeeding.
 - Clear the "lazy bound" bit when we mark something external. This corresponds
   roughly to the lazy clearing of the bit that 'as' implements in
   symbol_table_lookup.
 - The exact meaning of these flags appears pretty loose, since 'as' isn't very
   consistent. For now we just try to match 'as', we will clean this up one day
   hopefully.

llvm-svn: 103964
2010-05-17 20:12:31 +00:00
Eric Christopher
ebea91f168 Add AsmParser support for darwin tbss directive.
Nothing uses this yet.

llvm-svn: 103757
2010-05-14 01:50:28 +00:00
Daniel Dunbar
de7caed021 MC: Move MCAlignFragment::EmitNops value out of the constructor.
llvm-svn: 103665
2010-05-12 22:56:23 +00:00
Daniel Dunbar
cf11e2a0a5 MC: Eliminate MCZeroFillFragment, it is no longer needed.
llvm-svn: 103664
2010-05-12 22:51:38 +00:00
Daniel Dunbar
d3f60794d8 MC: Drop support for alignment in ZeroFill fragment, we can just use
MCAlignFragments for this.

llvm-svn: 103661
2010-05-12 22:51:27 +00:00
Daniel Dunbar
00ffbb63da MC/Mach-O: Explicitly track atoms, as represented by their defining symbol, for each fragment (not yet used).
llvm-svn: 103438
2010-05-10 22:45:09 +00:00
Chris Lattner
568058ef71 break coff symbol definition stuff out into proper MCStreamer callbacks,
patch by Nathan Jeffords!

llvm-svn: 103346
2010-05-08 19:54:22 +00:00
Kevin Enderby
3807a4746a 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.

llvm-svn: 103302
2010-05-07 21:44:23 +00:00
Daniel Dunbar
9a3d46162f MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for
writing them.
 - <rdar://problem/7885351> integrated assembler broken for i386 objc code

llvm-svn: 103112
2010-05-05 19:01:05 +00:00
Daniel Dunbar
139bd85642 MC: Reject attempts to define a variable symbol.
llvm-svn: 103111
2010-05-05 19:01:00 +00:00
Daniel Dunbar
d2ac9dc48b MC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue.
llvm-svn: 103095
2010-05-05 17:41:00 +00:00
Daniel Dunbar
d04906b49e 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.

llvm-svn: 99563
2010-03-25 22:49:09 +00:00
Daniel Dunbar
14c84e0c3b MC: Switch to using MCInst fragments to do relaxation.
Also, both MCMachOStreamer and MCAssembler are now target independent!

llvm-svn: 99256
2010-03-23 05:09:03 +00:00
Daniel Dunbar
47743ae59a MC: Add TargetAsmBackend::MayNeedRelaxation, for checking whether a particular instruction + fixups might need relaxation.
llvm-svn: 99249
2010-03-23 03:13:05 +00:00
Daniel Dunbar
b33d212057 MC: Add TargetAsmBackend::WriteNopData and use to eliminate some target dependencies in MCMachOStreamer and MCAssembler.
llvm-svn: 99248
2010-03-23 02:36:58 +00:00
Daniel Dunbar
0f6983752f MC: Add MCInstFragment, not used yet.
llvm-svn: 99229
2010-03-22 23:16:48 +00:00
Daniel Dunbar
e7900757bd MC/Mach-O: Factor out getOrCreateDataFragment().
llvm-svn: 99204
2010-03-22 20:35:46 +00:00
Daniel Dunbar
c47468760e MC: Sink code emitter into MCAssembler.
llvm-svn: 98953
2010-03-19 10:43:18 +00:00
Daniel Dunbar
03a9f8588c MC: Fix a crash on invalid, attempting to evaluate undefined symbols.
llvm-svn: 98464
2010-03-14 03:10:40 +00:00
Daniel Dunbar
71473e6b15 MC: Add MCAssembler::addFixup, which enforces that fixups are added in order.
llvm-svn: 98379
2010-03-12 21:00:38 +00:00
Daniel Dunbar
687d99cfa8 MC: Provide MCAssembler with a TargetAsmBackend.
llvm-svn: 98222
2010-03-11 01:34:27 +00:00
Daniel Dunbar
fc99f844eb MC: Move the backend section and symbol data maps to MCAssembler.
llvm-svn: 98186
2010-03-10 20:58:29 +00:00
Daniel Dunbar
8f981447a6 Remove unneeded includes.
llvm-svn: 98167
2010-03-10 17:56:05 +00:00
Kevin Enderby
c11390f758 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).

llvm-svn: 96963
2010-02-23 18:26:34 +00:00
Daniel Dunbar
2097684f80 MC/Mach-O: Remove non-sensical comment, and add a missing AddValueSymbols call.
llvm-svn: 96809
2010-02-22 22:08:57 +00:00
Daniel Dunbar
c05a38a3d3 MC/Mach-O: Start emitting fixups/relocations for instructions.
llvm-svn: 96095
2010-02-13 09:29:02 +00:00
Daniel Dunbar
7a1fd21459 MCAssembler: Switch MCAsmFixup to storing MCFixupKind instead of just a size.
llvm-svn: 96094
2010-02-13 09:28:54 +00:00
Daniel Dunbar
cc282ba52e MC/Mach-O: Implement EmitValue using data fragments + fixups instead of fill fragment.
llvm-svn: 96091
2010-02-13 09:28:22 +00:00
Daniel Dunbar
ddfda89472 MC: First cut at MCFixup, for getting fixup/relocation information out of an MCCodeEmitter.
llvm-svn: 95708
2010-02-09 22:59:55 +00:00
Chris Lattner
b3fe7597f5 add scaffolding for target-specific MCExprs.
llvm-svn: 95559
2010-02-08 19:41:07 +00:00
Daniel Dunbar
eb0b81040a MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.
llvm-svn: 95135
2010-02-02 21:44:01 +00:00
Chris Lattner
3559d9a38a mcstreamerize gprel32 emission.
llvm-svn: 94452
2010-01-25 21:28:50 +00:00
Chris Lattner
20d89c382c 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.

llvm-svn: 94437
2010-01-25 18:58:59 +00:00
Chris Lattner
7a5c8c15bd add symbol attribute support for the ELF .type directive.
llvm-svn: 94435
2010-01-25 18:30:45 +00:00
Chris Lattner
9834b7f300 emit the .size directive for global variables on ELF through
mcstreamer.

llvm-svn: 94416
2010-01-25 07:52:13 +00:00
Chris Lattner
617e6fb889 mcize lcomm, simplify .comm, extend both to support 64-bit sizes.
llvm-svn: 94299
2010-01-23 07:47:02 +00:00
Chris Lattner
60edc92e39 move the various directive enums out of the MCStreamer class
into a new MCDirectives.h file.

llvm-svn: 94294
2010-01-23 06:39:22 +00:00
Chris Lattner
62d08f5577 mcstreamerize .no_dead_strip and .reference for static ctors/dtors.
llvm-svn: 94290
2010-01-23 05:51:36 +00:00
Chris Lattner
336c2b0d47 Generalize mcasmstreamer data emission APIs to take an address space
identifier.  There is no way to work around it.

llvm-svn: 93896
2010-01-19 19:46:13 +00:00
Nate Begeman
04da97bd5e Add a note for the macho streamer and remove a used of the mangler from the soon to be defunct machowriter pass.
llvm-svn: 93670
2010-01-17 03:49:01 +00:00
Daniel Dunbar
4daaf9d3f4 Pass StringRef by value.
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
Daniel Dunbar
2be596c127 MC: Set symbol values in MachO MCStreamer.
llvm-svn: 84236
2009-10-16 01:58:23 +00:00
Daniel Dunbar
0df659c00b MC: Switch assembler API to using MCExpr instead of MCValue.
llvm-svn: 84234
2009-10-16 01:58:03 +00:00
Daniel Dunbar
022b59a0b5 MC: Remove unneeded context argument to MCExpr::Evaluate*.
llvm-svn: 84233
2009-10-16 01:57:52 +00:00
Daniel Dunbar
3a44b6da61 llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.
llvm-svn: 80578
2009-08-31 08:09:28 +00:00
Daniel Dunbar
b897e807c4 llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').
llvm-svn: 80577
2009-08-31 08:09:09 +00:00
Daniel Dunbar
fcb32716eb llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.
Also, use MCInst::print instead of custom code in MCAsmPrinter.

llvm-svn: 80575
2009-08-31 08:08:38 +00:00
Daniel Dunbar
be245a258c llvm-mc: Make MCSymbolData symbol member const.
llvm-svn: 80573
2009-08-31 08:08:06 +00:00