1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

179 Commits

Author SHA1 Message Date
Eric Christopher
72ca6fc94e Revert r103156 since it was breaking the build bots.
Reverse-merging r103156 into '.':
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/ARMRegisterInfo.h
U    lib/Target/ARM/ARMBaseRegisterInfo.cpp
U    lib/Target/ARM/ARMBaseInstrInfo.cpp
U    lib/Target/ARM/ARMRegisterInfo.td

llvm-svn: 103159
2010-05-06 02:29:06 +00:00
Evan Cheng
f25111f27f Adding pseudo 256-bit registers QQ0 . . . QQ7 to represent pairs of Q registers. These will be used to model VLD2 / VST2 instructions in order to get substantially better codegen for them.
llvm-svn: 103156
2010-05-06 01:52:03 +00:00
Anton Korobeynikov
f9463f5b98 More fixes for itins
llvm-svn: 100662
2010-04-07 18:21:10 +00:00
Anton Korobeynikov
0c3bc7a9ce Fix invalid itins for 32-bit varians of VMLAL and friends
llvm-svn: 100661
2010-04-07 18:21:04 +00:00
Anton Korobeynikov
be68ff5b2c Fix itins for VABA
llvm-svn: 100657
2010-04-07 18:20:42 +00:00
Anton Korobeynikov
fbc58bba2f Correct VMVN itinerary: operand is read in the second cycle, not in the first.
llvm-svn: 100656
2010-04-07 18:20:36 +00:00
Anton Korobeynikov
2abd52b692 More A9 itineraries
llvm-svn: 100655
2010-04-07 18:20:29 +00:00
Anton Korobeynikov
13df6eaf1c Correct itinerary class for VPADD
llvm-svn: 100654
2010-04-07 18:20:24 +00:00
Anton Korobeynikov
982f9a042b VP{MAX, MIN} are of IIC_VSUBi4D itin class as well.
llvm-svn: 100653
2010-04-07 18:20:18 +00:00
Anton Korobeynikov
058984f2a8 VHADD differs from VHSUB at least on A9 - the former reads both operands in the second cycle, while the latter reads second operand in first cycle. Introduce new itin classes to catch this behavior. Whether this is true for A8 as well is WIP.
llvm-svn: 100652
2010-04-07 18:20:13 +00:00
Johnny Chen
03c2e8a36c Add NVTBLFrm to represent A8.6.406 VTBL, VTBX Vector Table Lookup Instructions.
These instructions use byte index in a control vector (M:Vm) to lookup byte
values in a table and generate a new vector (D:Vd).  The table is specified via
a list of vectors, which can be:

{Dn}
{Dn D<n+1>}
{Dn D<n+1> D<n+2>}
{Dn D<n+1> D<n+2> D<n+3>}

llvm-svn: 99789
2010-03-29 01:14:22 +00:00
Chris Lattner
7f2800ea6c fix integer negates to use the proper type for the zero vectors,
this also depends on the new "bitconvert dropping" behavior just
added to tblgen.

llvm-svn: 99757
2010-03-28 08:39:10 +00:00
Chris Lattner
36a0df5c96 fix vnot matching to explicitly specify the type of the
input to be v8i8 or v16i8, which buildvectors get canonicalized to.

This allows the patterns that were previously using a bare 'vnot' to
match, before they couldn't.

llvm-svn: 99754
2010-03-28 08:08:07 +00:00
Bob Wilson
6d9296abc6 Fix indentation.
llvm-svn: 99705
2010-03-27 04:01:23 +00:00
Bob Wilson
be89c51aa3 Add a format argument to the N3V and N3VX classes, removing the N3Vf class.
llvm-svn: 99704
2010-03-27 03:56:52 +00:00
Johnny Chen
794a9a3941 Add NVMulSLFrm to represent "3-register multiply with scalar" operations and set
it as the format for the appropriate N3V*SL*<> classes.  These instructions
require special handling of the M:Vm field which encodes the restricted Dm and
the lane index within Dm.

Examples are A8.6.325 VMLA, VMLAL, VMLS, VMLSL (by scalar):

	vmlal.s32	q3, d2, d10[0]

llvm-svn: 99690
2010-03-27 01:03:13 +00:00
Johnny Chen
0763231e02 Remove the duplicate multiclass N3VSh_QHSD and use N3VInt_QHSD which is modified
to now take a format argument.  N3VDInt<> and N3VQInt<> are modified to take a
format argument as well.

llvm-svn: 99676
2010-03-26 23:49:07 +00:00
Johnny Chen
ca1d7dcfe4 Add NVExtFrm to represent NEON Vector Extract Instructions, that uses Inst{11-8}
to encode the byte location of the extracted result in the concatenation of the
operands, from the least significant end.

Modify VEXTd and VEXTq classes to use the format.

llvm-svn: 99659
2010-03-26 22:28:56 +00:00
Johnny Chen
4a97a176e7 Add N3RegVShFrm to represent 3-Register Vector Shift Instructions, which do not
follow the N3RegFrm's operand order of D:Vd N:Vn M:Vm.  The operand order of
N3RegVShFrm is D:Vd M:Vm N:Vn (notice that M:Vm is the first src operand).

Add a parent class N3Vf which requires passing a Format argument and which the
N3V class is modified to inherit from.  N3V class represents the "normal"
3-Register NEON Instructions with N3RegFrm.

Also add a multiclass N3VSh_QHSD to represent clusters of NEON 3-Register Shift
Instructions and replace 8 invocations with it.

llvm-svn: 99655
2010-03-26 21:26:28 +00:00
Johnny Chen
a8b02d6451 Add N2RegVShLFrm and N2RegVShRFrm formats so that the disassembler can easily
dispatch to the appropriate routines to handle the different interpretations of
the shift amount encoded in the imm6 field.  The Vd, Vm fields are interpreted
the same between the two, though.

See, for example, A8.6.367 VQSHL, VQSHLU (immediate) for N2RegVShLFrm format and
A8.6.368 VQSHRN, VQSHRUN for N2RegVShRFrm format.

llvm-svn: 99590
2010-03-26 01:07:59 +00:00
Johnny Chen
58278a364d Add NVCVTFrm (NEON Convert with fractional bits immediate) and modify N2VImm to
expect a Format arg.  N2VCvtD/N2VCvtQ are modified to use the NVCVTFrm format.

llvm-svn: 99548
2010-03-25 20:39:04 +00:00
Johnny Chen
cc491eff10 Added a new instruction class NVDupLane to be inherited by VDUPLND and VDUPLNQ,
instead of the current N2V.  Format of NVDupLane instances are set to NEONFrm
currently.

llvm-svn: 99518
2010-03-25 17:01:27 +00:00
Johnny Chen
f53b3e5b12 Trivial formating change.
llvm-svn: 99428
2010-03-24 21:25:07 +00:00
Johnny Chen
3e5750fc46 Reverted r99326 which added NVdVmVCVTFrm, and later renamed to NVCVTFrm.
NVCVTFrm will later be used to describe "vcvt with fractional bits".

llvm-svn: 99415
2010-03-24 19:47:14 +00:00
Johnny Chen
31c01c1811 Reverted r99376. The disassembler will deal with the 2-reg format of these two
N3VX instructions using special case code.

llvm-svn: 99409
2010-03-24 18:46:34 +00:00
Johnny Chen
d31726dba1 Mark VMOVDneon and VMOVQ as having the N2RegFrm form to help the disassembler.
llvm-svn: 99376
2010-03-24 01:29:25 +00:00
Johnny Chen
dabf739480 Renamed NVdVmImmFrm and NVdVmVCVTFrm to the more proper N2RegFrm and NVCVTFrm,
respectively, and add some more comment.

llvm-svn: 99373
2010-03-24 00:57:50 +00:00
Johnny Chen
8249bce25e Add comment.
llvm-svn: 99327
2010-03-23 21:30:12 +00:00
Johnny Chen
415ce90919 Add New NEON Format NVdVmVCVTFrm.
Converted some of the NEON vcvt instructions to this format.

llvm-svn: 99326
2010-03-23 21:25:38 +00:00
Bob Wilson
195c570fd3 Fix VLDMQ and VSTMQ instructions to use the correct encoding and address modes.
These instructions are only needed for codegen, so I've removed all the
explicit encoding bits for now; they should be set in the same way as the for
VLDMD and VSTMD whenever we add encodings for VFP.  The use of addrmode5
requires that the instructions be custom-selected so that the number of
registers can be set in the AM5Opc value.

llvm-svn: 99309
2010-03-23 18:54:46 +00:00
Bob Wilson
8ba51dc0bd Rename some instructions to match the corresponding NEON opcode.
llvm-svn: 99266
2010-03-23 06:26:18 +00:00
Bob Wilson
58c4740582 Change VST1 instructions for loading Q register values to operate on pairs
of D registers.  Add a separate VST1q instruction with a Q register
source operand for use by storeRegToStackSlot.

llvm-svn: 99265
2010-03-23 06:20:33 +00:00
Bob Wilson
2764399dd8 Change VLD1 instructions for loading Q register values to operate on pairs
of D registers.  Add a separate VLD1q instruction with a Q register
destination operand for use by loadRegFromStackSlot.

llvm-svn: 99261
2010-03-23 05:25:43 +00:00
Bob Wilson
0741acde00 Rename one more NEON instruction that I missed earlier.
llvm-svn: 99201
2010-03-22 20:31:39 +00:00
Bob Wilson
80b4f21ab7 Regroup some instructions. No functional change.
llvm-svn: 99192
2010-03-22 18:22:06 +00:00
Bob Wilson
f23a45e151 Rename some VLD1/VST1 instructions to match the implementation, i.e., the
corresponding NEON instructions, instead of operation they are currently
used for.

llvm-svn: 99189
2010-03-22 18:13:18 +00:00
Bob Wilson
8ff1029669 Remove some redundant instruction classes.
llvm-svn: 99187
2010-03-22 18:02:38 +00:00
Bob Wilson
0e5d42fb54 Refactor instruction encoding arguments for VLDnLN/VSTnLN classes to
specify encoding bits in arguments instead of "let" expressions.

llvm-svn: 99185
2010-03-22 16:43:10 +00:00
Bob Wilson
73d7323c91 Re-commit r98683 ("remove redundant writeback flag from ARM address mode 6")
with changes to add a separate optional register update argument.  Change all
the NEON instructions with address register writeback to use it.

llvm-svn: 99095
2010-03-20 22:13:40 +00:00
Bob Wilson
c0f7724ecd Add instruction variants for VST2, VST3, and VST4 "store-lane" operations with
address register writeback.

llvm-svn: 99094
2010-03-20 21:57:36 +00:00
Bob Wilson
076aa52a4f Add variants of VST2, VST3 and VST4 with address register writeback, and
rewrite the existing VST3 and VST4 instructions to use the same classes as
the others.

llvm-svn: 99093
2010-03-20 21:45:18 +00:00
Bob Wilson
7578eb20da Add instructions for double-spaced VST3 and VST4 without address register
writeback, and refactor the existing double-spaced VST2 instructions.
These are only for the disassembler since codegen doesn't use them, at
least for now.

llvm-svn: 99090
2010-03-20 21:15:48 +00:00
Bob Wilson
1106af1257 Add VST1 instructions with address register writeback.
llvm-svn: 99083
2010-03-20 20:54:36 +00:00
Bob Wilson
88757e6720 Add instruction variants for VLD2, VLD3, and VLD4 "load-lane" operations with
address register writeback.

llvm-svn: 99082
2010-03-20 20:47:18 +00:00
Bob Wilson
e70bdcb2a7 Tidy some more comments and whitespace.
llvm-svn: 99081
2010-03-20 20:39:53 +00:00
Bob Wilson
7dacf6bb70 Add variants of VLD2, VLD3 and VLD4 with address register writeback, and
rewrite the existing VLD3 and VLD4 instructions to use the same classes as
the others.

llvm-svn: 99080
2010-03-20 20:10:51 +00:00
Bob Wilson
40ae450fb5 Tidy some comments and whitespace for consistency.
llvm-svn: 99078
2010-03-20 19:57:03 +00:00
Bob Wilson
a98f30a3a2 Rename some instructions for consistency and sanity: use "_UPD" suffix for
load/stores with address register writeback, and use "odd" suffix to distinguish
instructions to access odd numbered registers (instead of "a" and "b").
No functional changes.

llvm-svn: 99066
2010-03-20 18:35:24 +00:00
Bob Wilson
d275bb2338 Add instructions for double-spaced VLD3 and VLD4 without address register
writeback, and refactor the existing double-spaced VLD2 instructions.
These are only for the disassembler since codegen doesn't use them, at
least for now.

llvm-svn: 99065
2010-03-20 18:14:26 +00:00
Bob Wilson
045d2c548a Add VLD1 instructions with address register writeback.
llvm-svn: 99062
2010-03-20 17:59:03 +00:00