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

155 Commits

Author SHA1 Message Date
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
Bob Wilson
9501c478f7 Revert this change, since it was causing ARM performance regressions.
--- Reverse-merging r98889 into '.':
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/ARMISelLowering.h
U    lib/Target/ARM/ARMInstrInfo.td
U    lib/Target/ARM/ARMInstrVFP.td
U    lib/Target/ARM/ARMISelLowering.cpp
U    lib/Target/ARM/ARMInstrFormats.td

llvm-svn: 99010
2010-03-19 22:51:32 +00:00
Anton Korobeynikov
eeae840ed7 Get rid of target-specific fp <-> int nodes when still I'm here.
llvm-svn: 98889
2010-03-18 22:35:45 +00:00
Bob Wilson
504b4c8243 Refactor NEON ld/st instructions to hardcode class arguments that are constants.
No functional changes.

llvm-svn: 98860
2010-03-18 20:18:39 +00:00
Johnny Chen
b1d61d9be1 Revert 98745 with respect to the addition of NEONFrm subformats for disassembly.
There is a better way coming up.

llvm-svn: 98777
2010-03-17 23:26:50 +00:00
Johnny Chen
0212e0df47 Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm
instructions to help disassembly.

We also changed the output of the addressing modes to omit the '+' from the
assembler syntax #+/-<imm> or +/-<Rm>.  See, for example, A8.6.57/58/60.

And modified test cases to not expect '+' in +reg or #+num.  For example,

; CHECK:       ldr.w	r9, [r7, #28]

llvm-svn: 98745
2010-03-17 17:52:21 +00:00
Bob Wilson
3778e7f389 Revert 98683. It is breaking something in the disassembler.
llvm-svn: 98692
2010-03-16 23:01:13 +00:00
Bob Wilson
79f10e6233 Remove redundant writeback flag from ARM address mode 6. Also remove the
optional register update argument, which is currently unused -- when we add
support for that, it can just be a separate operand.

llvm-svn: 98683
2010-03-16 21:44:40 +00:00
Bob Wilson
34aca030c5 --- Reverse-merging r98637 into '.':
U    test/CodeGen/ARM/tls2.ll
U    test/CodeGen/ARM/arm-negative-stride.ll
U    test/CodeGen/ARM/2009-10-30.ll
U    test/CodeGen/ARM/globals.ll
U    test/CodeGen/ARM/str_pre-2.ll
U    test/CodeGen/ARM/ldrd.ll
U    test/CodeGen/ARM/2009-10-27-double-align.ll
U    test/CodeGen/Thumb2/thumb2-strb.ll
U    test/CodeGen/Thumb2/ldr-str-imm12.ll
U    test/CodeGen/Thumb2/thumb2-strh.ll
U    test/CodeGen/Thumb2/thumb2-ldr.ll
U    test/CodeGen/Thumb2/thumb2-str_pre.ll
U    test/CodeGen/Thumb2/thumb2-str.ll
U    test/CodeGen/Thumb2/thumb2-ldrh.ll
U    utils/TableGen/TableGen.cpp
U    utils/TableGen/DisassemblerEmitter.cpp
D    utils/TableGen/RISCDisassemblerEmitter.h
D    utils/TableGen/RISCDisassemblerEmitter.cpp
U    Makefile.rules
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/Makefile
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
D    lib/Target/ARM/Disassembler
U    lib/Target/ARM/ARMInstrFormats.td
U    lib/Target/ARM/ARMAddressingModes.h
U    lib/Target/ARM/Thumb2ITBlockPass.cpp

llvm-svn: 98640
2010-03-16 16:59:47 +00:00
Johnny Chen
ff030064fb Initial ARM/Thumb disassembler check-in. It consists of a tablgen backend
(RISCDisassemblerEmitter) which emits the decoder functions for ARM and Thumb,
and the disassembler core which invokes the decoder function and builds up the
MCInst based on the decoded Opcode.

Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm
instructions to help disassembly.

We also changed the output of the addressing modes to omit the '+' from the
assembler syntax #+/-<imm> or +/-<Rm>.  See, for example, A8.6.57/58/60.

And modified test cases to not expect '+' in +reg or #+num.  For example,

; CHECK:       ldr.w	r9, [r7, #28]

llvm-svn: 98637
2010-03-16 16:36:54 +00:00
Chris Lattner
5d97a9a10d fix an ambiguous pattern, contrary to expectations, scalar_to_vector
doesn't have a type constraint on the scalar because we don't have
an 'sAny' type.

llvm-svn: 98527
2010-03-15 00:52:43 +00:00
Bob Wilson
41bb0dca48 Remove obsolete comments. VLDM is implemented in ARMInstrVFP.td.
llvm-svn: 98395
2010-03-12 22:00:08 +00:00
Chris Lattner
49ef2cd57b fix a bunch of partially ambiguous patterns on ARM. As an
example, this:

(set DPR:$dst, (fsub (fneg (fmul DPR:$a, DPR:$b)), DPR:$dstin))

is ambiguous because DPR contains both f64 and v2f32.  tblgen
currently accidentally picks f64 because it's first in the 
regclass.

llvm-svn: 97955
2010-03-08 18:51:21 +00:00
Johnny Chen
41ab970549 Added Vector Swap (VSWPd and VSWPq) instructions for disassembly only.
A8.6.405

llvm-svn: 97052
2010-02-24 20:06:07 +00:00
Johnny Chen
71bf8b1466 Fixed typo of opcodestr, should be "vst1", not "vld1".
llvm-svn: 97044
2010-02-24 18:00:40 +00:00
Johnny Chen
c31a44dd8b Added for disassembly VST1 (multiple single elements) which stores elements to
memory from three or four registers and VST2 (multiple two-element structures)
which stores to memory from two double-spaced registers.

A8.6.391 & A8.6.393

llvm-svn: 97018
2010-02-24 02:57:20 +00:00
Johnny Chen
7e4227c8e1 Added for disassembly VLD1 (multiple single elements) which loads memory into
three or four registers and VLD2 (multiple two-element structures) which loads
memory into two double-spaced registers.

A8.6.307 & A8.6.310

llvm-svn: 96980
2010-02-23 20:51:23 +00:00
Johnny Chen
9077a6f901 Added versions of VCGE, VCGT, VCLE, and VCLT NEON instructions which compare to
(immediate #0) for disassembly only.

A8.6.283, A8.6.285, A8.6.287, A8.6.290

llvm-svn: 96856
2010-02-23 01:42:58 +00:00
Johnny Chen
b35408e8df Added VCEQ (immediate #0) NEON instruction for disassembly only.
A8.6.281

llvm-svn: 96838
2010-02-23 00:33:12 +00:00
Bob Wilson
84fc0200bd Use NEON vmin/vmax instructions for floating-point selects.
Radar 7461718.

llvm-svn: 96572
2010-02-18 06:05:53 +00:00
Bob Wilson
400e59ba21 Remove the NEON N2VSInt instruction class: it's only used in one place and
since it has no pattern, there's not much point in distinguishing an "N2VS"
class for intrinsics anyway.

llvm-svn: 96525
2010-02-17 22:42:54 +00:00
Bob Wilson
ea55421ec2 More cleanup for NEON:
* Use "S" abbreviation for scalar single FP registers in class and pattern
names, instead of keeping the "D" (for "double") abbreviation and tacking on
an "s" elsewhere in the name.
* Move the scalar single FP register classes and patterns to be more
consistent with other definitions in the file.
* Rename "VNEGf32d" definition to "VNEGfd" for consistency.
* Deleted the N2VDIntsPat pattern; N2VSPat is good enough.

llvm-svn: 96521
2010-02-17 22:23:11 +00:00
Bob Wilson
532656cffc Wrap lines to 80 columns and generally try to clean up whitespace and
indentation.  No functional changes.

llvm-svn: 96418
2010-02-17 00:31:29 +00:00
Johnny Chen
1f609fe5fd Add VBIF/VBIT for disassembly only.
A8.6.279

llvm-svn: 95713
2010-02-09 23:05:23 +00:00
Bob Wilson
ac3735b7fb Emit spaces after commas in Neon register lists. This is more consistent
with the rest of the assembly output, is easier to read, and matches the
expected output for gcc's Neon tests.

llvm-svn: 93703
2010-01-18 01:24:43 +00:00