1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

18051 Commits

Author SHA1 Message Date
Jim Grosbach
e539423d3d ARM Asm parsing of Thumb2 move immediate.
Thumb2 MOV mnemonic can accept both cc_out and predication. We don't (yet)
encode the instruction properly, but this gets the parsing part.

llvm-svn: 133945
2011-06-27 21:38:03 +00:00
Evan Cheng
2c06c8b3c2 More refactoring. Move getRegClass from TargetOperandInfo to TargetInstrInfo.
llvm-svn: 133944
2011-06-27 21:26:13 +00:00
Jim Grosbach
1ae2ca427b Add exception necessitated by 133938.
llvm-svn: 133939
2011-06-27 20:59:10 +00:00
Jim Grosbach
2049205bcb ARM assembly carry set/clear condition code aliases for 'hi/lo'
llvm-svn: 133938
2011-06-27 20:40:29 +00:00
Jim Grosbach
7c950cf36c ARM assembler support for ldmfd/stmfd mnemonics.
llvm-svn: 133936
2011-06-27 20:32:18 +00:00
Jim Grosbach
7157b0228f ARM assembler support for vpush/vpop.
Add aliases for the vpush/vpop mnemonics to the VFP load/store multiple
writeback instructions w/ SP as the base pointer.

rdar://9683231

llvm-svn: 133932
2011-06-27 20:00:07 +00:00
Jim Grosbach
210c7054ac ARM Assembly syntax support for arithmetic implied dest operand.
When the destination operand is the same as the first source register
operand for arithmetic instructions, the destination operand may be omitted.

For example, the following two instructions are equivalent:
  sub r2, r2, #6
  sub r2, #6

rdar://9682597

llvm-svn: 133925
2011-06-27 19:09:15 +00:00
Evan Cheng
6fea701360 Merge XXXGenRegisterDesc.inc XXXGenRegisterNames.inc XXXGenRegisterInfo.h.inc
into XXXGenRegisterInfo.inc.

llvm-svn: 133922
2011-06-27 18:32:37 +00:00
Jakob Stoklund Olesen
80238b93fb Grow the X86FloatingPoint register map to hold 16 registers.
This allows for more live scratch registers which is needed to handle
live ST registers before return and inline asm instructions.

llvm-svn: 133903
2011-06-27 04:08:36 +00:00
Chad Rosier
9a11e3e082 Replace dyn_cast<> with cast<> since the cast is already guarded by the necessary check.
llvm-svn: 133874
2011-06-25 18:51:28 +00:00
Dan Bailey
5b68fc5126 PTX: Reverting implementation of i8.
The .b8 operations in PTX are far more limiting than I first thought. The mov operation isn't even supported, so there's no way of converting a .pred value into a .b8 without going via .b16, which is
not sensible. An improved implementation needs to use the fact that loads and stores automatically extend and truncate to implement support for EXTLOAD and TRUNCSTORE in order to correctly support
boolean values.

llvm-svn: 133873
2011-06-25 18:16:28 +00:00
Chad Rosier
7c292f757f Enable tail call optimization in the presence of a byval (x86-32 and x86-64).
<rdar://problem/9483883>

llvm-svn: 133858
2011-06-25 02:04:56 +00:00
Douglas Gregor
a1ab267c45 Unbreak CMake build
llvm-svn: 133853
2011-06-25 00:51:50 +00:00
Evan Cheng
7b857b24bb Add include guard.
llvm-svn: 133847
2011-06-24 23:59:54 +00:00
Evan Cheng
2fa8b44985 Rename TargetDesc to MCTargetDesc
llvm-svn: 133846
2011-06-24 23:53:19 +00:00
Jim Grosbach
440526a1e8 Refactor MachO relocation generaration into the Target directories.
Move the target-specific RecordRelocation logic out of the generic MC
MachObjectWriter and into the target-specific object writers. This allows
nuking quite a bit of target knowledge from the supposedly target-independent
bits in lib/MC.

llvm-svn: 133844
2011-06-24 23:44:37 +00:00
Rafael Espindola
2e28e91435 Fix cmake build.
llvm-svn: 133830
2011-06-24 22:01:28 +00:00
Chad Rosier
70f20abc37 Hoist simple check above more complex checking to avoid unnecessary
overheads.  No functional change intended.

llvm-svn: 133824
2011-06-24 21:15:36 +00:00
Evan Cheng
391461842d - Add MCRegisterInfo registration machinery. Also added x86 registration routines.
- Rename TargetRegisterDesc to MCRegisterDesc.

llvm-svn: 133820
2011-06-24 20:42:09 +00:00
Jim Grosbach
2d4793fbaa ARM movw/movt fixups need to mask the high bits.
The fixup value comes in as the whole 32-bit value, so for the lo16 fixup,
the upper bits need to be masked off. Previously we assumed the masking had
already been done and asserted.

rdar://9635991

llvm-svn: 133818
2011-06-24 20:06:59 +00:00
Dan Bailey
2237ea06fb PTX: Add support for i8 type and introduce associated .b8 registers
The i8 type is required for boolean values, but can only use ld, st and mov instructions. The i1 type continues to be used for predicates.

llvm-svn: 133814
2011-06-24 19:27:10 +00:00
Chad Rosier
3127a19140 The Neon VCVT (between floating-point and fixed-point, Advanced SIMD)
instructions can be used to match combinations of multiply/divide and VCVT 
(between floating-point and integer, Advanced SIMD).  Basically the VCVT 
immediate operand that specifies the number of fraction bits corresponds to a 
floating-point multiply or divide by the corresponding power of 2.

For example, VCVT (floating-point to fixed-point, Advanced SIMD) can replace a 
combination of VMUL and VCVT (floating-point to integer) as follows:

Example (assume d17 = <float 8.000000e+00, float 8.000000e+00>):
  vmul.f32        d16, d17, d16
  vcvt.s32.f32    d16, d16
becomes:
  vcvt.s32.f32    d16, d16, #3

Similarly, VCVT (fixed-point to floating-point, Advanced SIMD) can replace a 
combinations of VCVT (integer to floating-point) and VDIV as follows:

Example (assume d17 = <float 8.000000e+00, float 8.000000e+00>):
  vcvt.f32.s32    d16, d16
  vdiv.f32        d16, d17, d16
becomes:
  vcvt.f32.s32    d16, d16, #3

llvm-svn: 133813
2011-06-24 19:23:04 +00:00
Justin Holewinski
3cc96ffc6e PTX: Add preliminary support for outputting debug information in the form of
.file and .loc directives.

Ideally, we would utilize the existing support in AsmPrinter for this, but
I cannot find a way to get .file and .loc directives to print without the
rest of the associated DWARF sections, which ptxas cannot handle.

llvm-svn: 133812
2011-06-24 19:19:18 +00:00
Akira Hatanaka
539ba34c25 Change the chain input of nodes that load the address of a function. This change
enables SelectionDAG::getLoad at MipsISelLowering.cpp:1914 to return a
pre-existing node instead of redundantly create a new node every time it is
called.

llvm-svn: 133811
2011-06-24 19:01:25 +00:00
Akira Hatanaka
3a3e7dfd84 Prevent generation of redundant addiu instructions that compute address of
static variables or functions. 

llvm-svn: 133803
2011-06-24 17:55:19 +00:00
Justin Holewinski
5e20d4dbfc PTX: Re-work target sm/compute selection and add some basic GPU
targets: g80, gt200, gf100(fermi)

llvm-svn: 133799
2011-06-24 16:27:49 +00:00
Rafael Espindola
f0a01fc6db Fix CellSPU CMakeList.txt.
llvm-svn: 133792
2011-06-24 13:58:45 +00:00
Evan Cheng
a86f3ed0d9 Fix CellSPU CMakeLists.txt
llvm-svn: 133787
2011-06-24 05:04:48 +00:00
Evan Cheng
e0801b07e0 Starting to refactor Target to separate out code that's needed to fully describe
target machine from those that are only needed by codegen. The goal is to
sink the essential target description into MC layer so we can start building
MC based tools without needing to link in the entire codegen.

First step is to refactor TargetRegisterInfo. This patch added a base class
MCRegisterInfo which TargetRegisterInfo is derived from. Changed TableGen to
separate register description from the rest of the stuff.

llvm-svn: 133782
2011-06-24 01:44:41 +00:00
Eli Friedman
802029c494 Add support for movntil/movntiq mnemonics. Reported on llvmdev.
llvm-svn: 133759
2011-06-23 21:07:47 +00:00
Evan Cheng
ed34559fcd Rename TargetOptions::StackAlignment to StackAlignmentOverride.
llvm-svn: 133739
2011-06-23 18:15:47 +00:00
Evan Cheng
76b1239b24 Remove TargetOptions.h dependency from ARMSubtarget.
llvm-svn: 133738
2011-06-23 18:15:17 +00:00
Justin Holewinski
a1dd1dd26e PTX: Always use registers for return values, but use .param space for device
parameters if SM >= 2.0

- Update test cases to be more robust against register allocation changes
- Bump up the number of registers to 128 per type
- Include Python script to re-generate register file with any number of
  registers

llvm-svn: 133736
2011-06-23 18:10:13 +00:00
Justin Holewinski
f6a497cf12 PTX: Whitespace fixes and remove commented out code
llvm-svn: 133734
2011-06-23 18:10:07 +00:00
Justin Holewinski
67c23366fd PTX: Prevent DCE from eliminating st.param calls, and unify the handling of
st.param and ld.param

FIXME: Test cases still need to be updated
llvm-svn: 133733
2011-06-23 18:10:05 +00:00
Justin Holewinski
bdf03838a5 PTX: Use .param space for parameters in device functions for SM >= 2.0
FIXME: DCE is eliminating the final st.param.x calls, figure out why
llvm-svn: 133732
2011-06-23 18:10:03 +00:00
Evan Cheng
f86a6485e7 Remove TargetOptions.h dependency from X86Subtarget.
llvm-svn: 133726
2011-06-23 17:54:54 +00:00
Dylan Noblesmith
ac8e727df3 CppBackend: fixup for api change
This broke after r133364.

llvm-svn: 133709
2011-06-23 12:11:37 +00:00
Jay Foad
75b709336d Reinstate r133513 (reverted in r133700) with an additional fix for a
-Wshorten-64-to-32 warning in Instructions.h.

llvm-svn: 133708
2011-06-23 09:09:15 +00:00
Eric Christopher
d38d7f3300 Revert r133513:
"Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512)."

Due to some additional warnings.

llvm-svn: 133700
2011-06-23 06:24:52 +00:00
Bill Wendling
42866c8944 Use the presence of the __compact_unwind section to indicate that a target
supports compact unwind info instead of having a separate flag indicating this.

llvm-svn: 133685
2011-06-23 05:13:28 +00:00
Evan Cheng
71256b6030 Get rid of one getStackAlignment(). RegisterInfo shouldn't need to know about stack alignment.
llvm-svn: 133679
2011-06-23 01:53:43 +00:00
Bill Wendling
ec779bc283 Add a flag that indicates whether a target supports compact unwind info or not.
llvm-svn: 133662
2011-06-22 23:16:51 +00:00
Bill Wendling
72c8521466 Add a __LD,__compact_unwind section.
If the linker supports it, this will hold the CIE and FDE information in a
compact format. The implementation of the compact unwinding emission is coming
soon.

llvm-svn: 133658
2011-06-22 22:22:24 +00:00
Jim Grosbach
fbb64ca5ff Add missing header.
llvm-svn: 133640
2011-06-22 20:40:30 +00:00
Jim Grosbach
b3d1a141fd Move ARMMachObjectWriter to its own file.
Just tidy up a bit. No functional change.

llvm-svn: 133638
2011-06-22 20:14:52 +00:00
Justin Holewinski
da4d209996 PTX: Fix FrameIndex mapping bug
llvm-svn: 133619
2011-06-22 16:07:03 +00:00
Dan Bailey
2d3b8e126a Test Commit.
llvm-svn: 133613
2011-06-22 09:04:30 +00:00
Justin Holewinski
376f1d46d4 PTX: Add signed integer comparisons
llvm-svn: 133599
2011-06-22 02:09:50 +00:00
Justin Holewinski
0844ac41b6 PTX: Add .address_size directive if PTX version >= 2.3
Patch by Wei-Ren Chen

llvm-svn: 133589
2011-06-22 00:43:56 +00:00