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

10852 Commits

Author SHA1 Message Date
Rafael Espindola
78fc1f7f66 Produce a R_X86_64_32 when the value is >=0.
llvm-svn: 114339
2010-09-20 19:20:47 +00:00
NAKAMURA Takumi
a8d8b5f3c3 test/CodeGen/X86: Add explicit triplet -mtriple=i686-linux to 3 tests incompatible to Win32 codegen.
r114297 raises 3 failures. They might fail also on mingw.

llvm-svn: 114317
2010-09-19 21:58:55 +00:00
Eric Christopher
2901b19344 Add the exit instruction to the PTX target.
Patch by Che-Liang Chiou <clchiou@gmail.com>!

llvm-svn: 114294
2010-09-18 18:52:28 +00:00
Rafael Espindola
9c3a9bf8aa Make sure the STT_FILE symbol is the first one in the symbol table.
llvm-svn: 114285
2010-09-18 15:03:21 +00:00
Owen Anderson
015641f659 Invert the logic of reachesChainWithoutSideEffects(). What we want to check is that there is
NO path to the destination containing side effects, not that SOME path contains no side effects.
In  practice, this only manifests with CombinerAA enabled, because otherwise the chain has little
to no branching, so "any" is effectively equivalent to "all".

llvm-svn: 114268
2010-09-18 04:45:14 +00:00
Rafael Espindola
32e423fe2b Add test that was missing in my previous commit.
llvm-svn: 114248
2010-09-18 00:37:27 +00:00
Dan Gohman
e96841854e Attempt to XFAIL this test on arm-linux, which is inexplicably failing.
llvm-svn: 114241
2010-09-18 00:04:37 +00:00
Benjamin Kramer
1cad9b6521 Fix vmov.f64 disassembly on targets where sizeof(long) != 8.
llvm-svn: 114240
2010-09-17 23:48:07 +00:00
Bob Wilson
670e1915c0 Add target-specific DAG combiner for BUILD_VECTOR and VMOVRRD. An i64
value should be in GPRs when it's going to be used as a scalar, and we use
VMOVRRD to make that happen, but if the value is converted back to a vector
we need to fold to a simple bit_convert.  Radar 8407927.

llvm-svn: 114233
2010-09-17 22:59:05 +00:00
Jim Grosbach
8ae5cfffdd Teach the (non-MC) instruction printer to use the cannonical names for push/pop,
and shift instructions on ARM. Update the tests to match.

llvm-svn: 114230
2010-09-17 22:36:38 +00:00
Evan Cheng
8c2bde65f0 Teach machine sink to
1) Do forward copy propagation. This makes it easier to estimate the cost of the
   instruction being sunk.
2) Break critical edges on demand, including cases where the value is used by
   PHI nodes.
Critical edge splitting is not yet enabled by default.

llvm-svn: 114227
2010-09-17 22:28:18 +00:00
Jim Grosbach
d2cf0742a4 Update tests to handle MC-inst instruction printing of shift operations. The
legacy asm printer uses instructions of the form, "mov r0, r0, lsl #3", while
the MC-instruction printer uses the form "lsl r0, r0, #3". The latter mnemonic
is correct and preferred according the ARM documentation (A8.6.98). The former
are pseudo-instructions for the latter.

llvm-svn: 114221
2010-09-17 21:58:46 +00:00
Jim Grosbach
b86aebe2b7 FileCheck-ize
llvm-svn: 114218
2010-09-17 21:46:16 +00:00
Jim Grosbach
b21c19d666 Move thumb2 tests to the thumb2 directory
llvm-svn: 114206
2010-09-17 20:34:09 +00:00
Jim Grosbach
026811c86f tweak test to check instructions rather than relying on the comment string
llvm-svn: 114204
2010-09-17 20:27:26 +00:00
Dan Gohman
4487f42592 Fix this test to avoid an "inexact" fold.
llvm-svn: 114202
2010-09-17 20:25:43 +00:00
Dan Gohman
aaed2c137f Avoid emitting a PIC base register if no PIC addresses are needed.
This fixes rdar://8396318.

llvm-svn: 114201
2010-09-17 20:24:24 +00:00
Jim Grosbach
fd21b4bb15 tweak test to check instructions rather than relying on the comment string
llvm-svn: 114200
2010-09-17 20:21:03 +00:00
Jim Grosbach
5ca55bd98b tweak test to check instructions rather than relying on the comment string
llvm-svn: 114199
2010-09-17 20:17:41 +00:00
Dan Gohman
0e6744d219 Fix this test so that folding doesn't depend on a potentially
"inexact" result.

llvm-svn: 114198
2010-09-17 20:15:53 +00:00
Chris Lattner
4bce01542c fix rdar://8444631 - encoder crash on 'enter'
What a weird instruction.

llvm-svn: 114190
2010-09-17 18:02:29 +00:00
Daniel Dunbar
ed92665b19 MC/Mach-O/i386: Fix a crash in relocation handling.
llvm-svn: 114176
2010-09-17 15:21:50 +00:00
Oscar Fuentes
402ac1bb1c tests/CMakeLists.txt: use configure_file' instead of sed'.
The Windows users will appreciate this.

llvm-svn: 114158
2010-09-17 03:22:21 +00:00
Daniel Dunbar
a43c86b354 MC/AsmParser: Add support for 'a + 4@GOTPCREL' and friends, by reconsing the
expression to include the modifier.
 - Gross, but this a corner case we don't expect to see often in practice, but
   it is worth accepting.
 - Also improves diagnostics on invalid modifiers.

llvm-svn: 114154
2010-09-17 02:47:07 +00:00
Dan Gohman
9dc559bdef Fix the folding of floating-point math library calls, like sin(infinity),
so that it detects errors on platforms where libm doesn't set errno.
It's still subject to host libm details though.

llvm-svn: 114148
2010-09-17 01:38:06 +00:00
Devang Patel
99777d1d07 If FE forgot to provide a file name (usually it uses "stdin" as name in such situation) then make one up to ensure that debug info is not malformed.
llvm-svn: 114119
2010-09-16 20:57:49 +00:00
Chris Lattner
73fc5e794d fix rdar://8438816 - unrecognized 'fildq' instruction
llvm-svn: 114116
2010-09-16 20:46:38 +00:00
Rafael Espindola
d542892fc0 Print the address of sections as 0 and create the metadata sections in the
same order as gnu as.

llvm-svn: 114109
2010-09-16 19:46:31 +00:00
Owen Anderson
37a6d67bd6 Add missing RUN line to this test.
llvm-svn: 114106
2010-09-16 18:46:23 +00:00
Dale Johannesen
cf9dc14249 When substituting sunkaddrs into indirect arguments an asm, we were
walking the asm arguments once and stashing their Values.  This is
wrong because the same memory location can be in the list twice, and
if the first one has a sunkaddr substituted, the stashed value for the
second one will be wrong (use-after-free).  PR 8154.

llvm-svn: 114104
2010-09-16 18:30:55 +00:00
Owen Anderson
6f3516065f It is possible, under specific circumstances involving ptrtoint ConstantExpr's, for LVI to end up trying to merge
a Constant into a ConstantRange.  Handle this conservatively for now, rather than asserting.  The testcase is
more complex that I would like, but the manifestation of the problem is sensitive to iteration orders and the state of the
LVI cache, and I have not been able to reproduce it with manually constructed or simplified cases.

Fixes PR8162.

llvm-svn: 114103
2010-09-16 18:28:33 +00:00
Owen Anderson
521e8dfef8 Fix PR8161, in which an unreachable loop causes recursive instruction simplification to try
to replace an instruction with itself.  Add a predicate to the simplifier to prevent this case.

llvm-svn: 114097
2010-09-16 17:42:36 +00:00
Rafael Espindola
fa964e153e Make sure that names like .note.GNU-stack are accepted as valid section names.
llvm-svn: 114091
2010-09-16 17:05:55 +00:00
Rafael Espindola
58aa9e8010 Add support for the .zero directive.
llvm-svn: 114077
2010-09-16 15:03:59 +00:00
Kalle Raiskila
68e2c15954 Change SPU register re-interpretations from OR to COPY_TO_REGCLASS instruction.
This cleans up after the mess r108567 left in the CellSPU backend.
ORCvt-instruction were used to reinterpret registers, and the ORs were then
removed by isMoveInstr(). This patch now removes 350 instrucions of format:
	or $3, $3, $3
(from the 52 testcases in CodeGen/CellSPU). One case of a nonexistant or is
checked for.

Some moves of the form 'ori $., $., 0' and 'ai $., $., 0' still remain.

llvm-svn: 114074
2010-09-16 12:29:33 +00:00
Jim Grosbach
75ae6f4ebb add a test of an edge case value for the FP immediate (needs all digits of
precision)

llvm-svn: 114028
2010-09-15 21:52:13 +00:00
Rafael Espindola
8a987c002e Add a InitSections method to the streamer interface.
The ELF implementation now creates text, data and bss to match the gnu as
behavior.

The text streamer still has the old MachO specific behavior since
the testsuite checks that it will error when a directive is given
before a setting the current section for example.

A nice benefit is that -n is not required anymore when producing
ELF files.

llvm-svn: 114027
2010-09-15 21:48:40 +00:00
Jim Grosbach
90aca3a6bf 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
Eli Friedman
b5aea103fc 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
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
Mikhail Glushenkov
649b391de6 llvmc: make -x work with unknown suffixes.
llvm-svn: 113972
2010-09-15 15:20:41 +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