Commit Graph

32117 Commits

Author SHA1 Message Date
Chris Lattner 6d31b43592 Give MCInstPrinter a MCAsmInfo member, make X86ATTInstPrinter
be a MCInstPrinter.

llvm-svn: 81746
2009-09-14 01:49:26 +00:00
Chris Lattner de57d8e72b add a new MCInstPrinter class, move the (trivial) MCDisassmbler ctor inline.
llvm-svn: 81745
2009-09-14 01:43:38 +00:00
Chris Lattner aa398f5d23 tidy up a bit.
llvm-svn: 81744
2009-09-14 01:34:40 +00:00
Nick Lewycky c9f9367785 Don't leak! Always remove oneself as a listener after adding oneself.
llvm-svn: 81736
2009-09-14 00:36:52 +00:00
Nick Lewycky 64f18eceaf Actually remove old types from the set.
Also break the type verification stuff into its own TypeSet to keep the
Verifier pass from becoming an AbstractTypeUser.

llvm-svn: 81729
2009-09-13 23:45:39 +00:00
Chris Lattner 0bad631cde kill off the last use of TRI::AsmName.
llvm-svn: 81727
2009-09-13 22:42:03 +00:00
Chris Lattner a3e68b567c add some special case handling for strangely named x86 registers.
llvm-svn: 81726
2009-09-13 22:41:48 +00:00
Chris Lattner a4760f3642 'printMCInst' doesn't print newlines after instructions anymore.
llvm-svn: 81723
2009-09-13 22:24:34 +00:00
Daniel Dunbar 51e72707b7 Remove unused variables.
llvm-svn: 81718
2009-09-13 21:31:07 +00:00
Nick Lewycky 6133026331 Storing a set of PATypeHolders is a bad idea because their sort order will
change as types are refined. Remove abstract types from CheckedTypes when they
we're informed that they have been refined. The only way types get refined in
the verifier is when later function passes start optimizing. Fixes PR4970.

llvm-svn: 81716
2009-09-13 21:07:59 +00:00
Chris Lattner eb2cc68254 remove all but one reference to TargetRegisterDesc::AsmName.
llvm-svn: 81714
2009-09-13 20:31:40 +00:00
Chris Lattner ad10b3be3e 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 56950c6b97 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 06c5eed9e9 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 6822e695c1 eliminate an extraneous use of TRI::getAsmName in a comment.
llvm-svn: 81705
2009-09-13 19:48:37 +00:00
Chris Lattner 6ceb0faafd 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 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 159db96ae1 reduce indentation with early exit.
llvm-svn: 81699
2009-09-13 19:10:08 +00:00
Chris Lattner d940dd5801 remove MAI::JumpTableSpecialLabelPrefix now that MAI
has real information about linker private linkage.

llvm-svn: 81695
2009-09-13 19:02:16 +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 1c815bef6a make X86ATTAsmPrinter::PrintPICBaseSymbol forward to X86MCInstLower.
llvm-svn: 81685
2009-09-13 18:33:59 +00:00
Chris Lattner 1d04aa78f3 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 de79e4fc2e fix MCSymbol printing on darwin to exactly match the mangler (handling of \n and " in a symbol name).
llvm-svn: 81683
2009-09-13 18:11:09 +00:00
Chris Lattner 3d6c8ebb58 Make the MC symbol printer and llvm::Mangler exactly agree on mangling
for systems that don't support quoting (PR4966).

llvm-svn: 81682
2009-09-13 18:04:46 +00:00
Chris Lattner 4cd449813a convert some uses of printBasicBlockLabel to use GetMBBSymbol
instead.

llvm-svn: 81677
2009-09-13 17:14:04 +00:00
Anton Korobeynikov 6b9b8c1471 Fix merge problem
llvm-svn: 81658
2009-09-13 01:12:15 +00:00
Anton Korobeynikov 6c89da7027 Define proper subreg sets for arm - this should fix bunch of subtle problems
with subreg - superreg mapping and also fix PR4965.

llvm-svn: 81657
2009-09-13 00:59:43 +00:00
Daniel Dunbar a22637897a Experimental fix for PR4960.
- Could we just always implement this as __clear_cache for __GNUC__?

llvm-svn: 81655
2009-09-12 23:29:02 +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
Dan Gohman 648c836f6c Remove unnecessary #include.
llvm-svn: 81636
2009-09-12 22:24:25 +00:00
Anton Korobeynikov 8d0fbebb9f Add QPR_VFP2 regclass and add copy_to_regclass nodes, where needed to
constraint the register usage.

llvm-svn: 81635
2009-09-12 22:21:08 +00:00
Dan Gohman f436e87813 Preserve the inbounds flag, so that the constant folder doesn't
recompute it.

llvm-svn: 81634
2009-09-12 22:02:17 +00:00
Dan Gohman 07b5c40ed8 Fix the build when DEBUG_SYMBOL_TABLE is set.
llvm-svn: 81633
2009-09-12 21:56:48 +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 a3f2662a24 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
Lang Hames dad2da59ad Moved some more index operations over to LiveIntervals.
llvm-svn: 81605
2009-09-12 03:34:03 +00:00
Sean Callanan 57dba6768e Added the WAIT instruction to the Intel tables,
for the purposes of the disassembler.

llvm-svn: 81603
2009-09-12 02:52:41 +00:00
Sean Callanan 29849eadef Added CMPS (string comparison) instructions for all
operand widths to the Intel instruction tables, for
the purposes of the disassembler.

llvm-svn: 81601
2009-09-12 02:25:20 +00:00
Evan Cheng 760c92a5be Remove -new-coalescer-heuristic. It's not useful.
llvm-svn: 81600
2009-09-12 02:14:41 +00:00
Evan Cheng fe4d1e64d5 80 col violations.
llvm-svn: 81598
2009-09-12 02:01:07 +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 37a4e48529 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
Sean Callanan 4dc00d3781 Added SCAS instructions in their 8, 16, 32, and
64-bit variants for the disassembler.

llvm-svn: 81591
2009-09-12 00:37:19 +00:00
Daniel Dunbar b918900995 Fix -Asserts warning.
llvm-svn: 81580
2009-09-11 22:07:31 +00:00
Ted Kremenek c74e09f654 Update CMake files.
llvm-svn: 81577
2009-09-11 21:49:45 +00:00
Dan Gohman e592923603 Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn't
working. To support this, add an is_displayed() function to raw_ostream,
and generalize Process::StandardOutIsDisplayed and friends in order to
support it.

Also, call RemoveFileOnSignal before creating a file instead of after, so
that the file isn't left behind if the program is interrupted between when
the file is created and RemoveFileOnSignal is called.

While here, add a -S to llvm-extract and port it to IRReader so that it
supports assembly input.

llvm-svn: 81568
2009-09-11 20:46:33 +00:00