1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
Commit Graph

2029 Commits

Author SHA1 Message Date
Bob Wilson
b3f9b6c2d5 Add explicit casts for vector arguments to Neon builtins.
This avoids warnings with -Wvector-conversions.  Radar 8228022.

llvm-svn: 120597
2010-12-01 19:49:58 +00:00
Bob Wilson
b2affb91cd Add some comments for TableGen's NeonEmitter.
llvm-svn: 120596
2010-12-01 19:49:56 +00:00
Bob Wilson
84b6b4c00e Cleanup: simplify checks for integers between 2 and 4.
llvm-svn: 120595
2010-12-01 19:49:51 +00:00
Jim Grosbach
b2a12afa5f Refactor LEApcrelJT as a pseudo-instructionlowered to a cannonical ADR
instruction at MC lowering. Add binary encoding information for the ADR,
including fixup data for the label operand.

llvm-svn: 120594
2010-12-01 19:47:31 +00:00
Owen Anderson
5aff471eb8 Simplify the encoding of reg+/-imm12 values that allow PC-relative encoding. This allows the
Thumb2 encoding to share code with the ARM encoding, which gets use fixup support for free.
It also allows us to fold away at least one codegen-only pattern.

llvm-svn: 120481
2010-11-30 22:45:47 +00:00
Owen Anderson
5f7b3e919b Add encoding support for Thumb2 PLD and PLI instructions.
llvm-svn: 120449
2010-11-30 19:19:31 +00:00
Jim Grosbach
7ae5c75ab7 The VLDMQ/VSTMQ instructions are reprented as true Pseudo-insts now (i.e.,
no extra encoding information), so we no longer need to special case them
here.

llvm-svn: 120444
2010-11-30 19:08:32 +00:00
Jim Grosbach
6a976d0827 Tidy up.
llvm-svn: 120443
2010-11-30 19:00:13 +00:00
Jim Grosbach
d79a0ce6e7 Delete a few no longer needed references to pseudos.
llvm-svn: 120441
2010-11-30 18:56:13 +00:00
Bob Wilson
f5eece615c Fix the encoding of VLD4-dup alignment.
The only reasonable way I could find to do this is to provide an alternate
version of the addrmode6 operand with a different encoding function.  Use it
for all the VLD-dup instructions for the sake of consistency.

llvm-svn: 120358
2010-11-30 00:00:42 +00:00
Jim Grosbach
89e90b7310 Pseudo-ize Thumb2 jump tables with explicit MC lowering to the raw
instructions. This simplifies instruction printing and disassembly.

llvm-svn: 120333
2010-11-29 22:37:40 +00:00
Jim Grosbach
71042b51a1 Rename t2 TBB and TBH instructions to reference that they encode the jump table
data. Next up, pseudo-izing them.

llvm-svn: 120320
2010-11-29 21:28:32 +00:00
Michael J. Spencer
4a63404543 I swear I did a make clean and make before committing all this...
llvm-svn: 120304
2010-11-29 18:47:54 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Bob Wilson
77071bcf8a Fix copy-and-paste error in exception message.
llvm-svn: 120033
2010-11-23 19:38:34 +00:00
Jason W Kim
331b7407c8 Fix .o emission of ARM movt/movw. MCSymbolRefExpr::VK_ARM_(HI||LO)16 for the .o path now works for ARM.
Note: lo16AllZero remains in ARMInstrInfo.td - It can be factored out when Thumb movt is repaired.
Existing tests cover this update.

llvm-svn: 119760
2010-11-18 23:37:15 +00:00
Bill Wendling
0139d909bd Give the exclamation point a name instead of a number.
llvm-svn: 119759
2010-11-18 23:36:54 +00:00
Bob Wilson
a9561a6257 Change the 'x' type modifier for Neon intrinsics to force a signed integer.
This makes it symmetric with the 'u' modifier that forces an unsigned type.
This is needed for unsigned vector shifts, where the shift amount still needs
to be signed.  PR8482 (Radar 8603521).

llvm-svn: 119742
2010-11-18 21:43:22 +00:00
Evan Cheng
ce610bd6b3 Remove ARM isel hacks that fold large immediates into a pair of add, sub, and,
and xor. The 32-bit move immediates can be hoisted out of loops by machine
LICM but the isel hacks were preventing them.

Instead, let peephole optimization pass recognize registers that are defined by
immediates and the ARM target hook will fold the immediates in.

Other changes include 1) do not fold and / xor into cmp to isel TST / TEQ
instructions if there are multiple uses. This happens when the 'and' is live
out, machine sink would have sinked the computation and that ends up pessimizing
code. The peephole pass would recognize situations where the 'and' can be
toggled to define CPSR and eliminate the comparison anyway.

2) Move peephole pass to after machine LICM, sink, and CSE to avoid blocking
important optimizations.

rdar://8663787, rdar://8241368

llvm-svn: 119548
2010-11-17 20:13:28 +00:00
Bill Wendling
f0a1acba8c Proper encoding for VLDM and VSTM instructions. The register lists for these
instructions have to distinguish between lists of single- and double-precision
registers in order for the ASM matcher to do a proper job. In all other
respects, a list of single- or double-precision registers are the same as a list
of GPR registers.

llvm-svn: 119460
2010-11-17 04:32:08 +00:00
Bob Wilson
2f7de3aad6 Use new neon_vector_type and neon_polyvector_type attributes for Neon vectors.
llvm-svn: 119406
2010-11-16 23:57:06 +00:00
Bob Wilson
b48fd4816a Change Neon polynomial types to be signed to match GCC.
llvm-svn: 119405
2010-11-16 23:57:03 +00:00
Bob Wilson
f2bb931c9f Refactor to new GetNumElements function.
No functional change.

llvm-svn: 119404
2010-11-16 23:57:01 +00:00
Bob Wilson
efff1285d2 Tidy up some things in <arm_neon.h>.
Stop defining types with "__neon_" prefixes and then using typedefs without
the prefix; there's no reason to do that anymore.  Remove types that combine
multiple Neon vectors and treat them as a single long vector; they are not
used.

llvm-svn: 119369
2010-11-16 19:39:14 +00:00
Bob Wilson
808941eb3b Reapply "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
I've temporarily disabled the failing clang test.

llvm-svn: 119367
2010-11-16 19:16:06 +00:00
Bob Wilson
e1e6afe51b Revert "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
It's breaking buildbots.

llvm-svn: 119363
2010-11-16 18:43:07 +00:00
Bob Wilson
c33bc803b5 Stop using struct wrappers for Neon vector types in <arm_neon.h>.
Thanks to Nate Begeman for an earlier version of this patch.

llvm-svn: 119358
2010-11-16 18:17:03 +00:00
Bill Wendling
b450d320ec Encode the multi-load/store instructions with their respective modes ('ia',
'db', 'ib', 'da') instead of having that mode as a separate field in the
instruction. It's more convenient for the asm parser and much more readable for
humans.
<rdar://problem/8654088>

llvm-svn: 119310
2010-11-16 01:16:36 +00:00
Chris Lattner
de919e1958 pull the code to get the operand value out of the loop.
llvm-svn: 119130
2010-11-15 07:09:28 +00:00
Chris Lattner
af5f044932 split the giant encoder loop into two new helper functions.
llvm-svn: 119129
2010-11-15 06:59:17 +00:00
Chris Lattner
0812a5ee5d reduce nesting and minor cleanups, no functionality change.
llvm-svn: 119128
2010-11-15 06:42:13 +00:00
Chris Lattner
b2daeac125 add fields to the .td files unconditionally, simplifying tblgen a bit.
Switch the ARM backend to use 'let' instead of 'set' with this change.

llvm-svn: 119120
2010-11-15 05:19:05 +00:00
Jim Grosbach
cc8e5dc0c6 ARM fixup encoding for direct call instructions (BL).
llvm-svn: 118829
2010-11-11 20:05:40 +00:00
Owen Anderson
f2e9cc82db Add support for specifying a PostEncoderMethod, which can perform post-processing after the automated encoding of an instruction.
Not yet used.

llvm-svn: 118759
2010-11-11 01:19:24 +00:00
Dan Gohman
04e46fa78b Rename AccessesArguments and AccessesArgumentsReadonly, and rewrite
their comments.

llvm-svn: 118696
2010-11-10 18:30:00 +00:00
Dan Gohman
357342a9b8 Translate IntrReadArgMem to AccessesArgumentsReadonly.
llvm-svn: 118622
2010-11-09 20:07:20 +00:00
Chris Lattner
3ccd1e1530 pass literals like $$1 through to the asm matcher. This isn't right yet, but doesn't hurt.
llvm-svn: 118359
2010-11-06 22:06:03 +00:00
Chris Lattner
4834890f0a add (and document) the ability for alias results to have
fixed physical registers.  Start moving fp comparison
aliases to the .td file (which default to using %st1 if
nothing is specified).

llvm-svn: 118352
2010-11-06 19:57:21 +00:00
Chris Lattner
c0e756dc47 generalize alias support to allow the result of an alias to
add fixed immediate values.  Move the aad and aam aliases to
use this, and document it.

llvm-svn: 118350
2010-11-06 19:25:43 +00:00
Chris Lattner
637f4910c3 fix a bug where we had an implicit assumption that the
result instruction operand numbering matched the result pattern.

Fixing this allows us to move the xchg/test aliases to the .td file.

llvm-svn: 118334
2010-11-06 08:20:59 +00:00
Chris Lattner
ec0ef3385d fix some bugs in the alias support, unblocking changing of "clr" aliases
from c++ hacks to proper .td InstAlias definitions.  Change them!

llvm-svn: 118330
2010-11-06 07:31:43 +00:00
Chris Lattner
5d1361e9ed Reimplement BuildResultOperands to be in terms of the result instruction's
operand list instead of the operand list redundantly declared on the alias
or instruction.

With this change, we finally remove the ins/outs list on the alias.  Before:
  def : InstAlias<(outs GR16:$dst), (ins GR8 :$src),
                  "movsx $src, $dst",
                  (MOVSX16rr8W GR16:$dst, GR8:$src)>;
After:
  def : InstAlias<"movsx $src, $dst",
                  (MOVSX16rr8W GR16:$dst, GR8:$src)>;

This also makes the alias mechanism more general and powerful, which will
be exploited in subsequent patches.

llvm-svn: 118329
2010-11-06 07:14:44 +00:00
Chris Lattner
8980fe2e61 implement more checking to reject things like:
(someinst GR16:$foo, GR32:$foo)

Reimplement BuildAliasOperandReference to be correctly
based on the names of operands in the result pattern,
instead of on the instruction operand definitions.

llvm-svn: 118328
2010-11-06 07:06:09 +00:00
Chris Lattner
79e558f9c5 decode and validate instruction alias result definitions.
llvm-svn: 118327
2010-11-06 06:54:38 +00:00
Chris Lattner
9365c2366f simplify
llvm-svn: 118326
2010-11-06 06:45:08 +00:00
Chris Lattner
b6cc82ecd7 fix another fixme, replacing a string with a semantic pointer.
llvm-svn: 118325
2010-11-06 06:43:11 +00:00
Chris Lattner
99f3490b0c disolve a hack, having CodeGenInstAlias decode the alias in the .td
file instead of the asmmatcher.

llvm-svn: 118324
2010-11-06 06:39:47 +00:00
Duncan Sands
3bf2a701a5 In the calling convention logic, ValVT is always a legal type,
and as such can be represented by an MVT - the more complicated
EVT is not needed.  Use MVT for ValVT everywhere.

llvm-svn: 118245
2010-11-04 10:49:57 +00:00
Chris Lattner
a55b12911d partition operand processing between aliases and instructions.
Right now the code is partitioned but the behavior is the same.
This should be improved in the near future.   This removes some
uses of TheOperandList.

llvm-svn: 118232
2010-11-04 02:11:18 +00:00
Chris Lattner
21179e333e pull name slicing out of BuildInstructionOperandReference so
it doesn't do any lexical stuff anymore.

llvm-svn: 118230
2010-11-04 01:58:23 +00:00