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

41486 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
Devang Patel
e15f83013d Check bb to ensure that alloca is in separate basic block.
This fixes funcargs.exp regression reported by gdb testsuite.

llvm-svn: 113992
2010-09-15 18:13:55 +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
Mikhail Glushenkov
649b391de6 llvmc: make -x work with unknown suffixes.
llvm-svn: 113972
2010-09-15 15:20:41 +00:00
Devang Patel
fbc9fca6ac If dbg.declare from non-entry block is using alloca from entry block then use offset available in StaticAllocaMap to emit DBG_VALUE. Right now, this has no material impact because varible info also collected using offset table maintained in machine module info.
llvm-svn: 113967
2010-09-15 14:48:53 +00:00
Chris Lattner
fff8e3495b lcall and ljmp always default to lcalll and ljmpl. This finally
wraps up r8418316

llvm-svn: 113949
2010-09-15 05:30:20 +00:00
Chris Lattner
726aae87ee apparently jmpl $1,$2 is an alias for ljmpl, similiarly
for call.  Add this.

llvm-svn: 113948
2010-09-15 05:25:21 +00:00
Chris Lattner
5b8a3129a5 Disambiguate lcall/ljmp to the 32-bit version. This happens
even in 64-bit mode apparently.

llvm-svn: 113945
2010-09-15 05:14:54 +00:00
Chris Lattner
e542e3e2ad fix the encoding of sldt GR16 to have the 0x66 prefix, and
add sldt GR32, which isn't documented in the intel manual
but which gas accepts.  Part of rdar://8418316

llvm-svn: 113938
2010-09-15 04:45:10 +00:00
Chris Lattner
c4a2e044f3 implement aliases for shld/shrd, part of rdar://8418316
llvm-svn: 113937
2010-09-15 04:37:18 +00:00
Chris Lattner
ad73a2623c fix rdar://8431880 - rcl/rcr with no shift amount not recognized
llvm-svn: 113936
2010-09-15 04:33:27 +00:00
Chris Lattner
c48bd41698 add various broken forms of fnstsw. I didn't add the %rax
version because it adds a prefix and makes even less sense
than the other broken forms.  This wraps up rdar://8431422

llvm-svn: 113932
2010-09-15 04:15:16 +00:00
Chris Lattner
b6167a8674 add some aliases for f[u]comi, part of rdar://8431422
llvm-svn: 113930
2010-09-15 04:08:38 +00:00
Chris Lattner
c9f1a5cd94 add a bunch of aliases for fp operations with no operand,
rdar://8431422

llvm-svn: 113929
2010-09-15 04:04:33 +00:00
Chris Lattner
a9a15c74b1 Diagnose invalid instructions like "incl" with "too few operands for instruction"
instead of crashing.  This fixes:
rdar://8431815 - crash when invalid operand is one that isn't present

llvm-svn: 113921
2010-09-15 03:50:11 +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
050a857211 trailing whitespace
llvm-svn: 113915
2010-09-15 01:01:45 +00:00
Dale Johannesen
c7739ca945 Add x86MMX a few more places.
llvm-svn: 113914
2010-09-15 00:52:23 +00:00
Chris Lattner
8729e47b8f fix PR8144, a bug where constant merge would merge globals marked
attribute(used).

llvm-svn: 113911
2010-09-15 00:30:11 +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
Chris Lattner
cd4eadce11 add a terrible hack to allow out with dx is parens, a gas bug.
This fixes PR8114

llvm-svn: 113894
2010-09-14 23:34:29 +00:00
Dan Gohman
a2e5bf005e Convert TBAA to use the new TBAATag field of AliasAnalysis::Location.
llvm-svn: 113892
2010-09-14 23:28:12 +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
Dan Gohman
ebbc4df924 Remove the experimental AliasAnalysis::getDependency interface, which
isn't a good level of abstraction for memdep. Instead, generalize
AliasAnalysis::alias and related interfaces with a new Location
class for describing a memory location. For now, this is the same
Pointer and Size as before, plus an additional field for a TBAA tag.

Also, introduce a fixed MD_tbaa metadata tag kind.

llvm-svn: 113858
2010-09-14 21:25:10 +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
Owen Anderson
9f8f48f221 Remove the option to disable LazyValueInfo in JumpThreading, as it is now
on by default and has received significant testing.

llvm-svn: 113852
2010-09-14 20:57:41 +00:00
Gabor Greif
32fefaf320 set comparable for a bunch of Thumb instructions
llvm-svn: 113849
2010-09-14 20:47:43 +00:00
Gabor Greif
bd0b1357e0 must not peephole away side effects
llvm-svn: 113848
2010-09-14 20:46:08 +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
Devang Patel
632686ac96 Use frame index, if available for byval argument while lowering dbg_declare. Otherwise let getRegForValue() find register for this argument.
llvm-svn: 113843
2010-09-14 20:29:31 +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
26fe225080 CBackend: Fix MSVC build.
This may produce warnings on MSVS, but it's better than failures.

llvm-svn: 113834
2010-09-14 04:27:38 +00:00