Chris Lattner
518b037620
completely eliminate the MOV16r0 'instruction'. The only
...
interesting part of this is the divrem changes, which are
already tested by CodeGen/X86/divrem.ll.
llvm-svn: 91975
2009-12-23 01:45:04 +00:00
Dan Gohman
312971513f
Fix a thinko that caused spurious @GOTOFFs.
...
llvm-svn: 89509
2009-11-20 23:30:32 +00:00
Dan Gohman
7a6611793f
Target-independent support for TargetFlags on BlockAddress operands,
...
and support for blockaddresses in x86-32 PIC mode.
llvm-svn: 89506
2009-11-20 23:18:13 +00:00
Chris Lattner
d82510e109
add some missing #includes
...
llvm-svn: 86367
2009-11-07 09:20:54 +00:00
Dan Gohman
ee8afcc59d
Factor out the printing of the leading tab into printInlineAsm.
...
llvm-svn: 86199
2009-11-06 00:04:54 +00:00
Jakob Stoklund Olesen
c7cfc94bcc
Print out an informative comment for KILL instructions.
...
The KILL pseudo-instruction may survive to the asm printer pass, just like the IMPLICIT_DEF. Print the KILL as a comment instead of just leaving a blank line in the output.
With -asm-verbose=0, a blank line is printed, like IMPLICIT?DEF.
llvm-svn: 86041
2009-11-04 19:24:37 +00:00
Dan Gohman
f7c4299312
Initial x86 support for BlockAddresses.
...
llvm-svn: 85557
2009-10-30 01:28:02 +00:00
Chris Lattner
0b4a59fc07
X86 should ignore implicit regs when lowering to MCInst also,
...
no functionality change.
llvm-svn: 84567
2009-10-19 23:35:57 +00:00
Chris Lattner
d99b6974b9
simplify by using the twine form of GetOrCreateSymbol
...
llvm-svn: 84565
2009-10-19 23:05:23 +00:00
Chris Lattner
f264f8a21c
revert r84540, fixing build breakage I didn't see because of
...
broken makefile deps :(
llvm-svn: 84544
2009-10-19 21:59:25 +00:00
Chris Lattner
e3796a0fee
pass mangler in as a reference instead of a pointer.
...
llvm-svn: 84540
2009-10-19 21:45:31 +00:00
Jakob Stoklund Olesen
dc9efe8078
Introduce the TargetInstrInfo::KILL machine instruction and get rid of the
...
unused DECLARE instruction.
KILL is not yet used anywhere, it will replace TargetInstrInfo::IMPLICIT_DEF
in the places where IMPLICIT_DEF is just used to alter liveness of physical
registers.
llvm-svn: 83006
2009-09-28 20:32:26 +00:00
Chris Lattner
5159bbaf9e
rename X86ATTAsmPrinter.cpp -> X86AsmPrinter.cpp likewise the .h file.
...
llvm-svn: 82394
2009-09-20 07:41:30 +00:00
Chris Lattner
288a95da0c
rename X86ATTAsmPrinter class -> X86AsmPrinter
...
llvm-svn: 82391
2009-09-20 07:35:34 +00:00
Chris Lattner
17ec6b11d2
split random COFF asmprinter state out to X86COFFMachineModuleInfo.h.
...
Make dllexport directives come out in determinstic order.
llvm-svn: 82381
2009-09-20 06:45:52 +00:00
Chris Lattner
05f4039763
move FnStubs/GVSTubs/HiddenGVStub handling out of the X86 asmprinter
...
and use MachineModuleInfoMachO instead.
llvm-svn: 82022
2009-09-16 06:25:03 +00:00
Chris Lattner
1cbd3ded33
split MCInst printing out of the X86ATTInstPrinter
...
class into its own X86ATTInstPrinter class. The inst
printer now has just one dependence on the code generator
(TRI).
llvm-svn: 81703
2009-09-13 19:30:11 +00:00
Chris Lattner
43f119c3da
delete the fixme too! :)
...
llvm-svn: 81689
2009-09-13 18:50:22 +00:00
Chris Lattner
033d31165d
merge the linux cpool/jtbl pic tests into pic.ll and convert to filecheck.
...
Change the picbase symbol on non-darwin systems from ".Lllvm$4.$piclabel" to
".L4$pb". The actual name doesn't matter and the darwin name is shorter.
llvm-svn: 81688
2009-09-13 18:46:37 +00:00
Chris Lattner
a602bebb61
devirtualize AsmPrinter::printBasicBlockLabel since it is never overridden.
...
Move GetMBBSymbol up to AsmPrinter and make printBasicBlockLabel use it so that
we only have one place that decides what to name bb labels. Hopefully various
clients of printBasicBlockLabel can start using GetMBBSymbol instead.
llvm-svn: 81652
2009-09-12 23:02:08 +00:00
Chris Lattner
a1378f3d89
factor MBB label lowering better
...
llvm-svn: 81630
2009-09-12 21:06:08 +00:00
Chris Lattner
6ccf7ed4be
X86MCInstLower::Lower should only not emit anything to OutStreamer,
...
this means that it can only lower one MachineInstr to one MCInst. To
make this fly, we need to pull out handling of MO_GOT_ABSOLUTE_ADDRESS
(which generates an implicit label) out of X86MCInstLower.
llvm-svn: 81629
2009-09-12 21:01:20 +00:00
Chris Lattner
5090e6c4a7
eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
...
MBB labels like everything else.
llvm-svn: 81628
2009-09-12 20:45:03 +00:00
Chris Lattner
3172208823
split MachineInstr -> MCInst lowering into its own class (not
...
being embedded into X86ATTAsmPrinter). This still depends heavily
on X86ATTAsmPrinter, but this is a step in the right direction.
llvm-svn: 81627
2009-09-12 20:34:57 +00:00
Chris Lattner
42c1287b68
fix another GCC bootstrap problem, which manifested as things
...
like:
foo.s:2412:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb"
llvm-svn: 81596
2009-09-12 01:11:50 +00:00
Chris Lattner
19a9f42f20
switch HiddenGVStubs to be a DenseMap instead of a string map, mirroring FnStubs and GVStubs.
...
llvm-svn: 81514
2009-09-11 07:03:20 +00:00
Chris Lattner
446d589cad
Fix a bug I introduced in FnStubs generation, switch GVStubs to be a
...
densemap instead of StringMap to match FnStubs.
llvm-svn: 81513
2009-09-11 06:59:18 +00:00
Chris Lattner
9a7edd6bba
change FnStubs from being a StringMap<std::string> to being a much
...
more efficient SmallPtrSet<MCSymbol*>. This eliminates string
craziness and fixes CodeGen/X86/darwin-quote.ll with the new asmprinter.
Codegen is producing stubs in a nondeterminstic order, but it was doing
this before anyway.
llvm-svn: 81511
2009-09-11 06:36:33 +00:00
Chris Lattner
30c44c053f
printInstruction() no longer prints a \n after itself, do it
...
for the two instruction MOVPC32r sequence.
llvm-svn: 81509
2009-09-11 05:59:55 +00:00
Chris Lattner
35ed98aaef
reimplement X86ATTAsmPrinter::GetGlobalAddressSymbol in terms of
...
Mangler::getNameWithPrefix. In addition to avoiding some over
quoting, this also is more efficient because it uses smallvector
instead of std::string thrashing.
llvm-svn: 81508
2009-09-11 05:58:44 +00:00
Chris Lattner
1051efc339
convert X86ATTAsmPrinter::GetExternalSymbolSymbol to use SmallString
...
instead of std::string and Mangler.
llvm-svn: 81503
2009-09-11 04:36:43 +00:00
Chris Lattner
482c5df56d
rearrange some code, export a SmallString version of DecorateCygMingName.
...
llvm-svn: 81502
2009-09-11 04:28:13 +00:00
Chris Lattner
321bc99a74
remove DebugLoc from MCInst and eliminate "Comment printing" from
...
the MCInst path of the asmprinter. Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter. This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.
This also fixes an xcore strangeness where it inserted two tabs
before every instruction.
llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Chris Lattner
d9e12345af
add a gross hack to get "SrcLine" comments to show up with the
...
new asmprinter. Differently gross hack coming next.
llvm-svn: 81379
2009-09-09 20:45:42 +00:00
Chris Lattner
716a8c92d0
hoist the call to processDebugLoc out of the generated
...
asm printer into the "printInstruction" routine. This
fixes a problem where the experimental asmprinter would
drop debug labels in some cases, and fixes issues on ppc/xcore
where pseudo instructions like "mr" didn't get debug locs properly.
It is annoying that this moves the call from one place into each
target, but a future set of more invasive refactorings will fix
that problem.
llvm-svn: 81377
2009-09-09 20:34:59 +00:00
Chris Lattner
f2fefedcf8
make sure to send external symbols through the mangler,
...
this fixes mingw-alloca.ll with the new asmprinter.
llvm-svn: 81301
2009-09-09 00:23:32 +00:00
Chris Lattner
c5a95c5aad
add support for @PLT and friends on external symbols, fixes
...
x86-64-pic-11.ll with the new asmprinter.
llvm-svn: 81294
2009-09-09 00:10:14 +00:00
Chris Lattner
adb4545d14
add support for some missing modifiers on jumptable/constant pool entries.
...
llvm-svn: 81199
2009-09-08 06:25:12 +00:00
Chris Lattner
31d1810b16
add a bunch more evil lowering code to work around various :subreg32 modifiers
...
in the .td files. This gets us down to 18 failures in codegen/x86 with the
new asmprinter.
llvm-svn: 81198
2009-09-08 06:19:15 +00:00
Chris Lattner
520a7f9250
ADd support for "lowering" the X86::MOVZX16rr8/X86::MOVZX16rm8
...
subreg32 modifiers.
llvm-svn: 81196
2009-09-08 06:03:07 +00:00
Chris Lattner
8280e58545
add a hack to lower MOV16r0 to MOV32r0 in MCInstLower, eliminating
...
the problem with subreg32 modifiers. This gets all of Olden working
with the new asmprinter.
llvm-svn: 81195
2009-09-08 05:49:25 +00:00
Duncan Sands
8a2aa38c55
Remove unreachable code.
...
llvm-svn: 81126
2009-09-06 19:27:53 +00:00
Duncan Sands
89720bbd11
Remove some not-really-used variables, as warned
...
about by icc (#593 , partial). Patch by Erick Tryzelaar.
llvm-svn: 81115
2009-09-06 12:41:19 +00:00
Chris Lattner
51a0712538
don't call getOffset() on jump tables, this fixes three failing olden benchmarks
...
with the new asmprinter.
llvm-svn: 80906
2009-09-03 07:36:42 +00:00
Chris Lattner
c7b00730ad
Implement support for X86II::MO_GOT_ABSOLUTE_ADDRESS. We get very
...
different formatting from the old asmprinter, but it should be
semantically the same. We used to get:
popl %eax
addl $_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$6.$piclabel], %eax
...
Now we get:
popl %eax
.Lpicbaseref6:
addl $(_GLOBAL_OFFSET_TABLE_ + (.Lpicbaseref6 - .Lllvm$6.$piclabel)), %eax
...
llvm-svn: 80905
2009-09-03 07:30:56 +00:00
Evan Cheng
1b38952c99
Reference to hidden symbols do not have to go through non-lazy pointer in non-pic mode. rdar://7187172.
...
llvm-svn: 80904
2009-09-03 07:04:02 +00:00
Chris Lattner
954b9cd41f
merge globaladdress symbol processing stuff into other stuff. Now
...
all global variable operand flag processing stuff is shared between
different operand types.
llvm-svn: 80886
2009-09-03 05:06:07 +00:00
Chris Lattner
6370d5606c
Split the "operand -> symbol" logic from the "get offset and other munging
...
from operand" logic. GlobalAddress still todo.
llvm-svn: 80884
2009-09-03 04:56:20 +00:00
Chris Lattner
5daf61910e
implement lowering support for constant pool index operands, this gets a bunch more
...
olden programs working.
llvm-svn: 80881
2009-09-03 04:44:53 +00:00
Chris Lattner
620713c5b4
simplify this by using SmallString::str(), much nicer!
...
llvm-svn: 80874
2009-09-03 03:54:02 +00:00