Commit Graph

41492 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 44857a38fa Remember VLDMQ.
llvm-svn: 114026
2010-09-15 21:40:11 +00:00
Jakob Stoklund Olesen b929c7173d Add missing break.
llvm-svn: 114025
2010-09-15 21:40:09 +00:00
Jim Grosbach 27ab5fbd2b Teach the MC disassembler to handle vmov.f32 and vmov.f64 immediate to register
moves. Previously, the immediate was printed as the encoded integer value,
which is incorrect.

llvm-svn: 114021
2010-09-15 21:04:54 +00:00
Jim Grosbach 40e85fbf17 move getRegisterNumbering() to out of ARMBaseRegisterInfo into the helper
functions in ARMBaseInfo.h so it can be used in the MC library as well.
For anything bigger than this, we may want a means to have a small support
library for shared helper functions like this. Cross that bridge when we
come to it.

llvm-svn: 114016
2010-09-15 20:26:25 +00:00
Eli Friedman ab3a128582 PR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bit
targets.

llvm-svn: 114015
2010-09-15 20:08:03 +00:00
Jim Grosbach 9569567255 simplify getRegisterNumbering(). Remove the unused isSPVFP argument and
merge the common cases.

llvm-svn: 114013
2010-09-15 19:52:17 +00:00
Jim Grosbach 789ca9a1e9 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 29fe94e75e Reduce dependencies in the ARM MC instruction printer.
llvm-svn: 114009
2010-09-15 19:27:50 +00:00
Jim Grosbach 2b48b5557a Fix spelling typo.
llvm-svn: 114008
2010-09-15 19:26:50 +00:00
Jim Grosbach 91fbd8f86e 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 7bbf3fd0d6 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 46b96c4ba0 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 33005d1327 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 660d7ecf32 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 9ae4b271f2 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 11f5be3b86 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 2c00b5098a Spelling fix.
llvm-svn: 113978
2010-09-15 16:28:21 +00:00
Mikhail Glushenkov 0c99d12208 llvmc: make -x work with unknown suffixes.
llvm-svn: 113972
2010-09-15 15:20:41 +00:00
Devang Patel da25de8096 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 ee7e6f42f8 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 09bfe645f6 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 6757eae45e 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 5be87c619b 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 6b40b0def1 implement aliases for shld/shrd, part of rdar://8418316
llvm-svn: 113937
2010-09-15 04:37:18 +00:00
Chris Lattner 4bd21710b6 fix rdar://8431880 - rcl/rcr with no shift amount not recognized
llvm-svn: 113936
2010-09-15 04:33:27 +00:00
Chris Lattner 81ce173860 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 7df35dbd19 add some aliases for f[u]comi, part of rdar://8431422
llvm-svn: 113930
2010-09-15 04:08:38 +00:00
Chris Lattner 4dbcba0082 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 d28452d94a 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 b1e9d4bff1 Use VLD1/VST1 pseudo instructions for loadRegFromStackSlot and
storeRegToStackSlot.

llvm-svn: 113918
2010-09-15 01:48:05 +00:00
Jim Grosbach 95ede4d3b6 trailing whitespace
llvm-svn: 113915
2010-09-15 01:01:45 +00:00
Dale Johannesen 51fd822634 Add x86MMX a few more places.
llvm-svn: 113914
2010-09-15 00:52:23 +00:00
Chris Lattner 67e534505d 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 c7cf42d80b 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 5f2311dc29 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 e0386dbef1 Convert TBAA to use the new TBAATag field of AliasAnalysis::Location.
llvm-svn: 113892
2010-09-14 23:28:12 +00:00
Eric Christopher 8b9126694d 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 c07b2afe5e 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 29cad6c2fc trailing whitespace cleanup
llvm-svn: 113877
2010-09-14 22:27:15 +00:00
Gabor Greif b54e9387ab 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 b523be2bb3 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 22f6922505 set isCompare for another three Thumb1 instructions
llvm-svn: 113867
2010-09-14 22:00:50 +00:00
Jim Grosbach a244f70113 Add predicate and 's' bit operands to PICADD instruction lowering.
llvm-svn: 113860
2010-09-14 21:28:17 +00:00
Dan Gohman 41f14cf3e9 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 62e9a052b9 Avoid warnings.
llvm-svn: 113857
2010-09-14 21:12:05 +00:00
Jim Grosbach 7ae94222cd fix comment typo
llvm-svn: 113856
2010-09-14 21:05:34 +00:00
Bob Wilson dd29db5635 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 d361aac3d0 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 2afac8e9bd set comparable for a bunch of Thumb instructions
llvm-svn: 113849
2010-09-14 20:47:43 +00:00
Gabor Greif f08b36d386 must not peephole away side effects
llvm-svn: 113848
2010-09-14 20:46:08 +00:00