1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

11120 Commits

Author SHA1 Message Date
Chris Lattner
b5ceb50677 remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
no longer depends on TM!

llvm-svn: 77863
2009-08-02 04:27:24 +00:00
Chris Lattner
e0c440fd9f remove the x86/ppc impls of getEHGlobalPrefix, which is already dead.
llvm-svn: 77861
2009-08-02 04:13:22 +00:00
Chris Lattner
fc452eb48b clean up #includes of TargetAsmInfo.cpp
llvm-svn: 77858
2009-08-02 04:09:22 +00:00
Chris Lattner
d2477587b9 remove the dead PreferredEHDataFormat TAI hook: its now dead
even considering #if 0 code.

llvm-svn: 77856
2009-08-02 04:02:52 +00:00
Chris Lattner
1c44a63eba move getDwarfExceptionSection from TAI to TLOF and rename it to
getLSDASection() to be more specific.  This makes it pretty obvious
that the ELF LSDA section is being specified wrong in PIC mode.  We're
probably getting a lot of startup-time relocations to a readonly page,
which is expensive and bad.

Someone who cares about ELF C++ should investigate this.

llvm-svn: 77847
2009-08-02 01:34:32 +00:00
Daniel Dunbar
59c4432b7f Fix a possible crash on delete of an uninitialized variable.
llvm-svn: 77846
2009-08-02 01:25:15 +00:00
Dan Gohman
15699ece5b Don't call SectionForGlobal for hasAvailableExternallyLinkage()
variables either.

llvm-svn: 77844
2009-08-02 01:18:44 +00:00
Chris Lattner
18e3729e50 don't call SectionForGlobal on declarations, you can't tell the section a
declaration will end up in.

llvm-svn: 77843
2009-08-02 01:02:43 +00:00
Chris Lattner
06d8ca1f56 convert ctors/dtors section to be in TLOF instead of
TAI.

llvm-svn: 77842
2009-08-02 00:34:36 +00:00
Chris Lattner
e5e68589da don't override the default of this, the only difference is \t instead of ' '.
llvm-svn: 77838
2009-08-02 00:12:20 +00:00
Daniel Dunbar
8a0b05b396 Change MCOperand to use Create style instead of Make style for constructing
operands.

llvm-svn: 77837
2009-08-02 00:09:22 +00:00
Chris Lattner
506b49ffa0 Make SectionKind::get() private.
llvm-svn: 77835
2009-08-02 00:02:44 +00:00
Chris Lattner
05334af883 (re)introduce new simpler apis for creation sectionkinds.
llvm-svn: 77834
2009-08-01 23:57:16 +00:00
Chris Lattner
81229d1bed Remove "JumpTableDataSection" from TAI, instead, have AsmPrinter
compute it based on what it knows.  As part of this, rename getSectionForMergeableConstant
to getSectionForConstant because it works for non-mergable constants also.

The only functionality change from this is that Xcore will start dropping
its jump tables into readonly section instead of data section in -static mode.
This should be fine as the linker resolves the relocations.  If this is a
problem, let me know and we'll come up with another solution.

llvm-svn: 77833
2009-08-01 23:46:12 +00:00
Chris Lattner
8120a93944 give alpha its readonly section. This optimizes alpha, and prevents a
testsuite regression with a coming patch.

llvm-svn: 77832
2009-08-01 23:44:04 +00:00
Chris Lattner
e3d23ea562 .rdata == .rodata on mips.
llvm-svn: 77827
2009-08-01 23:07:29 +00:00
Chris Lattner
52229980ff no need to override the default with the default.
llvm-svn: 77826
2009-08-01 23:05:25 +00:00
Chris Lattner
4cbb1c0c3f REmove dead fields of TAI.
llvm-svn: 77820
2009-08-01 22:40:22 +00:00
Chris Lattner
49daade398 update for rename
llvm-svn: 77817
2009-08-01 22:06:53 +00:00
Chris Lattner
0106f7031b fix a fixme by sinking various target-specific directives down into
the appropriate subclasses.

llvm-svn: 77815
2009-08-01 21:56:13 +00:00
Chris Lattner
ac27c8c8d3 coff also doesn't have a ReadOnlySection yet, (!)
llvm-svn: 77814
2009-08-01 21:49:24 +00:00
Chris Lattner
d0f608200c coff doesn't set a .bss seciton, so this is dead.
llvm-svn: 77813
2009-08-01 21:48:25 +00:00
Chris Lattner
2a9d51b703 it turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/
llvm-svn: 77812
2009-08-01 21:46:23 +00:00
Chris Lattner
cbc6752ac5 don't use isWeak anymore.
llvm-svn: 77810
2009-08-01 21:42:58 +00:00
Dan Gohman
8961d1aaa3 Fix typos in comments.
llvm-svn: 77806
2009-08-01 21:25:00 +00:00
Chris Lattner
79e9585304 Change SectionKind to be a property that is true of a *section*, it
should have no state that is specific to particular globals in the
section.  In this case, it means the removal of the "isWeak" and
"ExplicitSection" bits.  MCSection uses the new form of SectionKind.

To handle isWeak, I introduced a new SectionInfo class, which is
SectionKind + isWeak, and it is used by the part of the code generator
that does classification of a specific global.

The ExplicitSection disappears.  It is moved onto MCSection as a new
"IsDirective" bit.  Since the Name of a section is either a section
or directive, it makes sense to keep this bit in MCSection.  Ultimately
the creator of MCSection should canonicalize (e.g.) .text to whatever
the actual section is.

llvm-svn: 77803
2009-08-01 21:11:14 +00:00
Dan Gohman
abd57d8aec Minor code cleanups.
llvm-svn: 77795
2009-08-01 19:14:37 +00:00
Nick Lewycky
9dccd7a872 Add newline at end of file to remove gcc warning.
llvm-svn: 77791
2009-08-01 19:09:44 +00:00
Chris Lattner
04ae6629fe All MCSections are now required to have a SectionKind.
llvm-svn: 77787
2009-08-01 18:25:49 +00:00
Evan Cheng
b9b4b9aa15 Workaround a couple of Darwin assembler bugs.
llvm-svn: 77781
2009-08-01 06:13:52 +00:00
Dan Gohman
2e5fd769b6 Minor code simplifications.
llvm-svn: 77768
2009-08-01 03:42:59 +00:00
Evan Cheng
c165700a7f Split t2MOVCCs since some assemblers do not recognize mov shifted register alias with predicate.
llvm-svn: 77764
2009-08-01 01:43:45 +00:00
Dan Gohman
e05a157134 The X86 maximal stack alignment calculator preserves the CFG. Also,
be more careful about the return value of runOnMachineFunction.

llvm-svn: 77758
2009-08-01 00:31:02 +00:00
Dan Gohman
db8c4b62b4 X86 floating-point passes don't modify the CFG.
llvm-svn: 77757
2009-08-01 00:26:16 +00:00
Evan Cheng
5ef6928dff Fix Thumb2 function call isel. Thumb1 and Thumb2 should share the same
instructions for calls since BL and BLX are always 32-bit long and BX is always
16-bit long.

Also, we should be using BLX to call external function stubs.

llvm-svn: 77756
2009-08-01 00:16:10 +00:00
Dan Gohman
bbd7d54b39 Use setPreservesAll in X86CodeEmitter.
llvm-svn: 77755
2009-07-31 23:44:16 +00:00
Daniel Dunbar
99d279978e llvm-mc: A few more parsing / match tweaks.
- Operands which are just a label should be parsed as immediates, not memory
   operands (from the assembler perspective).

 - Match a few more flavors of immediates.

 - Distinguish match functions for memory operands which don't take a segment
   register.

 - We match the .s for "hello world" now!

llvm-svn: 77745
2009-07-31 22:22:54 +00:00
Evan Cheng
cb1704f904 t2BR_JT is mov pc, it's 2 byte long, not 4.
llvm-svn: 77744
2009-07-31 22:22:22 +00:00
Evan Cheng
88a27caaaf Thumb2 movcc need .w suffix.
llvm-svn: 77743
2009-07-31 22:21:55 +00:00
Chris Lattner
882b1208e1 PreferredEHDataFormat is always call with data and global, but this whole
thing is #if0'd out anyway.  Just simplify the code by reducing the interface.
Not deleting this is essential for Bill's continuing happiness.

llvm-svn: 77736
2009-07-31 21:39:55 +00:00
Daniel Dunbar
3c72ed6449 llvm-mc/X86: Sketch match functions for immediates and memory operands.
Also, change scale value to always be 1 when unspecified to machine MachineInst
encoding.

llvm-svn: 77728
2009-07-31 20:53:16 +00:00
Chris Lattner
48bdeff884 move emitUsedDirectiveFor to TargetLoweringObjectFile and rename it to
indicate that it is a predicate, not an emitter.  This eliminates TAI
dependencies on Mangler and GlobalValue.

llvm-svn: 77726
2009-07-31 20:52:39 +00:00
Chris Lattner
70c133d1d9 remove the PPCLinuxTargetAsmInfo implementation of PreferredEHDataFormat,
because it just calls the default impl.

Remove the PPCDarwinTargetAsmInfo version of PreferredEHDataFormat because
it just returns DW_EH_PE_absptr unless on 10.6.  However, 10.6 doesn't support
PPC, so the default impl is just fine.

llvm-svn: 77724
2009-07-31 20:43:26 +00:00
Chris Lattner
4bf345e8e2 remove a pointless override.
llvm-svn: 77723
2009-07-31 20:36:15 +00:00
Owen Anderson
1dc40e205b Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.

llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Eric Christopher
ad07d18432 Whitespace and 80-col cleanup.
llvm-svn: 77718
2009-07-31 20:07:27 +00:00
Chris Lattner
75b7692e66 switch off of 'Section' onto MCSection. We're not properly using
MCSection subclasses yet, but this is a step in the right direction.

llvm-svn: 77708
2009-07-31 18:48:30 +00:00
Evan Cheng
0c9705feed Until we have a "ALIGN" pseudo instruction, have asm printer emitted a .align
to ensure the instruction that follows a TBB (when the number of table entries
is odd) is 2-byte aligned.
Patch by Sandeep Patel.

llvm-svn: 77705
2009-07-31 18:35:56 +00:00
Evan Cheng
038a564156 - Teach TBB / TBH offset limits are 510 and 131070 respectively since the offset
is scaled by two.
- Teach GetInstSizeInBytes about TBB and TBH.

llvm-svn: 77701
2009-07-31 18:28:05 +00:00
Daniel Dunbar
23baa6b4ad Normalize target registration code.
llvm-svn: 77692
2009-07-31 18:16:53 +00:00