Hal Finkel
bfd3d08d18
Rename the PPC target feature gpul to mfocrf.
...
The PPC target feature gpul (IsGigaProcessor) was only used for one thing:
To enable the generation of the MFOCRF instruction. Furthermore, this
instruction is available on other PPC cores outside of the G5 line. This
feature now corresponds to the HasMFOCRF flag.
No functionality change.
llvm-svn: 158323
2012-06-11 19:57:01 +00:00
Hal Finkel
f2b9c38d6f
Add POWER6 and POWER7 CPU types to the PPC backend.
...
No functional change; these will be used by upcoming scheduler enhancements.
llvm-svn: 158313
2012-06-11 15:43:08 +00:00
Hal Finkel
9f9f8929ee
Add instruction itinerary for the PPC64 A2 core.
...
This adds a full itinerary for IBM's PPC64 A2 embedded core. These
cores form the basis for the CPUs in the new IBM BG/Q supercomputer.
llvm-svn: 153842
2012-04-01 19:22:40 +00:00
Craig Topper
b25fda95f6
Reorder includes in Target backends to following coding standards. Remove some superfluous forward declarations.
...
llvm-svn: 152997
2012-03-17 18:46:09 +00:00
Roman Divacky
34d4b9682b
Properly MCize the section switch, removing a FIXME.
...
llvm-svn: 151639
2012-02-28 18:15:25 +00:00
Roman Divacky
8fe40cd659
Reapply r151278 with fixes.
...
MCize function entry label emission on PowerPC64 properly.
llvm-svn: 151547
2012-02-27 20:20:47 +00:00
Hal Finkel
6fd2b434bd
Revert r151278, breaks static linking.
...
Reverting this because it breaks static linking on ppc64. Specifically, it may be linkonce_odr functions that are the problem.
With this patch, if you link statically, calls to some functions end up calling their descriptor addresses instead
of calling to their entry points. This causes the execution to fail with SIGILL (b/c the descriptor address just
has some pointers, not code).
llvm-svn: 151433
2012-02-25 03:40:11 +00:00
Roman Divacky
a2d3608f78
MCize function entry label emission on PowerPC64 properly.
...
llvm-svn: 151278
2012-02-23 20:28:39 +00:00
Hal Finkel
ad4d9f5848
Allow the use of an alternate symbol for calculating a function's size.
...
The standard function epilog includes a .size directive, but ppc64 uses
an alternate local symbol to tag the actual start of each function.
Until recently, binutils accepted the .size directive as:
.size test1, .Ltmp0-test1
however, using this directive with recent binutils will result in the error:
.size expression for XXX does not evaluate to a constant
so we must use the label which actually tags the start of the function.
llvm-svn: 151200
2012-02-22 21:11:47 +00:00
Jia Liu
b22310fda6
Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore.
...
llvm-svn: 150878
2012-02-18 12:03:15 +00:00
Hal Finkel
ac9df3d411
make CR spill and restore 64-bit clean (no functional change), and fix some other problems found with -verify-machineinstrs
...
llvm-svn: 146024
2011-12-07 06:34:06 +00:00
Eli Friedman
c1870b2633
Small fix for assembler generation on Darwin PPC64. Patch by Michael Kostylev. PR11437.
...
llvm-svn: 145553
2011-12-01 01:43:47 +00:00
Devang Patel
2f70bcdb94
Remove unnecessary include.
...
llvm-svn: 144211
2011-11-09 21:11:02 +00:00
Hal Finkel
6fa5697af0
Add PPC 440 scheduler and some associated tests
...
llvm-svn: 142170
2011-10-17 04:03:49 +00:00
Evan Cheng
2bb4035707
Move TargetRegistry and TargetSelect from Target to Support where they belong.
...
These are strictly utilities for registering targets and components.
llvm-svn: 138450
2011-08-24 18:08:43 +00:00
Evan Cheng
1142444565
Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser.
...
llvm-svn: 136027
2011-07-26 00:24:13 +00:00
Evan Cheng
61faa55b74
Separate MCInstPrinter registration from AsmPrinter registration.
...
llvm-svn: 135974
2011-07-25 21:20:24 +00:00
Evan Cheng
ab37af9af3
createMCInstPrinter doesn't need TargetMachine anymore.
...
llvm-svn: 134525
2011-07-06 19:45:42 +00:00
Roman Divacky
4b5665a1f7
Fix emission of PPC64 assembler on non-darwin platforms by splitting
...
VK_PPC_{HA,LO}16 into darwin and gas variants.
Darwin wants {ha,lo}16(symbol) while gnu as wants symbol@{ha,l}.
llvm-svn: 132802
2011-06-09 20:25:38 +00:00
Bill Wendling
00f0cddfd4
We need to pass the TargetMachine object to the InstPrinter if we are printing
...
the alias of an InstAlias instead of the thing being aliased. Because we need to
know the features that are valid for an InstAlias.
This is part of a work-in-progress.
llvm-svn: 127986
2011-03-21 04:13:46 +00:00
Chris Lattner
aac9fa731d
Wire up primitive support in the assembler backend for writing .o files
...
directly on the mac. This is very early, doesn't support relocations and
has a terrible hack to avoid .machine from being printed, but despite
that it generates an bitwise-identical-to-cctools .o file for stuff like
this:
define i32 @test() nounwind { ret i32 42 }
I don't plan to continue pushing this forward, but if anyone else was
interested in doing it, it should be really straight-forward.
llvm-svn: 119136
2010-11-15 08:49:58 +00:00
Chris Lattner
15e9d5ef8a
fix a regression with the new instprinter: we lost the ability to
...
print DBG_VALUE instructions. This should unbreak the llvm-gcc-powerpc-darwin9
buildbot.
llvm-svn: 119132
2010-11-15 07:52:06 +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
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
Chris Lattner
e75bb34963
remove some extraneous quotes to make the new instprinter match.
...
llvm-svn: 119104
2010-11-15 02:43:46 +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
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
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
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
5c1b0cdec2
switch PPC to a simplified MCInstLowering model.
...
llvm-svn: 119074
2010-11-14 21:12:33 +00:00
Chris Lattner
7a5c57ecf4
Implement support for printing register and immediate operands,
...
add support for darwin vs aix syntax. We now can print instructions
like this:
add r3, r3, r4
blr
and (in aix mode):
add 3, 3, 4
blr
llvm-svn: 119062
2010-11-14 20:02:39 +00:00
Chris Lattner
686a095d89
stub out PPCMCInstLowering, add a new option that uses it and the new
...
instprinter when -enable-ppc-inst-printer is passed to llc.
llvm-svn: 119061
2010-11-14 19:53:02 +00:00
Chris Lattner
a76eab433a
stub out a powerpc MCInstPrinter implementation.
...
llvm-svn: 119059
2010-11-14 19:40:38 +00:00
Chris Lattner
56477d1690
move PPCAsmPrinter into the main PPC library, like ARM and X86.
...
llvm-svn: 119054
2010-11-14 18:33:33 +00:00
Anton Korobeynikov
28dc9d0ad9
Factor out asmprinter out of ppc
...
llvm-svn: 54887
2008-08-17 13:54:28 +00:00
Anton Korobeynikov
ed47329174
Handle visibility printing with all generality. Remove bunch of duplicate code.
...
llvm-svn: 54540
2008-08-08 18:25:07 +00:00
Anton Korobeynikov
f1f8aa3e50
Use chars, where possible
...
llvm-svn: 54539
2008-08-08 18:24:10 +00:00
Anton Korobeynikov
c9ad17c3da
Convert PPC/Linux to new section printing stuff
...
llvm-svn: 54538
2008-08-08 18:23:49 +00:00
Anton Korobeynikov
5b5d8bcd88
Switch PPC/Darwin to new section handling stuff
...
llvm-svn: 54537
2008-08-08 18:23:25 +00:00
Anton Korobeynikov
7c20ede085
Cleanup
...
llvm-svn: 54536
2008-08-08 18:22:59 +00:00
Dale Johannesen
ca43dce1e8
Remove extra call to DW.SetModuleInfo on Linux.
...
llvm-svn: 53365
2008-07-09 21:33:15 +00:00
Dale Johannesen
dbd04c0783
Emit debug into for data-only files for Linux PPC.
...
I cannot test this target, let me know if it breaks!
llvm-svn: 53362
2008-07-09 21:24:07 +00:00
Dale Johannesen
b9aaddc110
Emit debug info for data-only files. This version
...
applies to ppc Darwin only.
llvm-svn: 53353
2008-07-09 20:43:39 +00:00
Evan Cheng
49c8e68e4c
Back out 53254. It broke ppc debug info codegen.
...
llvm-svn: 53280
2008-07-09 06:36:53 +00:00
Dale Johannesen
b9097a71d4
Make debug info come out in data-only files.
...
This is a question of the debugging setup code not
being called at the right time, and it's called from
target-dependent code for some reason. I have only
attempted to fix Darwin, but I'm pretty sure it's
broken elsewhere; I'll leave that to people who can
test it.
llvm-svn: 53254
2008-07-08 21:56:22 +00:00
Dale Johannesen
18cc4d3ea4
Put initialized const weak objects into correct
...
sections on ppc32 darwin. g++.dg/abi/key2.C
llvm-svn: 51527
2008-05-24 00:10:20 +00:00
Dale Johannesen
5bf742f2aa
Handle quoted names when constructing $stub's,
...
$non_lazy_ptr's and $lazy_ptr's.
llvm-svn: 51277
2008-05-19 21:38:18 +00:00
Dale Johannesen
2e1d5e487b
Record weak external linkage in a case where we were
...
missing it. gcc.dg/darwin-weakimport-2.c.
Handle common and weak differently for darwin ppc32.
llvm-svn: 51201
2008-05-16 20:09:25 +00:00