1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 06:22:56 +02:00
Commit Graph

236 Commits

Author SHA1 Message Date
Bill Wendling
b7635b1ed3 Formatting. It's all the rage!
llvm-svn: 120533
2010-12-01 02:36:55 +00:00
Bill Wendling
8861fb7484 More refactoring. This time the T1pI pattern.
llvm-svn: 120532
2010-12-01 02:28:08 +00:00
Bill Wendling
ccfea264ff s/T1pIEncode/T1pILdStEncode/g
s/T1pIEncodeImm/T1pILdStEncodeImm/g

llvm-svn: 120524
2010-12-01 01:38:08 +00:00
Bill Wendling
517dd72f06 Renaming variables to coincide with documentation. No functionality change.
llvm-svn: 120522
2010-12-01 01:32:02 +00:00
Bill Wendling
8ebed2442e Refactor T1sI and T1sIt encodings into helper classes.
llvm-svn: 120518
2010-12-01 01:20:15 +00:00
Bill Wendling
60d0e1a06c Refactor the T1sIt encodings into a parent class to get rid of all of the "let"
statements.

llvm-svn: 120512
2010-12-01 00:48:44 +00:00
Bill Wendling
6a48b15c80 Rename operands to match ARM documentation. No functionality change.
llvm-svn: 120500
2010-11-30 23:54:45 +00:00
Bill Wendling
e85934f8a5 * Add support for encoding t_addrmode_s2 and t_addrmode_s1. They are the same as
t_addrmode_s4, but with a different scaling factor.

* Encode the Thumb1 load and store instructions. This involved a bit of
  refactoring (hi, Chris! :-). Some of the patterns became dead afterwards and
  were removed.

llvm-svn: 120482
2010-11-30 22:57:21 +00:00
Bill Wendling
ae920bcc50 Add parsing for the Thumb t_addrmode_s4 addressing mode. This can almost
certainly be made more generic. But it does allow us to parse something like:

          ldr     r3, [r2, r4]

correctly in Thumb mode.

llvm-svn: 120408
2010-11-30 07:44:32 +00:00
Bill Wendling
a3cc011fc5 Minor cleanups. No functional change.
llvm-svn: 120372
2010-11-30 00:50:22 +00:00
Bill Wendling
6bcbf9bd7c Add correct encoding for "bl __aeabi_read_tp". However, the asm matcher isn't
able to match this yet.

llvm-svn: 120369
2010-11-30 00:34:08 +00:00
Bill Wendling
7cbe5a236c Add some encoding for the adr instruction. Labels still need to be finished.
llvm-svn: 120365
2010-11-30 00:18:30 +00:00
Bill Wendling
9859e95ca2 Predicate encoding should be withing {}s. And general cleanup.
llvm-svn: 120361
2010-11-30 00:08:20 +00:00
Bill Wendling
6b680b11e8 Predicate encoding should be withing {}s.
llvm-svn: 120360
2010-11-30 00:05:25 +00:00
Evan Cheng
78baa6f30d Mark Darwin call instructions as using "r7" to prevent the frame-register
assignment instructions from being moved below / above calls.
rdar://8690640

llvm-svn: 120339
2010-11-29 22:43:27 +00:00
Bill Wendling
c2693dcc02 Thumb encodings for conditional moves.
llvm-svn: 120334
2010-11-29 22:37:46 +00:00
Bill Wendling
15e68b7a35 Refactor some of the "disassembly-only" instructions into a base class. This
reduces some code duplication.

llvm-svn: 120326
2010-11-29 22:15:03 +00:00
Jim Grosbach
3e84f9d6cb ARM Pseudo-ize tBR_JTr.
llvm-svn: 120310
2010-11-29 19:32:47 +00:00
Bill Wendling
c0055893db Add more Thumb encodings.
llvm-svn: 120279
2010-11-29 01:07:48 +00:00
Bill Wendling
b54752da15 More Thumb encodings.
llvm-svn: 120278
2010-11-29 01:00:43 +00:00
Bill Wendling
8f0b624061 Add Thumb encodings for REV instructions.
llvm-svn: 120277
2010-11-29 00:42:50 +00:00
Bill Wendling
d233cab1eb Add more Thumb encodings.
llvm-svn: 120272
2010-11-29 00:18:15 +00:00
Bill Wendling
c5ab347eb6 More Thumb encodings.
llvm-svn: 119940
2010-11-21 11:49:36 +00:00
Bill Wendling
3cce558ede - Give "trap" the correct encoding, at least according to Darwin's assembler.
- Add comments saying where the encodings for other instructions came from.

llvm-svn: 119936
2010-11-21 10:55:23 +00:00
Bill Wendling
834a3bfb92 A few more thumb instruction MC encodings.
llvm-svn: 119913
2010-11-20 22:52:33 +00:00
Bill Wendling
00481555e0 Add more Thumb add instruction encodings.
llvm-svn: 119883
2010-11-20 01:18:47 +00:00
Bill Wendling
4fb2131b0a Add Thumb encodings for some add instructions.
llvm-svn: 119882
2010-11-20 01:00:29 +00:00
Bill Wendling
cd27d03d93 Add more encodings for Thumb instructions.
llvm-svn: 119881
2010-11-20 00:53:35 +00:00
Bill Wendling
c568ce5bda Encodings for the compare instructions.
llvm-svn: 119868
2010-11-19 23:14:32 +00:00
Bill Wendling
65402c3a76 Add encodings for some of the thumb ADD instructions. Tests will come once the
asm parser can handle them.

llvm-svn: 119860
2010-11-19 22:37:33 +00:00
Bill Wendling
29f262163a Revert accidental commit.
llvm-svn: 119850
2010-11-19 22:06:18 +00:00
Bill Wendling
e2f19dfde3 Change long binary encodings to use hex instead. It's more readable. Also
initialize missing bit.

llvm-svn: 119849
2010-11-19 22:02:18 +00:00
Bill Wendling
50a1812023 Add MC encodings for some Thumb instructions. Test for a few of them. The "bx
lr" instruction cannot be tested just yet. It requires matching a "condition
code", but adding one of those makes things go south quickly...

llvm-svn: 119774
2010-11-19 01:33:10 +00:00
Jim Grosbach
2f9a2efb3c ARM PseudoInst instructions don't need or use an assembler string. Get rid of
the operand to the pattern.

llvm-svn: 119607
2010-11-18 01:38:26 +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
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
Bill Wendling
49dd03e223 Comment out the defms until they're activated.
llvm-svn: 119000
2010-11-13 11:20:05 +00:00
Bill Wendling
fadcb3cded Add uses of the *_ldst_multi multiclasses. These aren't used yet.
llvm-svn: 118999
2010-11-13 10:57:02 +00:00
Bill Wendling
184bc1368d Convert the modes to lower case.
llvm-svn: 118998
2010-11-13 10:43:34 +00:00
Bill Wendling
aa9ca6fcca Add *_ldst_mult multiclasses to the ARM back-end. These will be used in the
future to separate out the ia, ib, da, db variants of the load/store multiple
instructions.

llvm-svn: 118995
2010-11-13 09:09:38 +00:00
Jim Grosbach
c10d3f3d4b Break ARM addrmode4 (load/store multiple base address) into its constituent
parts. Represent the operation mode as an optional operand instead.
rdar://8614429

llvm-svn: 118137
2010-11-03 01:01:43 +00:00
Jim Grosbach
53d2661c60 Add 'IsThumb' predicate to patterns marked as 'IsThumb1Only'. The latter gates
codegen using the patterns; the latter gates the assembler recognizing the
instruction.

llvm-svn: 117931
2010-11-01 17:08:58 +00:00
Chris Lattner
9da275f86b reject instructions that contain a \n in their asmstring. Mark
various X86 and ARM instructions that are bitten by this as isCodeGenOnly,
as they are.

llvm-svn: 117884
2010-11-01 00:46:16 +00:00
Chris Lattner
5d088218e5 two changes: make the asmmatcher generator ignore ARM pseudos properly,
and make it a hard error for instructions to not have an asm string.
These instructions should be marked isCodeGenOnly.

llvm-svn: 117861
2010-10-31 19:15:18 +00:00
Chris Lattner
01acd65875 reapply r117858 with apparent editor malfunction fixed (somehow I
got a dulicated line).

llvm-svn: 117860
2010-10-31 19:10:56 +00:00
Chris Lattner
8132a182e7 revert r117858 while I check out a failure I missed.
llvm-svn: 117859
2010-10-31 19:05:32 +00:00
Chris Lattner
70b05a5b88 the asm matcher can't handle operands with modifiers (like ${foo:bar}).
Instead of silently ignoring these instructions, emit a hard error and
force the target author to either refactor the target or mark the 
instruction 'isCodeGenOnly'.

Mark a few instructions in ARM and MBlaze as isCodeGenOnly the are 
doing this.

llvm-svn: 117858
2010-10-31 18:48:12 +00:00
Jim Grosbach
4c7da8acbc Kill of the vestiges of the 'call' Modifier (no longer needed for PLT).
llvm-svn: 115845
2010-10-06 21:36:43 +00:00
Evan Cheng
6fbb6dea7c - Add TargetInstrInfo::getOperandLatency() to compute operand latencies. This
allow target to correctly compute latency for cases where static scheduling
  itineraries isn't sufficient. e.g. variable_ops instructions such as
  ARM::ldm.
  This also allows target without scheduling itineraries to compute operand
  latencies. e.g. X86 can return (approximated) latencies for high latency
  instructions such as division.
- Compute operand latencies for those defined by load multiple instructions,
  e.g. ldm and those used by store multiple instructions, e.g. stm.

llvm-svn: 115755
2010-10-06 06:27:31 +00:00
Jim Grosbach
619f1c1cc5 Nuke the rest of the :comment references
llvm-svn: 115373
2010-10-01 23:21:38 +00:00