1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

3072 Commits

Author SHA1 Message Date
Jim Grosbach
8a4ae35eed Refactor uses of getRegisterNumbering() to not need the isSPVFP argument. Check
if the register is a member of the SPR register class directly instead.

llvm-svn: 114012
2010-09-15 19:44:57 +00:00
Jim Grosbach
c0b045a0ef Reduce dependencies in the ARM MC instruction printer.
llvm-svn: 114009
2010-09-15 19:27:50 +00:00
Jim Grosbach
c74aeaa1c2 Fix spelling typo.
llvm-svn: 114008
2010-09-15 19:26:50 +00:00
Jim Grosbach
00f9682efa Factor out basic enums and hleper functions from ARM.h for cleaner sharing
between the compiler back end and the MC libraries.

llvm-svn: 114007
2010-09-15 19:26:06 +00:00
Jim Grosbach
62fb975e6e Add support for floating point immediates to MC instruction printing. ARM
VFP instructions use it for loading some constants, so implement that
handling.

Not thrilled with adding a member to MCOperand, but not sure there's much of
a better option that's not pretty fragile (like putting a double in the
union instead and just assuming that's good enough). Suggestions welcome...

llvm-svn: 113996
2010-09-15 18:47:08 +00:00
Jakob Stoklund Olesen
36aeeb67c3 Recognize VST1q64Pseudo and VSTMQ as stack slot stores.
Recognize VLD1q64Pseudo as a stack slot load.

Reject these if they are loading or storing a subregister. The API (and
VirtRegRewriter) doesn't know how to deal with that.

llvm-svn: 113985
2010-09-15 17:27:09 +00:00
Bob Wilson
e7e2f983e5 Reapply Gabor's 113839, 113840, and 113876 with a fix for a problem
encountered while building llvm-gcc for arm.  This is probably the same issue
that the ppc buildbot hit. llvm::prior works on a MachineBasicBlock::iterator,
not a plain MachineInstr.

llvm-svn: 113983
2010-09-15 17:12:08 +00:00
Gabor Greif
f7635897c8 the darwin9-powerpc buildbot keeps consistently crashing,
backing out following to get it back to green,
so I can investigate in peace:

svn merge -c -113840  llvm/test/CodeGen/ARM/arm-and-tst-peephole.ll
svn merge -c -113876 -c -113839 llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp

llvm-svn: 113980
2010-09-15 16:53:07 +00:00
Jakob Stoklund Olesen
4a043370c4 Move ARM is{LoadFrom,StoreTo}StackSlot closer to their siblings so they won't be
forgotten in the future.

Coalesce identical cases in switch.

No functional changes intended.

llvm-svn: 113979
2010-09-15 16:36:26 +00:00
Bob Wilson
eb520cd057 Spelling fix.
llvm-svn: 113978
2010-09-15 16:28:21 +00:00
Bob Wilson
9d68270b2e Use VLD1/VST1 pseudo instructions for loadRegFromStackSlot and
storeRegToStackSlot.

llvm-svn: 113918
2010-09-15 01:48:05 +00:00
Jim Grosbach
901a646188 Reapply r113875 with additional cleanups.
"The register specified for a dregpair is the corresponding Q register, so to
get the pair, we need to look up the sub-regs based on the qreg. Create a
lookup function since we don't have access to TargetRegisterInfo here to
be able to use getSubReg(ARM::dsub_[01])."

Additionaly, fix the NEON VLD1* and VST1* instruction patterns not to use
the dregpair modifier for the 2xdreg versions. Explicitly specifying the two
registers as operands is more correct and more consistent with the other
instruction patterns. This enables further cleanup of special case code in the
disassembler as a nice side-effect.

llvm-svn: 113903
2010-09-14 23:54:06 +00:00
Eric Christopher
c6075a71ad Emit libcalls for SDIV, this requires some call infrastructure
that needs to be shared a bit more widely around.

llvm-svn: 113886
2010-09-14 23:03:37 +00:00
Jim Grosbach
d7e8d8c018 revert 113875 momentarilly. Need to fix the MC disassembler to handle the
change.

llvm-svn: 113878
2010-09-14 22:38:39 +00:00
Jim Grosbach
12d12f92ff trailing whitespace cleanup
llvm-svn: 113877
2010-09-14 22:27:15 +00:00
Gabor Greif
8856ba094b an attempt to salvage the darwin9-powerpc buildbot, which could be miscompiling this line
llvm-svn: 113876
2010-09-14 22:25:16 +00:00
Jim Grosbach
d338306232 The register specified for a dregpair is the corresponding Q register, so to
get the pair, we need to look up the sub-regs based on the qreg. Create a
lookup function since we don't have access to TargetRegisterInfo here to
be able to use getSubReg(ARM::dsub_[01]).

llvm-svn: 113875
2010-09-14 22:20:33 +00:00
Gabor Greif
a9a9743d0d set isCompare for another three Thumb1 instructions
llvm-svn: 113867
2010-09-14 22:00:50 +00:00
Jim Grosbach
a43d109cb3 Add predicate and 's' bit operands to PICADD instruction lowering.
llvm-svn: 113860
2010-09-14 21:28:17 +00:00
Bob Wilson
fcca92b837 Avoid warnings.
llvm-svn: 113857
2010-09-14 21:12:05 +00:00
Jim Grosbach
6ade4ae68d fix comment typo
llvm-svn: 113856
2010-09-14 21:05:34 +00:00
Bob Wilson
1a69820d6d Make NEON ld/st pseudo instruction classes take the instruction itinerary as
an argument, so that we can distinguish instructions with the same register
classes but different numbers of registers (e.g., vld3 and vld4).  Fix some
of the non-pseudo NEON ld/st instruction itineraries to reflect the number
of registers loaded or stored, not just the opcode name.

llvm-svn: 113854
2010-09-14 20:59:49 +00:00
Gabor Greif
32fefaf320 set comparable for a bunch of Thumb instructions
llvm-svn: 113849
2010-09-14 20:47:43 +00:00
Jim Grosbach
caaab2a7af Don't ignore the CPSR implicit def when lowering a MachineInstruction to an MCInst.
llvm-svn: 113847
2010-09-14 20:41:27 +00:00
Jim Grosbach
c04a3f0ae5 Clarify comment
llvm-svn: 113846
2010-09-14 20:35:46 +00:00
Gabor Greif
357e2fe748 Eliminate a 'tst' that immediately follows an 'and'
by morphing the 'and' to its recording form 'andS'.

This is basically a test commit into this area, to
see whether the bots like me. Several generalizations
can be applied and various avenues of code simplification
are open. I'll introduce those as I go.

I am aware of stylistic input from Bill Wendling, about
where put the analysis complexity, but I am positive
that we can move things around easily and will find a
satisfactory solution.

llvm-svn: 113839
2010-09-14 09:23:22 +00:00
Eric Christopher
3d2aa0da5f Fix QOpcode assignment to Opc.
llvm-svn: 113837
2010-09-14 08:31:25 +00:00
Michael J. Spencer
90f807fda5 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Bob Wilson
ba02d5b620 Convert some VTBL and VTBX instructions to use pseudo instructions prior to
register allocation.  Remove the NEONPreAllocPass, which is no longer needed.
Yeah!!

llvm-svn: 113818
2010-09-13 23:55:10 +00:00
Bob Wilson
6f35180bec Switch all the NEON vld-lane and vst-lane instructions over to the new
pseudo-instruction approach.  Change ARMExpandPseudoInsts to use a table
to record all the NEON load/store information.

llvm-svn: 113812
2010-09-13 23:01:35 +00:00
Jim Grosbach
a02bbe95be trailing whitespace
llvm-svn: 113768
2010-09-13 18:25:42 +00:00
Chris Lattner
ffe1efe7ef fix the asmparser so that the target is responsible for skipping to
the end of the line on a parser error, allowing skipping to happen
for syntactic errors but not for semantic errors.  Before we would
miss emitting a diagnostic about the second line, because we skipped
it due to the semantic error on the first line:

  foo %eax
  bar %al

This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors

llvm-svn: 113688
2010-09-11 16:18:25 +00:00
Bill Wendling
038bcd275f Rename ConvertToSetZeroFlag to something more general.
llvm-svn: 113670
2010-09-11 00:13:50 +00:00
Bill Wendling
f2b0c99610 No need to recompute the SrcReg and CmpValue.
llvm-svn: 113666
2010-09-10 23:46:12 +00:00
Bill Wendling
e54ebc2cbe Move some of the decision logic for converting an instruction into one that sets
the 'zero' bit down into the back-end. There are other cases where this logic
isn't sufficient, so they should be handled separately.

llvm-svn: 113665
2010-09-10 23:34:19 +00:00
Eric Christopher
01d361f9ed Start sketching out ARM fast-isel calls.
llvm-svn: 113662
2010-09-10 23:18:12 +00:00
Eric Christopher
1364e542aa For consistency.
llvm-svn: 113659
2010-09-10 23:10:30 +00:00
Eric Christopher
4bfc1207f1 Newline at end of file.
llvm-svn: 113654
2010-09-10 22:46:03 +00:00
Eric Christopher
ae179e4cbd Split out some of the calling convention bits so that they can be
used for fast-isel.

llvm-svn: 113652
2010-09-10 22:42:06 +00:00
Bill Wendling
dc260a07f6 Modify the comparison optimizations in the peephole optimizer to update the
iterator when an optimization took place. This allows us to do more insane
things with the code than just remove an instruction or two.

llvm-svn: 113640
2010-09-10 21:55:43 +00:00
Jim Grosbach
ee00b86416 Add a missing case to duplicateCPV() for LSDA constants. Add a FIXME. rdar://8302157
llvm-svn: 113637
2010-09-10 21:38:22 +00:00
Michael J. Spencer
98ad3f2ea7 CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Bob Wilson
027c57accb Calculate the number of VLDM/VSTM registers by subtracting the number of
fixed operands from the total number of operands (including the variadic ones).

llvm-svn: 113597
2010-09-10 18:25:35 +00:00
Bill Wendling
6cc7baa725 Reword since this may not be a bug but intended behavior.
llvm-svn: 113584
2010-09-10 10:31:11 +00:00
Bob Wilson
01b7bf3510 Fix merging base-updates for VLDM/VSTM: Before I switched these instructions
to use AddrMode4, there was a count of the registers stored in one of the
operands.  I changed that to just count the operands but forgot to adjust for
the size of D registers.  This was noticed by Evan as a performance problem
but it is a potential correctness bug as well, since it is possible that this
could merge a base update with a non-matching immediate.

llvm-svn: 113576
2010-09-10 05:15:04 +00:00
Evan Cheng
c9cb37516d Teach if-converter to be more careful with predicating instructions that would
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.

llvm-svn: 113570
2010-09-10 01:29:16 +00:00
Eric Christopher
54e138031e Fix build error.
llvm-svn: 113566
2010-09-10 00:35:09 +00:00
Eric Christopher
92506682eb Update comments, reorganize some code, rename variables to be
more clear.  No functional change.

llvm-svn: 113565
2010-09-10 00:34:35 +00:00
Eric Christopher
06f4af2ef4 64-bit fp loads can come straight out of the constant pool, not as
bad as I'd thought.

llvm-svn: 113561
2010-09-09 23:50:00 +00:00
Eric Christopher
3c86728bd6 SIToFP and FPToSI conversions work only on fp-reg to fp-reg. Move
some data around and implement a couple of move routines to do this.

llvm-svn: 113546
2010-09-09 21:44:45 +00:00