Anton Korobeynikov
7d6c12de5b
Dllexport stuff cleanup:
...
1. Emit external function type information for all COFF targets since it's
a feature of object format
2. Emit linker directives only for cygming (since this is ld-specific stuff)
llvm-svn: 84214
2009-10-15 22:36:18 +00:00
Ted Kremenek
1f746d5df3
Update CMake file (lexically order files).
...
llvm-svn: 84008
2009-10-13 18:57:27 +00:00
Dan Gohman
a803c712dd
Instead of printing unnecessary basic block labels as labels in
...
verbose-asm mode, print comments instead. This eliminates a non-comment
difference between verbose-asm mode and non-verbose-asm mode.
Also, factor out the relevant code out of all the targets and into
target-independent code.
llvm-svn: 83392
2009-10-06 17:38:38 +00:00
Devang Patel
a8f35ac640
Update processDebugLoc() so that it can be used to process debug info before and after printing an instruction.
...
llvm-svn: 83363
2009-10-06 02:19:11 +00:00
Devang Patel
e097bf49d0
Use MachineInstr as an processDebugLoc() argument.
...
This will allow processDebugLoc() to handle scopes for DWARF debug info.
llvm-svn: 83183
2009-09-30 23:12:50 +00:00
Jakob Stoklund Olesen
31fcbdefbb
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
6f702ad1be
unconditionally request MMI
...
llvm-svn: 82716
2009-09-24 21:45:57 +00:00
Chris Lattner
3cd0d66e5f
remove a temporary hack.
...
llvm-svn: 82395
2009-09-20 07:47:59 +00:00
Chris Lattner
64f72086ad
rename X86ATTAsmPrinter.cpp -> X86AsmPrinter.cpp likewise the .h file.
...
llvm-svn: 82394
2009-09-20 07:41:30 +00:00
Chris Lattner
9f43a427c6
move target registry stuff to X86ATTAsmPrinter.cpp
...
llvm-svn: 82393
2009-09-20 07:39:06 +00:00
Chris Lattner
a07073da96
simplify this now that createX86CodePrinterPass is trivial
...
llvm-svn: 82392
2009-09-20 07:37:51 +00:00
Chris Lattner
271256b7a8
rename X86ATTAsmPrinter class -> X86AsmPrinter
...
llvm-svn: 82391
2009-09-20 07:35:34 +00:00
Chris Lattner
d56be552eb
kill off printPICLabel now, it's specialness is handled by
...
the MachineInstr ->MCInst lowering process, not in the
asmprinter.
llvm-svn: 82388
2009-09-20 07:28:26 +00:00
Chris Lattner
efc89d59f7
delete X86IntelAsmPrinter! Now -x86-asm-syntax just switches
...
the instruction syntax, not the entire asmprinter.
llvm-svn: 82387
2009-09-20 07:25:17 +00:00
Chris Lattner
f411f53f9c
Add an intel syntax MCInstPrinter implementation. You can now
...
transcode from AT&T to intel syntax with "llvm-mc foo.s -output-asm-variant=1"
llvm-svn: 82385
2009-09-20 07:17:49 +00:00
Chris Lattner
0076b1c63f
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
Shantonu Sen
eedff40e25
Fix cmake build, which has a different -I that
...
causes the "../foo" to not find the file
llvm-svn: 82270
2009-09-18 20:35:59 +00:00
Chris Lattner
60739d60bf
Make a new X8632_MachoTargetObjectFile TLOF implementation whose
...
getSymbolForDwarfGlobalReference is smart enough to know that it
needs to register the stub it references with MachineModuleInfoMachO,
so that it gets emitted at the end of the file.
Move stub emission from X86ATTAsmPrinter::doFinalization to the
new X86ATTAsmPrinter::EmitEndOfAsmFile asmprinter hook. The important
thing here is that EmitEndOfAsmFile is called *after* the ehframes are
emitted, so we get all the stubs.
This allows us to remove a gross hack from the asmprinter where it would
"just know" that it needed to output stubs for personality functions.
Now this is all driven from a consistent interface.
The testcase change is just reordering the expected output now that the
stubs come out after the ehframe instead of before.
This also unblocks other changes that Bill wants to make.
llvm-svn: 82269
2009-09-18 20:22:52 +00:00
Chris Lattner
b2ccd100fc
This file can need access to the X86 instruction enums when the table exceeds 32-bits.
...
llvm-svn: 82235
2009-09-18 18:08:55 +00:00
Chris Lattner
f91260f6cf
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
481a417960
revert a hunk of r82018 that wasn't supposed to go in yet.
...
llvm-svn: 82020
2009-09-16 06:04:53 +00:00
Chris Lattner
4452afa6d8
add a new MachineModuleInfoMachO class, which is the per-module
...
stuff common across all macho targets.
llvm-svn: 82018
2009-09-16 06:03:48 +00:00
Chris Lattner
bc8d86ec5a
tidy up
...
llvm-svn: 82011
2009-09-16 05:25:43 +00:00
Chris Lattner
e6bd7b39eb
rearrange X86ATTAsmPrinter::doFinalization, making a scan of
...
the global variable list only happen for COFF targets.
llvm-svn: 82010
2009-09-16 05:20:33 +00:00
Chris Lattner
0a6f37ec43
remove the AsmPrinter::printMCInst hook hack now that
...
we have MCInstPrinter.
llvm-svn: 82006
2009-09-16 04:57:15 +00:00
Chris Lattner
4a33f01892
Change MCAsmStreamer to take an MCInstPrinter instead of a
...
full AsmPrinter, and change TargetRegistry to keep track
of registered MCInstPrinters.
llvm-mc is still linking in the entire
target foo to get the code emitter stuff, but this is an
important step in the right direction.
llvm-svn: 81754
2009-09-14 03:02:37 +00:00
Chris Lattner
a00e070ea0
Give MCInstPrinter a MCAsmInfo member, make X86ATTInstPrinter
...
be a MCInstPrinter.
llvm-svn: 81746
2009-09-14 01:49:26 +00:00
Chris Lattner
8da6598a75
tidy up a bit.
...
llvm-svn: 81744
2009-09-14 01:34:40 +00:00
Chris Lattner
334aa7a1d4
remove all but one reference to TargetRegisterDesc::AsmName.
...
llvm-svn: 81714
2009-09-13 20:31:40 +00:00
Chris Lattner
20b7392123
the tblgen produced 'getRegisterName' method does not access
...
the object, make it static instead of const.
llvm-svn: 81711
2009-09-13 20:19:22 +00:00
Chris Lattner
31c7141542
switch the x86 asmprinters to use getRegisterName instead
...
of getting it from TRI, inst printing now is codegen context
free!
llvm-svn: 81710
2009-09-13 20:15:16 +00:00
Chris Lattner
0cde5283e3
make tblgen produce a function that returns the name for a physreg.
...
Nothing is using this info yet.
llvm-svn: 81707
2009-09-13 20:08:00 +00:00
Chris Lattner
fb0e41caef
make intel asmprinter use TRI::getAsmName instead of TRI::getName like
...
all the other targets. Add support for weak/linkonce linkage so it doesn't
crash on basically all nontrivial testcases.
llvm-svn: 81704
2009-09-13 19:44:38 +00:00
Chris Lattner
96e22d6462
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
57dbcc4388
reduce indentation with early exit.
...
llvm-svn: 81699
2009-09-13 19:10:08 +00:00
Chris Lattner
a0dbce2e0e
delete the fixme too! :)
...
llvm-svn: 81689
2009-09-13 18:50:22 +00:00
Chris Lattner
dfc3079a9e
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
9e536003ba
make X86ATTAsmPrinter::PrintPICBaseSymbol forward to X86MCInstLower.
...
llvm-svn: 81685
2009-09-13 18:33:59 +00:00
Chris Lattner
cbcbedf254
replace printBasicBlockLabel with EmitBasicBlockStart,
...
now that printBasicBlockLabel is only used for starting
a MBB. This allows elimination of a bunch of arguments.
llvm-svn: 81684
2009-09-13 18:25:37 +00:00
Chris Lattner
de1324146e
convert some uses of printBasicBlockLabel to use GetMBBSymbol
...
instead.
llvm-svn: 81677
2009-09-13 17:14:04 +00:00
Chris Lattner
ff9d0f20fa
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
3d47ac7330
factor MBB label lowering better
...
llvm-svn: 81630
2009-09-12 21:06:08 +00:00
Chris Lattner
b2fdae122a
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
53cca8590c
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
fb113da948
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
fe33b51da0
remove the "old" at&t style asmprinter. Unfortunately, most of the
...
operand printing crapola cannot be removed yet because it is used by
the inline asm print stuff.
llvm-svn: 81626
2009-09-12 20:01:36 +00:00
Chris Lattner
6a552d18b5
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
1ac6dc75be
fix an embarassing typo that resulted in llvm-gcc bootstrap miscompare
...
because the sorting wasn't sorting.
llvm-svn: 81592
2009-09-12 00:49:00 +00:00
Ted Kremenek
e98d47cdfe
Update CMake files.
...
llvm-svn: 81577
2009-09-11 21:49:45 +00:00
Chris Lattner
4f048e3a67
fix pasto
...
llvm-svn: 81544
2009-09-11 18:33:44 +00:00