Commit Graph

95624 Commits

Author SHA1 Message Date
Chris Lattner 9e7d8c0313 correct the fixup comment printer to work on big endian platforms.
llvm-svn: 119122
2010-11-15 05:56:19 +00:00
Chris Lattner d6a07ccd10 add proper encoding for MTCRF instead of using a hack.
llvm-svn: 119121
2010-11-15 05:19:25 +00:00
Chris Lattner 63274cbc5d add fields to the .td files unconditionally, simplifying tblgen a bit.
Switch the ARM backend to use 'let' instead of 'set' with this change.

llvm-svn: 119120
2010-11-15 05:19:05 +00:00
Chris Lattner 85854eb4d9 remove a pointless testcase.
llvm-svn: 119119
2010-11-15 05:07:03 +00:00
Chris Lattner c877d8f44c add basic encoding support for immediates and registers, allowing us
to encode all of these instructions correctly (for example):

        mflr r0                         ; encoding: [0x7c,0x08,0x02,0xa6]
        stw r0, 8(r1)                   ; encoding: [0x90,0x01,0x00,0x08]
        stwu r1, -64(r1)                ; encoding: [0x94,0x21,0xff,0xc0]

llvm-svn: 119118
2010-11-15 04:51:55 +00:00
Chris Lattner 0ae07e1484 add a dummy entry to fix a build error
llvm-svn: 119117
2010-11-15 04:47:16 +00:00
Chris Lattner 9ec375c8ea Implement a basic MCCodeEmitter for PPC. This doesn't handle
fixups yet, and doesn't handle actually encoding operand values,
but this is enough for llc -show-mc-encoding to show the base
instruction encoding information, e.g.:

	mflr r0                         ; encoding: [0x7c,0x08,0x02,0xa6]
	stw r0, 8(r1)                   ; encoding: [0x90,0x00,0x00,0x00]
	stwu r1, -64(r1)                ; encoding: [0x94,0x00,0x00,0x00]
Ltmp0:
	lhz r4, 4(r3)                   ; encoding: [0xa0,0x00,0x00,0x00]
	cmplwi cr0, r4, 8               ; encoding: [0x28,0x00,0x00,0x00]
	beq cr0, LBB0_2                 ; encoding: [0x40,0x00,0x00,0x00]

llvm-svn: 119116
2010-11-15 04:16:32 +00:00
Chris Lattner 045e04dbfe dissolve some more hacks.
llvm-svn: 119115
2010-11-15 03:53:53 +00:00
Chris Lattner fd56ee2c40 fix some fixme's, removing dead code.
llvm-svn: 119114
2010-11-15 03:51:13 +00:00
Chris Lattner aa4d03d1f5 remove asmstrings (which can never be printed) from pseudo
instructions, allowing is to eliminate some dead operand 
printing methods from the instprinter.

llvm-svn: 119113
2010-11-15 03:48:58 +00:00
Chris Lattner 8bcfdab194 strength reduce TOC temp label generation, no functionality change.
llvm-svn: 119112
2010-11-15 03:42:54 +00:00
Chris Lattner 510c66f549 rip out a ton of old instruction printing junk now that the
new instprinting logic is there.

llvm-svn: 119111
2010-11-15 03:39:06 +00:00
Michael J. Spencer f4a6a14c93 Object: Add missing makefile.
llvm-svn: 119110
2010-11-15 03:33:14 +00:00
Evan Cheng dd96e97317 Make sure ARM multi load / store pass copies memoperands when forming ldrd / strd. pr8113.
llvm-svn: 119109
2010-11-15 03:30:30 +00:00
Chris Lattner d7c2fc7a73 Turn on the new instprinter by default.
The only change in the output is:

1) we get a better comment on mfcr, we get:
	mfcr r2                         ; cr2
  instead of:
 	mfcr r2 ; 32

2) we no longer emit $stub's on powerpc/leopard.  The Leopard
   linker autosynthesizes them.

llvm-svn: 119108
2010-11-15 03:27:05 +00:00
Michael J. Spencer fe5ee80268 Add LLVMObject Library.
llvm-svn: 119107
2010-11-15 03:21:41 +00:00
Chris Lattner dd6df84900 convert the operand bits into bitfields since they are all combinable in
different ways.  Add $non_lazy_ptr support, and proper lowering for
global values.

Now all the ppc regression tests pass with the new instruction printer.

llvm-svn: 119106
2010-11-15 03:13:19 +00:00
Chris Lattner edb9d84dcc add targetoperand flags for jump tables, constant pool and block address
nodes to indicate when ha16/lo16 modifiers should be used.  This lets
us pass PowerPC/indirectbr.ll.

The one annoying thing about this patch is that the MCSymbolExpr isn't
expressive enough to represent ha16(label1-label2) which we need on
PowerPC.  I have a terrible hack in the meantime, but this will have
to be revisited at some point.

Last major conversion item left is global variable references.

llvm-svn: 119105
2010-11-15 02:46:57 +00:00
Chris Lattner e75bb34963 remove some extraneous quotes to make the new instprinter match.
llvm-svn: 119104
2010-11-15 02:43:46 +00:00
Greg Clayton cb7e3b3505 Added quotes around names that are being lookup up or inspected in the
expression logging.

Added some properties to the "objc" test. The expression parser can currently
display properties that are backed by the default functions "expr myStr.string"
will work. But it won't currently work when the property is backed by a 
different function such as "expr myStr.date".

llvm-svn: 119103
2010-11-15 01:47:11 +00:00
Chris Lattner 3ddef1ac36 silence a ton of warnings from clang.
llvm-svn: 119102
2010-11-15 01:45:44 +00:00
Greg Clayton 471da24dfa Added recursive name lookup logging with depth which is commented out and is currently only enabled when we blow the stack.
llvm-svn: 119101
2010-11-15 01:34:18 +00:00
Greg Clayton ce5c9a8f31 Added the address of operator for the "frame variable" command.
llvm-svn: 119100
2010-11-15 01:32:26 +00:00
Chandler Carruth 03ac1b09d1 Switch the sysroot logic to use the Path interface, resolving a FIXME and
making the code less gross.

llvm-svn: 119099
2010-11-15 00:48:13 +00:00
Anton Korobeynikov 51d2e9ca29 Attempt to unbreak cmake-based builds
llvm-svn: 119098
2010-11-15 00:48:12 +00:00
Anton Korobeynikov f7183edb59 First step of huge frame-related refactoring: move emit{Prologue,Epilogue} out of TargetRegisterInfo to TargetFrameInfo, which is definitely much better suitable place
llvm-svn: 119097
2010-11-15 00:06:54 +00:00
Anton Korobeynikov a5ab8f10e4 Whitespace cleanup
llvm-svn: 119096
2010-11-15 00:06:05 +00:00
Chandler Carruth c4d6fd5b03 Make sysroot only apply to baked in paths which start with a '/'.
llvm-svn: 119095
2010-11-15 00:05:18 +00:00
Rafael Espindola 240028d11d Move the logic to decide with which symbol we produce a relocation (if any) to
a central location. This also makes us a bit more compatible with gas.

llvm-svn: 119094
2010-11-14 23:53:26 +00:00
Chris Lattner df8e17d80b implement support for the MO_DARWIN_STUB TargetOperand flag,
and have isel apply to to call operands as required.  This allows
us to get $stub suffixes on label references on ppc/tiger with the
new instprinter, fixing two tests.  Only 2 to go.

llvm-svn: 119093
2010-11-14 23:42:06 +00:00
Chris Lattner ea857d357f tidy up, no functionality change.
llvm-svn: 119092
2010-11-14 23:32:42 +00:00
Greg Clayton 5a2c6d583d Fixed the initWithNSString: function to properly initialize self.
llvm-svn: 119091
2010-11-14 23:12:29 +00:00
Chris Lattner b7c67f6c17 with the picbase nonsense starting to be figured out, implement
lowering support for MovePCtoLR[8].  Down to 4 failures again.

llvm-svn: 119090
2010-11-14 22:56:43 +00:00
Chris Lattner 7077efe894 move the pic base symbol stuff up to MachineFunction
since it is trivial and will be shared between ppc and x86.
This substantially simplifies the X86 backend also.

llvm-svn: 119089
2010-11-14 22:48:15 +00:00
Chris Lattner 239f9a35ed simplify getPICBaseSymbol a bit.
llvm-svn: 119088
2010-11-14 22:37:11 +00:00
Chris Lattner 94f0c14cb0 reimplement ppc asmprinter "toc" handling to use a VariantKind
on the operand, required for .o file writing and fixing 
the PowerPC/mult-alt-generic-powerpc64.ll failure with the new
instprinter.

llvm-svn: 119087
2010-11-14 22:22:59 +00:00
Chris Lattner 295097cc32 add some nounwind's.
llvm-svn: 119086
2010-11-14 22:22:14 +00:00
Greg Clayton 83c5cd9dfd Just like functions can have a basename and a mangled/demangled name, variable
can too. So now the lldb_private::Variable class has support for this.

Variables now have support for having a basename ("i"), and a mangled name 
("_ZN12_GLOBAL__N_11iE"), and a demangled name ("(anonymous namespace)::i").

Nowwhen searching for a variable by name, users might enter the fully qualified
name, or just the basename. So new test functions were added to the Variable 
and Mangled classes as:

	bool NameMatches (const ConstString &name);
	bool NameMatches (const RegularExpression &regex);

I also modified "ClangExpressionDeclMap::FindVariableInScope" to also search
for global variables that are not in the current file scope by first starting
with the current module, then moving on to all modules.

Fixed an issue in the DWARF parser that could cause a varaible to get parsed
more than once. Now, once we have parsed a VariableSP for a DIE, we cache
the result even if a variable wasn't made so we don't do any re-parsing. Some
DW_TAG_variable DIEs don't have locations, or are missing vital info that 
stops a debugger from being able to display anything for it, we parse a NULL
variable shared pointer for these DIEs so we don't keep trying to reparse it.

llvm-svn: 119085
2010-11-14 22:13:40 +00:00
Chris Lattner 2f9f63af0b lower PPC::MFCRpseud when transforming to MC, avoiding calling
the aborting printSpecial() method.  This gets us to 8 failures.

llvm-svn: 119084
2010-11-14 22:03:15 +00:00
Chris Lattner cfb6287487 make the stubbed-out printer methods abort instead of
printing nothing.  This gets us back up to 24 failures.

llvm-svn: 119083
2010-11-14 21:54:34 +00:00
Chris Lattner f2cb69cb04 wire up a few more things, down to 4 test failures, all
about handling $stub, lo/hi etc.

llvm-svn: 119082
2010-11-14 21:51:37 +00:00
Chris Lattner e2d75bf681 properly wire up the instprinter to the ppc64 backend, down to 5 failures.
llvm-svn: 119081
2010-11-14 21:42:53 +00:00
Chris Lattner 219cc3d586 implement pretty printing support for the various pseudo
ops the asmprinter supported, fixing PowerPC/rlwimi2.ll
among others.  Down to 20 failures.

llvm-svn: 119080
2010-11-14 21:39:51 +00:00
Chris Lattner c2ac86e261 Wire up symbol hi/lo printing. We don't print hi()/lo(), but this gets
us further along.  Only 28 failures now.

llvm-svn: 119079
2010-11-14 21:33:07 +00:00
Chris Lattner 3dc9bb245f implement basic support for symbol operand lowering,
and printing support for call operands.  Down to 77 failures.

llvm-svn: 119078
2010-11-14 21:20:46 +00:00
Oscar Fuentes edf0a1d55e Detect presence of AsmPrinter's. Remove some cruft too.
llvm-svn: 119077
2010-11-14 21:17:13 +00:00
Oscar Fuentes 07c99ebf52 Updated CMake library dependencies.
llvm-svn: 119076
2010-11-14 21:17:08 +00:00
Chris Lattner 2aa8becf33 trim #includes.
llvm-svn: 119075
2010-11-14 21:16:04 +00:00
Chris Lattner 5c1b0cdec2 switch PPC to a simplified MCInstLowering model.
llvm-svn: 119074
2010-11-14 21:12:33 +00:00
Rafael Espindola a7d0bed336 Fix another case of a .comm directive without a corresponding .type
directive.

llvm-svn: 119073
2010-11-14 21:11:16 +00:00