1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

49920 Commits

Author SHA1 Message Date
Dan Gohman
f146ba8b3d cerr isn't buffered so it doesn't need to be flushed.
llvm-svn: 78135
2009-08-05 00:44:01 +00:00
Dan Gohman
47a3558350 lli doesn't need <iostream> anymore.
llvm-svn: 78133
2009-08-05 00:28:59 +00:00
Dan Gohman
587b5b9682 Remove needless uses of std::flush in the parent process after a
fork call. This eliminates a need for <iostream>. Also remove
needless fsync calls.

llvm-svn: 78131
2009-08-05 00:17:00 +00:00
Owen Anderson
a5347b5aca Privatize the PointerType factory.
llvm-svn: 78130
2009-08-05 00:15:12 +00:00
Bruno Cardoso Lopes
21bb984953 1) Proper emit displacements for x86, using absolute relocations where necessary
for ELF to work.  
2) RIP addressing: Use SIB bytes for absolute relocations where RegBase=0, 
IndexReg=0.
3) The JIT can get the real address of cstpools and jmptables during
code emission, fix that for object code emission

llvm-svn: 78129
2009-08-05 00:11:21 +00:00
Dan Gohman
a8cb86c0f5 Use _exit rather than exit in the child process after a failed exec.
Add a comment explaining why.

llvm-svn: 78128
2009-08-05 00:09:12 +00:00
Jeffrey Yasskin
61af405985 Make ExecutionEngine::updateGlobalMapping(GV, NULL) properly remove GV's old
address from the reverse mapping, and add a test that this works now.

llvm-svn: 78127
2009-08-04 23:53:16 +00:00
Evan Cheng
e366789b50 Fix part 1 of pr4682. PICADD is a 16-bit instruction even in thumb2 mode.
llvm-svn: 78126
2009-08-04 23:47:55 +00:00
Owen Anderson
fc36f154f0 Privatize the VectorType uniquing.
llvm-svn: 78125
2009-08-04 23:47:44 +00:00
Owen Anderson
1e9c498548 Begin the process of privatizing the type uniquing tables. No API changes yet, but there will be in the near future.
llvm-svn: 78122
2009-08-04 23:33:01 +00:00
Dan Gohman
bee2eedb5f Check for !isa<Constant> instead of isa<Instruction>. This
matches what the comment says, and it avoids spurious BitCast
instructions for Argument values.

llvm-svn: 78121
2009-08-04 23:23:56 +00:00
Dan Gohman
a9ceec3d38 Follow Unix behavior and return 127 if the command is not found,
and 126 if it is not executable.

llvm-svn: 78120
2009-08-04 23:15:49 +00:00
Chris Lattner
46f946526c revert r78048, it isn't worth using assertingvh here.
llvm-svn: 78119
2009-08-04 23:07:12 +00:00
Benjamin Kramer
3e1cc79a16 Update CMakeLists.
llvm-svn: 78118
2009-08-04 23:02:53 +00:00
Owen Anderson
6d699fa39d It helps if I remember to actually add the file...
llvm-svn: 78116
2009-08-04 22:55:26 +00:00
Owen Anderson
cf2c39dc30 Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
not hideous.  Also, fix some MSVC compile errors.

llvm-svn: 78115
2009-08-04 22:41:48 +00:00
Evan Cheng
7963a20a2d Fix test.
llvm-svn: 78113
2009-08-04 22:22:58 +00:00
Bob Wilson
36d2cedfcb Convert more Neon tests to use FileCheck.
llvm-svn: 78111
2009-08-04 22:01:41 +00:00
Bob Wilson
3607eeebfa Replace dregsingle operand modifier with explicit escaped curly brackets.
For other VLDn and VSTn operations, we need to list the multiple registers
explicitly anyway, so there's no point in special-casing this one usage.

llvm-svn: 78109
2009-08-04 21:39:33 +00:00
Bob Wilson
423086a047 Convert a few Neon tests to use FileCheck.
llvm-svn: 78108
2009-08-04 21:33:22 +00:00
Jakob Stoklund Olesen
5edb25cd45 Clean up the handling of two-address operands in RegScavenger.
This fixes PR4528.

llvm-svn: 78107
2009-08-04 21:30:30 +00:00
Jakob Stoklund Olesen
ff531b7e7a Don't give implicit machine operands special treatment in the register scavenger.
Imp-def is *not* allowed to redefine a live register.
Imp-use is *not* allowed to use a dead register.

llvm-svn: 78106
2009-08-04 21:29:11 +00:00
Mike Stump
ba093f21d7 Restlyize to match other targets, fixes cmake build to boot.
llvm-svn: 78105
2009-08-04 21:27:06 +00:00
Evan Cheng
2ec9ab08d8 Enable load / store multiple pass for Thumb2. It's not using ldrd / strd yet.
llvm-svn: 78104
2009-08-04 21:12:13 +00:00
Chris Lattner
ab57a6c861 remove a random reference to subtarget. Even without this, we
still get "intel syntax" instructions from llc with  
-x86-asm-syntax=intel

llvm-svn: 78103
2009-08-04 21:12:08 +00:00
David Goodwin
648590849c Add NEON single-precision FP support for fabs and fneg.
llvm-svn: 78101
2009-08-04 20:39:05 +00:00
Daniel Dunbar
e8765055ab TableGen / AsmMatcher: Tweaks to avoid generating completely bogus match
functions.
 - Fix variant flattening when the variant embeds an operand reference.

 - Ignore instructions which reference an operand multiple times (e.g., "xorb
   $dst, $dst"), and operands which have extra flags (e.g., "$dst:subreg32").

llvm-svn: 78099
2009-08-04 20:36:45 +00:00
Daniel Dunbar
6a5b6a721e When exec() fails, return 127 instead of errno; the parent process has no way to
distinguish that the result is errno, so it can't use it to provide more
information about the error (it also exposes the numeric value of errno).

llvm-svn: 78098
2009-08-04 20:32:25 +00:00
Owen Anderson
762987e14b Privatize the last bit of Constant-creation state.
llvm-svn: 78097
2009-08-04 20:25:11 +00:00
Chris Lattner
87372c0978 rip out SectionEndDirectiveSuffix support, only uses by
the masm backend.  If anyone cares about masm in the future,
we'll have semantic sections it can hang off of.

llvm-svn: 78096
2009-08-04 20:09:41 +00:00
Jakob Stoklund Olesen
543aeb60c0 Don't tamper with <undef> operands in MachineInstr::addRegisterKilled.
For an undef operand, MO.getReg() is meaningless and we should not use it.
Undef operands should be skipped entirely.

llvm-svn: 78095
2009-08-04 20:09:25 +00:00
Jakob Stoklund Olesen
434f6a8d64 LowerSubregsInstructionPass::LowerExtract should not extend the live range of registers.
When LowerExtract eliminates an EXTRACT_SUBREG with a kill flag, it moves the
kill flag to the place where the sub-register is killed. This can accidentally
overlap with the use of a sibling sub-register, and we have trouble.

In the test case we have this code:

Live Ins: %R0 %R1 %R2
	%R2L<def> = EXTRACT_SUBREG %R2<kill>, 1
	%R2H<def> = LOAD16fi <fi#-1>, 0, Mem:LD(2,4) [FixedStack-1 + 0]
	%R1L<def> = EXTRACT_SUBREG %R1<kill>, 1
	%R0L<def> = EXTRACT_SUBREG %R0<kill>, 1
	%R0H<def> = ADD16 %R2H<kill>, %R2L<kill>, %AZ<imp-def>, %AN<imp-def>, %AC0<imp-def>, %V<imp-def>, %VS<imp-def>

subreg: CONVERTING: %R2L<def> = EXTRACT_SUBREG %R2<kill>, 1
subreg: eliminated!
subreg: killed here: %R0H<def> = ADD16 %R2H, %R2L, %R2<imp-use,kill>, %AZ<imp-def>, %AN<imp-def>, %AC0<imp-def>, %V<imp-def>, %VS<imp-def>

The kill flag on %R2 is moved to the last instruction, and the live range overlaps with the definition of %R2H:

*** Bad machine code: Redefining a live physical register ***
- function:    f
- basic block:  0x18358c0 (#0)
- instruction: %R2H<def> = LOAD16fi <fi#-1>, 0, Mem:LD(2,4) [FixedStack-1 + 0]
Register R2H was defined but already live.

The fix is to replace EXTRACT_SUBREG with IMPLICIT_DEF instead of eliminating
it completely:

subreg: CONVERTING: %R2L<def> = EXTRACT_SUBREG %R2<kill>, 1
subreg: replace by: %R2L<def> = IMPLICIT_DEF %R2<kill>

Note that these IMPLICIT_DEF instructions survive to the asm output. It is
necessary to fix the stack-color-with-reg test case because of that.

llvm-svn: 78093
2009-08-04 20:01:11 +00:00
Jakob Stoklund Olesen
9824928578 Enforce stricter rules in machine code verifier.
Implicit operands no longer get a free pass: Imp-use requires a live register
and imp-def requires a dead register.

There is also no special rule allowing redefinition of a sub-register when the
super-register is live. The super register must have imp-kill+imp-def operands
instead.

llvm-svn: 78090
2009-08-04 19:18:01 +00:00
Jakob Stoklund Olesen
c30af14672 Most flags are reserved registers on Blackfin.
The only exception is CC.

llvm-svn: 78089
2009-08-04 19:16:55 +00:00
Evan Cheng
29fe8806d5 In thumb mode, r7 is used as frame register. This fixes pr4681.
llvm-svn: 78086
2009-08-04 18:46:17 +00:00
David Goodwin
5efde448fa Match common pattern for FNMAC. Add NEON SP support.
llvm-svn: 78085
2009-08-04 18:44:29 +00:00
David Goodwin
e034df4626 Improve tests.
llvm-svn: 78083
2009-08-04 18:11:59 +00:00
Sanjiv Gupta
f1726f1105 Legalize i64 store operations generated by inst-combine.
llvm-svn: 78082
2009-08-04 17:59:16 +00:00
David Goodwin
99adffe5f2 Initial support for single-precision FP using NEON. Added "neonfp" attribute to enable. Added patterns for some binary FP operations.
llvm-svn: 78081
2009-08-04 17:53:06 +00:00
Douglas Gregor
60425b2194 Add some type traits that are used for Clang's statically-checked
canonical types.

llvm-svn: 78076
2009-08-04 17:04:52 +00:00
Evan Cheng
d840bf2eac Fix PR4528. This scavenger assertion is too strict. The two-address value is
killed by another operand.

There is probably a better fix. Either 1) scavenger can look at other operands, or
2) livevariables can be smarter about kill markers. Patches welcome.

llvm-svn: 78072
2009-08-04 16:52:44 +00:00
Daniel Dunbar
d5d4cfa604 Avoid compiler warning (in -Asserts mode)
llvm-svn: 78070
2009-08-04 16:46:12 +00:00
Chris Lattner
8f9a2d3c85 enhance codegen to put 16-bit character strings into the
__TEXT,__ustring section on darwin.

llvm-svn: 78068
2009-08-04 16:27:13 +00:00
Chris Lattner
ec75250455 fix a fixme: don't create an explicit "CStringSection" for ELF,
it is just being used as a prefix, so forward substitute it directly.

llvm-svn: 78067
2009-08-04 16:19:50 +00:00
Chris Lattner
41ade57a63 Add support emiting for 2/4 byte mergable strings to the ".rodata.str*"
section on ELF targets.

llvm-svn: 78066
2009-08-04 16:13:09 +00:00
Misha Brukman
b52306e490 * Use "svn export" instead of "svn co" and avoid cleaning up .svn dirs
* Use "svn info" to get last revision in repo, will get matching tarballs
* Now run "svn -q" since "svn info" tells us the revision number

llvm-svn: 78065
2009-08-04 15:47:18 +00:00
Anton Korobeynikov
10f01c8dd7 Ooops, I was too fast to commit the wrong fix :(
llvm-svn: 78060
2009-08-04 11:18:31 +00:00
Anton Korobeynikov
41ba9004b6 Fix a typo - this unbreaks llvm-gcc build on arm
llvm-svn: 78059
2009-08-04 11:12:51 +00:00
Evan Cheng
04035adc46 Thumb2 does not have ib (increment before) and da (decrement after) forms of ldm / stm.
llvm-svn: 78057
2009-08-04 08:34:18 +00:00
Devang Patel
ada7454774 Use separate ValueList for metadata.
This fixes PR4666.

llvm-svn: 78056
2009-08-04 06:00:18 +00:00