1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

2068 Commits

Author SHA1 Message Date
Dan Gohman
512a0d9f42 Add nounwind to this test.
llvm-svn: 77792
2009-08-01 19:11:04 +00:00
Eli Friedman
cd4d9ff7fa Hack to make this test work on platforms which aren't Macs. Fixing this
myself because I'm getting tired of seeing the red buildbots, which have 
been red since 5:30PM PDT last night.

Proposed supplement to developer policy: committers should make sure to 
be around to watch for buildbot failures after committing.

llvm-svn: 77785
2009-08-01 16:37:18 +00:00
Evan Cheng
b9b4b9aa15 Workaround a couple of Darwin assembler bugs.
llvm-svn: 77781
2009-08-01 06:13:52 +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
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
David Greene
543296ed84 Simplify operand padding by keying off tabs in the asm stream. If
padding is disabled, tabs get replaced by spaces except in the case of
the first operand, where the tab is output to line up the operands after
the mnemonics.

Add some better comments and eliminate redundant code.

Fix some testcases to not assume tabs.

llvm-svn: 77740
2009-07-31 21:57:10 +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
Chris Lattner
85a3632c7a fix PR4650: we only track sizes for certain objects, so only put something
into the mergable section if it is one of our special cases.  This could
obviously be improved, but this is the minimal fix and restores us to the
previous behavior.

llvm-svn: 77679
2009-07-31 16:17:13 +00:00
Evan Cheng
c9f31ae969 When fp is not eliminated, instructions with T2_i12 modes will be changed to T2_i8 ones. Take that into consideration when determining stack size limit for reserving register scavenging slot.
llvm-svn: 77642
2009-07-30 23:29:25 +00:00
David Goodwin
62efc71b9f Darwin assembler now recognizes "orn", so remove workaround.
llvm-svn: 77627
2009-07-30 21:51:41 +00:00
David Goodwin
d29f81da16 Darwin assembler now supports "rrx", so remove workaround.
llvm-svn: 77625
2009-07-30 21:38:40 +00:00
David Goodwin
2eaffa79af Cleanup and include code selection for some frame index cases.
llvm-svn: 77622
2009-07-30 18:56:48 +00:00
Evan Cheng
148032a1a2 Optimize some common usage patterns of atomic built-ins __sync_add_and_fetch() and __sync_sub_and_fetch.
When the return value is not used (i.e. only care about the value in the memory), x86 does not have to use add to implement these. Instead, it can use add, sub, inc, dec instructions with the "lock" prefix.

This is currently implemented using a bit of instruction selection trick. The issue is the target independent pattern produces one output and a chain and we want to map it into one that just output a chain. The current trick is to select it into a merge_values with the first definition being an implicit_def. The proper solution is to add new ISD opcodes for the no-output variant. DAG combiner can then transform the node before it gets to target node selection.

Problem #2 is we are adding a whole bunch of x86 atomic instructions when in fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix.

llvm-svn: 77582
2009-07-30 08:33:02 +00:00
Dan Gohman
3c7e8160f6 Add a new register class to describe operands that can't be SP,
due to x86 encoding restrictions. This is currently off by default
because it may cause code quality regressions. This is for PR4572.

llvm-svn: 77565
2009-07-30 01:56:29 +00:00
Evan Cheng
31ac181755 tbb / tbh instructions only branch forward, not backwards.
llvm-svn: 77522
2009-07-29 23:20:20 +00:00
Evan Cheng
fabbd6219a Add VFP3 D registers to the DPR register class.
llvm-svn: 77521
2009-07-29 23:03:41 +00:00
Bob Wilson
355e0b70e0 Change Neon VLDn intrinsics to return multiple values instead of really
wide vectors.  Likewise, change VSTn intrinsics to take separate arguments
for each vector in a multi-vector struct.  Adjust tests accordingly.

llvm-svn: 77468
2009-07-29 16:39:22 +00:00
Chris Lattner
f8a9c2f843 fix PR4584 with a trivial patch now that the pieces are in place.
llvm-svn: 77434
2009-07-29 05:20:33 +00:00
Evan Cheng
fc846dd401 Optimize Thumb2 jumptable to use tbb / tbh when all the offsets fit in byte / halfword.
llvm-svn: 77422
2009-07-29 02:18:14 +00:00
Eric Christopher
88c1b51020 Add a couple more tests for the ptest intrinsics to make sure we're
grabbing them all correctly.

llvm-svn: 77413
2009-07-29 00:51:15 +00:00
Eric Christopher
c7b97d1f03 Add support for gcc __builtin_ia32_ptest{z,c,nzc} intrinsics. Lower
to ptest instruction plus setcc. Revamp ptest instruction. Add test.

llvm-svn: 77407
2009-07-29 00:28:05 +00:00
Evan Cheng
cf483eb0c0 In thumb2 mode, add pc is unpredictable. Use add + mov pc instead (that is until more optimization goes in).
llvm-svn: 77364
2009-07-28 20:53:24 +00:00
David Goodwin
0c9e96bf09 Remove support for ORN to workaround <rdar://problem/7096522>.
llvm-svn: 77363
2009-07-28 20:51:25 +00:00
David Goodwin
dbc23ece04 Add workaround for <rdar://problem/7098328>.
llvm-svn: 77340
2009-07-28 18:15:38 +00:00
Chris Lattner
a8faf6b1b6 fix testcase for previous patch.
llvm-svn: 77338
2009-07-28 18:04:18 +00:00
Chris Lattner
986bd2bd0a Fix PR4639, a ELF-TLS regression from some of my refactoring.
llvm-svn: 77336
2009-07-28 17:57:51 +00:00
David Goodwin
e94d490b89 Add Thumb-2 patterns for ARMsrl_flag and ARMsra_flag.
llvm-svn: 77329
2009-07-28 17:06:49 +00:00
Evan Cheng
05555a7d31 tADDrSPI doesn't have a predicate operand, but tADDhirr and tADDi3 have.
llvm-svn: 77305
2009-07-28 07:38:35 +00:00
Evan Cheng
b740190d2e - More refactoring. This gets rid of all of the getOpcode calls.
- This change also makes it possible to switch between ARM / Thumb on a
  per-function basis.
- Fixed thumb2 routine which expand reg + arbitrary immediate. It was using
  using ARM so_imm logic.
- Use movw and movt to do reg + imm when profitable.
- Other code clean ups and minor optimizations.

llvm-svn: 77300
2009-07-28 05:48:47 +00:00
David Goodwin
0bcb94eeff ORN does not require (and can not have) the ".w" suffix. "Orthogonality" is a dirty word at ARM.
llvm-svn: 77275
2009-07-27 23:34:12 +00:00
David Goodwin
471e9f5b8d Add ".w" suffix for wide thumb-2 instructions.
llvm-svn: 77199
2009-07-27 16:31:55 +00:00
Sanjiv Gupta
f39c96217b Test case to check that separate section is created for a global variable specified with section attribute.
llvm-svn: 77195
2009-07-27 16:20:41 +00:00
Chris Lattner
19c9914343 update testcase.
llvm-svn: 77192
2009-07-27 15:52:58 +00:00
Chris Lattner
5547fd80ad put normal data into .data instead of .data.rel on elf systems.
llvm-svn: 77116
2009-07-26 03:06:11 +00:00
Chris Lattner
9cd489c7f1 finish simplifying DarwinTargetAsmInfo::SelectSectionForGlobal
for now.  Make the section switching directives more consistent
by not including \n and including \t for them all.

llvm-svn: 77107
2009-07-26 01:24:18 +00:00
Chris Lattner
b95150b65a simplify DarwinTargetAsmInfo::SelectSectionForGlobal a bit
and make it more aggressive, we now put:

const int G2 __attribute__((weak)) = 42;

into the text (readonly) segment like gcc, previously we put
it into the data (readwrite) segment.

llvm-svn: 77104
2009-07-26 00:51:36 +00:00
Bob Wilson
ec256c8938 Add support for ARM Neon VREV instructions.
Patch by Anton Korzh, with some modifications from me.

llvm-svn: 77101
2009-07-26 00:39:34 +00:00
Chris Lattner
cf7cc0ed7d add the most expedient hack to fix PR4619, along with a testcase.
Thanks to Rafael for the great example.

llvm-svn: 77083
2009-07-25 17:57:37 +00:00
Evan Cheng
12dd5c078f I've lost my mind. PR4572 has not been fixed.
llvm-svn: 77031
2009-07-25 01:11:46 +00:00
Evan Cheng
d615e606c4 Change Thumb2 jumptable codegen to one that uses two level jumps:
Before:
      adr r12, #LJTI3_0_0
      ldr pc, [r12, +r0, lsl #2]
LJTI3_0_0:
      .long    LBB3_24
      .long    LBB3_30
      .long    LBB3_31
      .long    LBB3_32

After:
      adr r12, #LJTI3_0_0
      add pc, r12, +r0, lsl #2
LJTI3_0_0:
      b.w    LBB3_24
      b.w    LBB3_30
      b.w    LBB3_31
      b.w    LBB3_32

This has several advantages.
1. This will make it easier to optimize this to a TBB / TBH instruction +
   (smaller) table.
2. This eliminate the need for ugly asm printer hack to force the address
   into thumb addresses (bit 0 is one).
3. Same codegen for pic and non-pic.
4. This eliminate the need to align the table so constantpool island pass
   won't have to over-estimate the size.

Based on my calculation, the later is probably slightly faster as well since
ldr pc with shifter address is very slow. That is, it should be a win as long
as the HW implementation can do a reasonable job of branch predict the second
branch.

llvm-svn: 77024
2009-07-25 00:33:29 +00:00
Evan Cheng
bddff8fbe0 Remove a duplicated test.
llvm-svn: 77020
2009-07-25 00:24:40 +00:00
Evan Cheng
5faed6335e Forgot this test earlier.
llvm-svn: 77007
2009-07-24 22:42:45 +00:00
Evan Cheng
b8b61017e8 Fix these tests.
llvm-svn: 77006
2009-07-24 22:42:22 +00:00
Eric Christopher
24a620ec3d Move insertps tests to sse41 combo test file, convert to filecheck
format and add an extract/insert test.

llvm-svn: 76994
2009-07-24 19:24:26 +00:00
Evan Cheng
bbac2397c5 Convert a test to FileCheck.
llvm-svn: 76954
2009-07-24 06:01:46 +00:00
Chris Lattner
09511ed243 Remove SectionKind::Small*. This was only used on mips, and is apparently
a sad mistake that is regretted. :)

llvm-svn: 76935
2009-07-24 03:11:51 +00:00
Richard Osborne
19591063fc Add tests for handling of globals and tls on the XCore. These currently fail
but pass when run against r76652.

llvm-svn: 76923
2009-07-24 00:38:20 +00:00
Dan Gohman
62c8b40b66 Remove the IA-64 backend.
llvm-svn: 76920
2009-07-24 00:30:09 +00:00
Evan Cheng
90f66e1c4e Thumb2 does not allow the use of "pc" register as part of the load / store address.
llvm-svn: 76909
2009-07-23 23:09:51 +00:00