Daniel Dunbar
742376cfaa
MC: Fix some stray hunks I didn't intend to commit.
...
llvm-svn: 107428
2010-07-01 20:48:51 +00:00
Daniel Dunbar
37b4089fbf
MC: Pass the target instance to the AsmParser constructor.
...
llvm-svn: 107426
2010-07-01 20:41:56 +00:00
Daniel Dunbar
769d88aa45
MC: Fix an error message.
...
llvm-svn: 107424
2010-07-01 20:20:01 +00:00
Daniel Dunbar
cc754e66c6
MC: Move COFF enumeration constants to llvm/Support/COFF.h, patch by Michael
...
Spencer!
llvm-svn: 107418
2010-07-01 20:07:24 +00:00
Bill Wendling
59ef9bcc6d
Revert r107205 and r107207.
...
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Bill Wendling
05a4c0b1f2
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".
llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Duncan Sands
84321cc550
The variable ValueSize is set to 1 on both code paths, and then
...
ignored! Remove it.
llvm-svn: 107138
2010-06-29 13:30:08 +00:00
Duncan Sands
5446bab8a5
The variable "Value" is carefully set to Layout.getSymbolAddress,
...
but then not actually used - maybe a bug? Remove the variable.
llvm-svn: 107137
2010-06-29 13:26:33 +00:00
Duncan Sands
78f0758143
Remove unused calls to Lexer.getLoc and the pointless variable HasFillExpr.
...
llvm-svn: 107136
2010-06-29 13:24:40 +00:00
Kevin Enderby
aaad4f57f0
Added the darwin .secure_log_unique and .secure_log_reset directives.
...
llvm-svn: 107077
2010-06-28 21:45:58 +00:00
Eric Christopher
0c4230b33c
Get the addend correct for i386 pic.
...
Thanks Daniel!
llvm-svn: 106608
2010-06-22 23:51:47 +00:00
Chris Lattner
dbea6d7acb
"This is just a cosmetic change in MCAsmStreamer.cpp/EmitSymbolAttribute: all attributes have now a \t before and after, as done for '.type'.
...
This makes the output look consistent, as well as help some third party assemblers expecting the attributes to be in the second column."
Patch by Arnaud de Grandmaison!
llvm-svn: 106469
2010-06-21 20:35:01 +00:00
Eric Christopher
b92292eb08
Update comment.
...
llvm-svn: 106191
2010-06-17 00:49:46 +00:00
Eric Christopher
9c56c0a851
In progress on 32-bit addends.
...
llvm-svn: 106154
2010-06-16 21:32:38 +00:00
Daniel Dunbar
15c2792d21
MC/Mach-O: Rewrite atom association to be a final pass we do in Finish(), instead of tracking as part of emission.
...
- This allows sharing more code with the MCObjectStreamer.
llvm-svn: 106143
2010-06-16 20:04:32 +00:00
Daniel Dunbar
2c6d6693e2
MC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.
...
llvm-svn: 106142
2010-06-16 20:04:29 +00:00
Daniel Dunbar
7631ddfec4
MC: Lift SwitchSection() and Finish() into MCObjectStreamer.
...
llvm-svn: 106141
2010-06-16 20:04:25 +00:00
Daniel Dunbar
d52ca1c3e5
MC: Factor out an MCObjectStreamer class, which will be shared by the concrete
...
object file format writers.
llvm-svn: 106140
2010-06-16 20:04:22 +00:00
Eric Christopher
62a7f68562
Fix indentation.
...
llvm-svn: 106072
2010-06-16 00:26:36 +00:00
Eric Christopher
6c154dc98d
Some more work on mach-o TLV relocations.
...
llvm-svn: 106062
2010-06-15 22:59:05 +00:00
Dan Gohman
940f8f3947
Don't call flush() at a library level which isn't checking for errors
...
and doesn't know where the output is going.
llvm-svn: 105274
2010-06-01 16:31:34 +00:00
Eric Christopher
405e56fdfb
Rearrange conditionals so we don't get caught with the correct type as wrong.
...
llvm-svn: 104793
2010-05-27 00:52:31 +00:00
Daniel Dunbar
c53aec29c9
MC: When running with -mc-relax-all, we can eagerly relax instructions and avoid creating unnecessary MCInstFragments.
...
llvm-svn: 104736
2010-05-26 20:37:03 +00:00
Daniel Dunbar
46774d4abc
MC/Mach-O: Factor out EmitInstTo{Fragment,Data} for emitting MCInst's as MCInstFragments or appending onto an MCDataFragment.
...
llvm-svn: 104735
2010-05-26 20:37:00 +00:00
Daniel Dunbar
1b8e1aafae
MC: Change RelaxInstruction to only take the input and output instructions.
...
llvm-svn: 104713
2010-05-26 18:15:06 +00:00
Daniel Dunbar
7ab1807888
MC: Eliminate an unnecessary copy.
...
llvm-svn: 104709
2010-05-26 17:50:16 +00:00
Daniel Dunbar
77240e2337
MC: Simplify MayNeedRelaxation to not provide the fixups, so we can query it
...
before encoding.
llvm-svn: 104707
2010-05-26 17:45:29 +00:00
Daniel Dunbar
87dcbd1ee5
MC: Eliminate MCAsmFixup, replace with MCFixup.
...
llvm-svn: 104699
2010-05-26 15:18:56 +00:00
Daniel Dunbar
55c1bf55fe
MC: Use accessors for access to MCAsmFixup.
...
llvm-svn: 104697
2010-05-26 15:18:31 +00:00
Daniel Dunbar
f50c283a31
MC: Change MCInst::dump_pretty to not include a trailing newline.
...
llvm-svn: 104696
2010-05-26 15:18:13 +00:00
Daniel Dunbar
a06aa279f4
MC: Eliminate MCFragment vtable, which was unnecessary.
...
llvm-svn: 104689
2010-05-26 06:50:57 +00:00
Eric Christopher
371732bd2a
Start adding mach-o tls reloc support.
...
llvm-svn: 104651
2010-05-26 00:02:12 +00:00
Daniel Dunbar
5bef2f5031
llvm-mc: Use EmitIntValue where possible, which makes the API calls from the AsmParser and CodeGen line up better.
...
llvm-svn: 104467
2010-05-23 18:36:38 +00:00
Daniel Dunbar
e87e067d2c
llvm-mc: Use AddBlankLine in asm parser. This makes transliteration match the input much more closely, and also makes the API calls from the AsmParser and CodeGen line up better.
...
llvm-svn: 104466
2010-05-23 18:36:34 +00:00
Daniel Dunbar
eb23d9ac22
MC: Add an MCLoggingStreamer, for use in debugging integrated-as mismatches.
...
llvm-svn: 104463
2010-05-23 17:44:06 +00:00
Eric Christopher
d250f449cb
Expand on comment.
...
llvm-svn: 104396
2010-05-21 23:03:53 +00:00
Eric Christopher
5fc9256574
Fix section attribute name.
...
llvm-svn: 104381
2010-05-21 21:08:52 +00:00
Matt Fleming
0ca99c0262
Add support for parsing the ELF .type assembler directive.
...
llvm-svn: 104316
2010-05-21 11:36:59 +00:00
Matt Fleming
eb6f789e6f
Grammar fix. This is a test commit.
...
llvm-svn: 104264
2010-05-20 19:45:09 +00:00
Benjamin Kramer
47bf53a5dd
Reduce string trashing.
...
llvm-svn: 104223
2010-05-20 14:14:22 +00:00
Eric Christopher
1a7bc06b28
Partial code for emitting thread local bss data.
...
llvm-svn: 104197
2010-05-20 00:49:07 +00:00
Chris Lattner
aedd148163
fix rdar://7986634 - match instruction opcodes case insensitively.
...
llvm-svn: 104183
2010-05-19 23:34:33 +00:00
Eric Christopher
3f0aa8bf21
Implement EmitTBSSSymbol for MachOStreamer.
...
Fixes build failure as well.
llvm-svn: 104059
2010-05-18 21:26:41 +00:00
Eric Christopher
4a9013f115
Make EmitTBSSSymbol take a section argument so that we can find it later.
...
Fix up callers and users.
llvm-svn: 104057
2010-05-18 21:16:04 +00:00
Kevin Enderby
cd585da505
Incorporate Daniel's suggestion and use !isdigit(CurPtr[0]) and not
...
CurPtr[0] == '\n' when testing the character after a "0b" when looking
to see if it part of a something like "jmp 0b".
llvm-svn: 104039
2010-05-18 18:09:20 +00:00
Kevin Enderby
438a36f66a
Fixed the problem with a branch to "0b" that was not parsed by llvm-mc
...
correctly. The Lexer was incorrectly eating the newline casusing it to branch
to address 0. Updated the test case to use a "0:" label and a branch to "0b".
llvm-svn: 104038
2010-05-18 17:51:35 +00:00
Daniel Dunbar
739e720a21
MC/Mach-O: Implement support for setting indirect symbol table offset in section header.
...
Also, create symbol data for LHS of assignment, to match 'as' symbol ordering better.
llvm-svn: 104033
2010-05-18 17:28:24 +00:00
Daniel Dunbar
9a1bbd9dc5
MC/Mach-O: Remove some FIXMEs.
...
llvm-svn: 104032
2010-05-18 17:28:20 +00:00
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
Benjamin Kramer
ad350eb789
Simplify MCContext::(Next|Get)Instance
...
- Allocate MCLabels in the context so they don't leak.
- Avoid duplicated densemap lookup.
llvm-svn: 104020
2010-05-18 12:15:34 +00:00