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

11382 Commits

Author SHA1 Message Date
Bob Wilson
88fafd84ea Implement Neon VZIP and VUZP instructions. These are very similar to VTRN,
so I generalized the class for VTRN in the .td file to handle all 3 of them.

llvm-svn: 78460
2009-08-08 06:13:25 +00:00
Bob Wilson
935ee0c122 Implement Neon VTRN instructions. For now, anyway, these are selected
directly from the intrinsics produced by the frontend.  If it is more
convenient to have a custom DAG node for using these to implement shuffles,
we can add that later.

llvm-svn: 78459
2009-08-08 05:53:00 +00:00
Evan Cheng
d19807e327 Add a skeleton Thumb2 instruction size reduction pass.
llvm-svn: 78456
2009-08-08 03:21:23 +00:00
Evan Cheng
4046c75e96 Code refactoring. No functionality change.
llvm-svn: 78455
2009-08-08 03:20:32 +00:00
Evan Cheng
fb833354b6 tADDhirr should target GPR, not tGPR.
llvm-svn: 78454
2009-08-08 03:19:44 +00:00
Evan Cheng
fe745cba18 I can type.
llvm-svn: 78453
2009-08-08 02:54:37 +00:00
Chris Lattner
7bf6e40552 make printInstruction return void since its result is omitted. Make the
error condition get trapped with an assert.

llvm-svn: 78449
2009-08-08 01:32:19 +00:00
Chris Lattner
2fc10a4dd9 don't check the result of printInstruction anymore.
llvm-svn: 78444
2009-08-08 00:05:42 +00:00
Anton Korobeynikov
e02d21a125 Do not generate 32-bit call on win64 when imm does not fit
llvm-svn: 78443
2009-08-07 23:59:21 +00:00
David Goodwin
c0fe95d8ce Make NEON single-precision FP support the default for cortex-a8 (again).
llvm-svn: 78430
2009-08-07 23:32:33 +00:00
Chris Lattner
bdb5a03875 remove a bunch of now-dead crud from the asmprinter and TAI interfaces.
llvm-svn: 78428
2009-08-07 23:16:27 +00:00
Anton Korobeynikov
2dfb75ca36 Unbreak the stuff
llvm-svn: 78425
2009-08-07 22:51:13 +00:00
Andrew Lenharth
a2eec41e49 avoid this libcall with long inline expansion
llvm-svn: 78420
2009-08-07 22:37:20 +00:00
Anton Korobeynikov
9b52601704 2 more vdup.32 cases
llvm-svn: 78419
2009-08-07 22:36:50 +00:00
Evan Cheng
897663328b A big oops. Thumb1 default CC is a def of CPSR, not a use of CPSR.
llvm-svn: 78418
2009-08-07 22:36:37 +00:00
Bill Wendling
f9e384bab7 Reformatting of lines. Put multiple DEBUG statements under one DEBUG statement.
llvm-svn: 78411
2009-08-07 21:33:25 +00:00
Evan Cheng
2bdb247c12 Thumb2 32-bit ldm / stm needs .w suffix if submode is ia.
llvm-svn: 78410
2009-08-07 21:19:10 +00:00
Daniel Dunbar
ced1e5c532 llvm-mc/AsmMatcher: Tweaks in response to feedback.
llvm-svn: 78404
2009-08-07 20:33:39 +00:00
Evan Cheng
7a2e5ba404 This is done.
llvm-svn: 78399
2009-08-07 19:34:52 +00:00
Evan Cheng
9c51e8f1fa Use 16-bit tMOVgpr2gpr instead of tMOVr to copy GPR registers in Thumb2 mode.
llvm-svn: 78398
2009-08-07 19:34:35 +00:00
Evan Cheng
0dab4cc8a0 Fix support to use NEON for single precision fp math.
llvm-svn: 78397
2009-08-07 19:30:41 +00:00
Sanjiv Gupta
35b980d8ba Minor fixes to avoid using invalid debugloc.
llvm-svn: 78383
2009-08-07 11:00:02 +00:00
Benjamin Kramer
02c9c67820 Simplify code and avoid allocations.
llvm-svn: 78382
2009-08-07 10:42:28 +00:00
Daniel Dunbar
9385ba560a Improve disabling of X86 AsmMatcher.
llvm-svn: 78381
2009-08-07 09:06:38 +00:00
Daniel Dunbar
b66377bda2 Disable X86 AsmMatcher for now, it is causing gcc-4.0 to run out of memory on
i386-apple-darwin9. This presumably will get fixed once the generated code
improves.

llvm-svn: 78379
2009-08-07 08:45:03 +00:00
Daniel Dunbar
88ccb58384 llvm-mc/AsmMatcher: Move to a slightly more sane matching design.
- Still not very sane, but a least its not 60k lines on X86. :)

 - In terms of correctness, currently some things are hard wired for X86, and we
   still don't properly resolve ambiguities (this is ignoring the instructions
   we don't even match due to funny .td stuff or other corner cases).

The high level changes:
 1. Represent tokens which are significant for matching explicitly as separate
    operands. This uniformly handles not only the instruction mnemonic, but
    also 'signficiant' syntax like the '*' in "call * ...".

 2. Separate the matching of operands to an instruction from the construction of
    the MCInst. In theory this can be done during matching, but since the number
    of variations is small I think it makes sense to decompose the problems.

 3. Improved a few of the mechanisms to at least successfully flatten / tokenize
    the assembly strings for PowerPC and ARM.

 4. The comment at the top of AsmMatcherEmitter.cpp explains the approach I'm
    moving towards for handling ambiguous instructions. The high-bit is to infer
    a partial ordering of the operand classes (and force the user to specify one
    if we can't) and use that to resolve ambiguities.

llvm-svn: 78378
2009-08-07 08:26:05 +00:00
Evan Cheng
ece37695db Error out, rather than infinite looping, if constant island pass can't converge.
llvm-svn: 78377
2009-08-07 07:35:21 +00:00
Evan Cheng
5af3c8154b tBfar is bl, which clobbers LR.
llvm-svn: 78370
2009-08-07 05:45:07 +00:00
Sanjiv Gupta
1738d18060 Run memsel inserter just before emit assembly to avoid tinkering by other passes.
llvm-svn: 78369
2009-08-07 05:44:27 +00:00
Andrew Lenharth
8482b5a16a These should be expanded
llvm-svn: 78365
2009-08-07 02:17:44 +00:00
Dan Gohman
1c41d60c4a Fix a bunch of namespace pollution.
llvm-svn: 78363
2009-08-07 01:32:21 +00:00
Evan Cheng
48b49cf5b9 It turns out most of the thumb2 instructions are not allowed to touch SP. The semantics of such instructions are unpredictable. We have just been lucky that tests have been passing.
This patch takes pain to ensure all the PEI lowering code does the right thing when lowering frame indices, insert code to manipulate stack pointers, etc. It's also custom lowering dynamic stack alloc into pseudo instructions so we can insert the right instructions at scheduling time.

This fixes PR4659 and PR4682.

llvm-svn: 78361
2009-08-07 00:34:42 +00:00
Nicolas Geoffray
0cd17db516 Output the new StructType constructor, which takes the context of the
module as first argument.

llvm-svn: 78340
2009-08-06 21:31:35 +00:00
Devang Patel
157f0b79c8 Use DebugInfoFinder
llvm-svn: 78334
2009-08-06 20:53:24 +00:00
Bob Wilson
bd7627b23e Implement Neon VST[234] operations.
llvm-svn: 78330
2009-08-06 18:47:44 +00:00
David Goodwin
3aafcc1dd2 Add parameter to pattern classes to enable an itinerary to be specified for instructions. For now just use the existing itineraries or NoItinerary.
llvm-svn: 78321
2009-08-06 16:52:47 +00:00
Chris Lattner
2d90fbe8be Fix several fixmes and clean up code by sinking *all* section
creation activity into the target-specific subclasses of TLOF.
Before this, globals with explicit sections could be created by
the base class.

1. make getOrCreateSection protected, add a new getExplicitSectionGlobal
   pure virtual method to assign sections to globals with a specified
   section.
2. eliminate getSpecialCasedSectionGlobals, which is now PIC specific.
3. eliminate the getKindForNamedSection virtual method, which is
   now just a static method for ELF.
4. Add implementions of getExplicitSectionGlobal for ELF/PECOFF/Darwin/PIC16.
   They are now all detangled and understandable, woo! :)

llvm-svn: 78319
2009-08-06 16:39:58 +00:00
Chris Lattner
affa6e37ef go through PIC16TargetObjectFile to make sections instead of
creating them directly in the pic16 asmprinter.

llvm-svn: 78317
2009-08-06 16:27:28 +00:00
Anton Korobeynikov
0c6314a3e2 We need to sext global addresses in kernel code model, not zext
llvm-svn: 78299
2009-08-06 11:23:24 +00:00
Dan Gohman
668a0ff5ef Fix a bug in x86's PreprocessForRMW logic that was exposed
by aggressive chain operand optimization. UpdateNodeOperands
does not modify the node in place if it would result in
a node identical to an existing node.

llvm-svn: 78297
2009-08-06 09:22:57 +00:00
Anton Korobeynikov
9232ddb6f2 Missed part of recent kernel codemodel tweaks
llvm-svn: 78293
2009-08-06 09:11:19 +00:00
Bob Wilson
905678ab37 Neon does not actually have VLD{234}.64 instructions.
These operations will have to be synthesized from other instructions.

llvm-svn: 78263
2009-08-06 00:24:27 +00:00
Bob Wilson
6ee52e0047 Add a new pre-allocation pass to assign adjacent registers for Neon instructions
that have that constraint.  This is currently just assigning a fixed set of
registers, and it only handles VLDn for n=2,3,4 with DPR registers.
I'm going to expand it to handle more operations next; we can make it smarter
once everything is working correctly.

llvm-svn: 78256
2009-08-05 23:12:45 +00:00
Anton Korobeynikov
8e6a142223 Better handle kernel code model. Also, generalize the things and fix one
subtle bug with small code model.

llvm-svn: 78255
2009-08-05 23:01:26 +00:00
Dan Gohman
2bce18dae9 Use GR32 for copies between GR32_NOSP and GR32_NOREX, as neither
is a subset of the other, but both are subsets of GR32.

llvm-svn: 78250
2009-08-05 22:18:26 +00:00
David Goodwin
6e4065d7c6 When using NEON for single-precision FP, the NEON result must be placed in D0-D15 as these are the only D registers with S subregs. Introduce a new regclass to represent D0-D15 and use it in the NEON single-precision FP patterns.
llvm-svn: 78244
2009-08-05 21:02:22 +00:00
Chris Lattner
8a74485e06 remove the 'DataSectionStartSuffix' and 'TextSectionStartSuffix' knobs.
llvm-svn: 78242
2009-08-05 20:49:52 +00:00
Anton Korobeynikov
7a0835dec5 Remove redundand checks: the only way to have, e.g. f32 RegVT is exactly
hardfloat case.

llvm-svn: 78237
2009-08-05 20:15:19 +00:00
Dan Gohman
892fcb1d57 hasSuperClass tests for a strict superset relation, rather than
a superset relation. This code wants to test the regular superset
relation.

llvm-svn: 78236
2009-08-05 20:13:45 +00:00
Anton Korobeynikov
7f9b6ff4a3 Unbreak the stuff, this is ugly, but we cannot do better for now with 'plain' C calling conv.
llvm-svn: 78232
2009-08-05 19:40:16 +00:00
Anton Korobeynikov
07ce0611d9 Missed pieces for ARM HardFP ABI.
Patch by Sandeep Patel!

llvm-svn: 78225
2009-08-05 19:04:42 +00:00
Andrew Lenharth
fe85ecc26b Use elf Object File directly
llvm-svn: 78220
2009-08-05 18:13:04 +00:00
Daniel Dunbar
3d2ac751da Remove some dead code.
llvm-svn: 78219
2009-08-05 18:12:37 +00:00
Dan Gohman
ac47a4b9ed Enable the new no-SP register classes by default. This is to address
PR4572. A few tests have some minor code regressions due to different
coalescing.

llvm-svn: 78217
2009-08-05 17:40:24 +00:00
Bob Wilson
c0e1bed13f Remove a redundant declaration.
llvm-svn: 78216
2009-08-05 17:39:44 +00:00
Anton Korobeynikov
81300620cf Convert bswap test to filecheck, add more test entries & convert stuff to filecheck
llvm-svn: 78212
2009-08-05 16:50:53 +00:00
Dan Gohman
dda3c89020 Fix a bug in the PIC16 backend.
llvm-svn: 78211
2009-08-05 16:46:43 +00:00
David Goodwin
9013115518 Disable NEON single-precision FP support for Cortex-A8, for now...
llvm-svn: 78209
2009-08-05 16:40:57 +00:00
Devang Patel
fde898c9f1 Remove dead code. MDNode and MDString are not Constant anymore.
llvm-svn: 78207
2009-08-05 16:40:02 +00:00
Anton Korobeynikov
c95b5fb0e5 Add memory versions of some instructions.
Patch by Neale Ferguson!

llvm-svn: 78203
2009-08-05 16:16:11 +00:00
David Goodwin
47064aa1c6 By default, for cortex-a8 use NEON for single-precision FP.
llvm-svn: 78200
2009-08-05 16:01:19 +00:00
Anton Korobeynikov
27fdf43425 Special constants as destinations does not work as expected - drop the patterns.
llvm-svn: 78191
2009-08-05 14:42:00 +00:00
Andrew Lenharth
1c03c3e158 Alpha: Get section directives right
llvm-svn: 78189
2009-08-05 13:59:57 +00:00
Anton Korobeynikov
021f465fb5 Cleanup in dbg_stoppoint handling in CBE. Patch by Sandeep Patel.
llvm-svn: 78182
2009-08-05 09:31:40 +00:00
Anton Korobeynikov
0b9020497c Minor arm CBE fixes. Patch by Sandeep.
llvm-svn: 78181
2009-08-05 09:31:07 +00:00
Anton Korobeynikov
f2b8211265 Emit module-level inline asm for CBE.
Patch by Sandeep Patel

llvm-svn: 78180
2009-08-05 09:29:56 +00:00
Bruno Cardoso Lopes
2ae97a2777 - Remove custom handling of jumptables by the elf writter (this was
a dirty hack and isn't need anymore since the last x86 code emitter patch)
- Add a target-dependent modifier to addend calculation
- Use R_X86_64_32S relocation for X86::reloc_absolute_word_sext
- Use getELFSectionFlags whenever possible
- fix getTextSection to use TLOF and emit the right text section 
- Handle global emission for static ctors, dtors and Type::PointerTyID
- Some minor fixes

llvm-svn: 78176
2009-08-05 06:57:03 +00:00
Evan Cheng
a27fac5075 80 col violations.
llvm-svn: 78175
2009-08-05 06:41:25 +00:00
Dan Gohman
1110fb6bbd Teach X86FastISel how to handle CCValAssign::BCvt, which is used for
MMX arguments. This fixes PR4684.

llvm-svn: 78163
2009-08-05 05:33:42 +00:00
Chris Lattner
19d238562d Clarify common linkage and the requirements on it. Enforce
them in the verifier.

llvm-svn: 78160
2009-08-05 05:21:07 +00:00
Chris Lattner
fd211f171d expose SectionKindForGlobal to curious clients, named as
getKindForGlobal.

llvm-svn: 78156
2009-08-05 04:25:40 +00:00
Bob Wilson
15c5c15ccb Oops. I didn't mean to commit this piece yet.
llvm-svn: 78146
2009-08-05 02:47:13 +00:00
Dan Gohman
5d566d918b Major calling convention code refactoring.
Instead of awkwardly encoding calling-convention information with ISD::CALL,
ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering
provides three virtual functions for targets to override:
LowerFormalArguments, LowerCall, and LowerRet, which replace the custom
lowering done on the special nodes. They provide the same information, but
in a more immediately usable format.

This also reworks much of the target-independent tail call logic. The
decision of whether or not to perform a tail call is now cleanly split
between target-independent portions, and the target dependent portion
in IsEligibleForTailCallOptimization.

This also synchronizes all in-tree targets, to help enable future
refactoring and feature work.

llvm-svn: 78142
2009-08-05 01:29:28 +00:00
Dan Gohman
fd9e5bc299 Remove an unnecessary flush in the CppBackend's output.
llvm-svn: 78138
2009-08-05 01:06:38 +00:00
Dan Gohman
4b2748d474 Don't flush the raw_ostream between each MachineFunction. These flush
calls were originally put in place because errs() at one time was
not unbuffered, and these print routines are commonly used with errs()
for debugging. However, errs() is now properly unbuffered, so the
flush calls are no longer needed. This significantly reduces the
number of write(2) calls for regular asm printing when there are many
small functions.

llvm-svn: 78137
2009-08-05 00:49:25 +00:00
Bob Wilson
1fe51064ba Change DAG nodes for Neon VLD2/3/4 operations to return multiple results.
Get rid of yesterday's code to fix the register usage during isel.
Select the new DAG nodes to machine instructions.  The new pre-alloc pass
to choose adjacent registers for these results is not done, so the
results of this will generally not assemble yet.

llvm-svn: 78136
2009-08-05 00:49:09 +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
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
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
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
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
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
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
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
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
Chris Lattner
8df05f13da make MergeableCString be a SectionKind "abstract class", and
add new concrete versions for 1/2/4-byte mergable strings.

These are not actually created yet.

llvm-svn: 78055
2009-08-04 05:35:56 +00:00
Daniel Dunbar
85d2406691 No really, it's unused.
llvm-svn: 78047
2009-08-04 04:08:40 +00:00
Daniel Dunbar
4b7d44b4d6 Remove now unused Module argument to createTargetMachine.
llvm-svn: 78043
2009-08-04 04:02:45 +00:00
Evan Cheng
38da233adf Remove ARM specific getInlineAsmLength. We'll rely on the simpler (and faster) generic algorithm for now. If more accurate computation is needed, we'll rely on the disassembler.
llvm-svn: 78032
2009-08-04 01:56:09 +00:00
Evan Cheng
5711586a17 Load / store multiple pass fixes for Thumb2. Not enabled yet.
llvm-svn: 78031
2009-08-04 01:43:45 +00:00
Evan Cheng
817618d570 Emit sub r, #c instead of transforming it to add r, #-c if c fits in 8-bit. This is a bit of pre-mature optimization. 8-bit variant makes it likely it will be narrowed to a 16-bit instruction.
llvm-svn: 78030
2009-08-04 01:41:15 +00:00
Bob Wilson
fe37bdfdd8 Lower Neon VLD* intrinsics to custom DAG nodes, and manually allocate the
results to fixed registers.

llvm-svn: 78025
2009-08-04 00:36:16 +00:00
Bob Wilson
154afab758 Minor cleanup. No functional changes intended.
llvm-svn: 78024
2009-08-04 00:25:01 +00:00
Ted Kremenek
79bb5ad24f Update CMake files.
llvm-svn: 78020
2009-08-03 23:44:01 +00:00
Chris Lattner
263c65d0a2 remove an unneeded section switch.
llvm-svn: 78014
2009-08-03 23:02:45 +00:00
Chris Lattner
53ca934380 switch ppc to using SwitchToSection instead of textual section stuff.
llvm-svn: 78013
2009-08-03 22:52:21 +00:00
Chris Lattner
5247ac71e5 use TLOF to compute the section for a function instead of
replicating the logic manually.

llvm-svn: 78011
2009-08-03 22:32:50 +00:00
Chris Lattner
7d2dd6deac convert macho stub emission to use SwitchToSection instead of
textual sections.

llvm-svn: 78007
2009-08-03 22:18:15 +00:00
Chris Lattner
13b1068b81 hoist some common code out of a switch
llvm-svn: 78006
2009-08-03 22:16:57 +00:00
Chris Lattner
0c9cdb6a5c this really shouldn't switch sections without telling the asmprinter, but
hey it uses .previous, so it should work :)

llvm-svn: 78004
2009-08-03 21:57:00 +00:00
Chris Lattner
505d63fc7f Eliminate textual section switching from the x86 backend, one
more step towards "semantics sections"

llvm-svn: 78002
2009-08-03 21:53:27 +00:00
Bob Wilson
eb3b616a7e Lower CONCAT_VECTOR during legalization instead of matching it during isel.
Add a testcase.

llvm-svn: 77992
2009-08-03 20:36:38 +00:00
Jakob Stoklund Olesen
74b57506dc Minor stylistic cleanups in the Blackfin target.
Thanks Chris.

llvm-svn: 77987
2009-08-03 19:32:30 +00:00
Chris Lattner
e6cb9d1888 remove a dead switch directive, replace it with some
code that I will be using shortly.

llvm-svn: 77983
2009-08-03 19:10:44 +00:00
Evan Cheng
d918955fcb Remove neverHasSideEffects on MMX_MOVD64rrv164 since it has a matching pattern.
llvm-svn: 77978
2009-08-03 18:07:19 +00:00
Chris Lattner
e84a0a07a6 eliminate textual section switching from intel asm printer.
This will cause it to enter the ".text" section instead of "_text"
but masm is already broken.

llvm-svn: 77977
2009-08-03 18:06:07 +00:00
Daniel Dunbar
21c4f86d86 Change C, CBE, MSIL to not provide target data via getTargetData().
- The theory is these should never actually be called, since these boil down to
   passes which can access the target data via the standard mechanism.

llvm-svn: 77975
2009-08-03 17:40:25 +00:00
Benjamin Kramer
7869bad67e llvm_report_error already prints "LLVM ERROR:". So stop reporting errors like "LLVM ERROR: llvm: error:" or "LLVM ERROR: ERROR:".
llvm-svn: 77971
2009-08-03 13:33:33 +00:00
Anton Korobeynikov
7c400c9da8 Unbreak win64 compilation callback.
Since we're generating stubs by hands we don't follow the ABI and don't
create a register spill area.
Don't use this area in compilation callback!

llvm-svn: 77968
2009-08-03 08:43:36 +00:00
Anton Korobeynikov
e999b85229 Create proper frame index for FP
llvm-svn: 77966
2009-08-03 08:14:30 +00:00
Anton Korobeynikov
b33dbbe7fd Perform bitconvert to proper type
llvm-svn: 77965
2009-08-03 08:14:14 +00:00
Anton Korobeynikov
3a8e354d47 Add 'Indirect' LocInfo class and use to pass __m128 on win64. Also minore fixes here and there (mostly __m64).
llvm-svn: 77964
2009-08-03 08:13:56 +00:00
Anton Korobeynikov
00018fb248 Cleanup Darwin MMX calling conv stuff - make the stuff more generic. This also fixes a subtle bug, when 6th v1i64 argument passed wrongly.
llvm-svn: 77963
2009-08-03 08:13:24 +00:00
Anton Korobeynikov
0bac80c138 Unbreak Win64 CC. Step one: honour register save area, fix some alignment and provide a different set of call-clobberred registers.
llvm-svn: 77962
2009-08-03 08:12:53 +00:00
Rafael Espindola
14781bacfe Use movd instead of movq
llvm-svn: 77956
2009-08-03 05:21:05 +00:00
Daniel Dunbar
2781e4bd89 Remove now unused arguments from TargetRegistry::lookupTarget.
llvm-svn: 77950
2009-08-03 04:20:57 +00:00
Evan Cheng
600312b878 These are done.
llvm-svn: 77949
2009-08-03 04:08:36 +00:00
Daniel Dunbar
775da1948b Pass target triple string in to TargetMachine constructor.
This is not just a matter of passing in the target triple from the module;
currently backends are making decisions based on the build and host
architecture. The goal is to migrate to making these decisions based off of the
triple (in conjunction with the feature string). Thus most clients pass in the
target triple, or the host triple if that is empty.

This has one important change in the way behavior of the JIT and llc.

For the JIT, it was previously selecting the Target based on the host
(naturally), but it was setting the target machine features based on the triple
from the module. Now it is setting the target machine features based on the
triple of the host.

For LLC, -march was previously only used to select the target, the target
machine features were initialized from the module's triple (which may have been
empty). Now the target triple is taken from the module, or the host's triple is
used if that is empty. Then the triple is adjusted to match -march.

The take away is that -march for llc is now used in conjunction with the host
triple to initialize the subtarget. If users want more deterministic behavior
from llc, they should use -mtriple, or set the triple in the input module.

llvm-svn: 77946
2009-08-03 04:03:51 +00:00
Rafael Espindola
ad3bba6ce2 Fix the instruction encoding.
llvm-svn: 77944
2009-08-03 03:27:05 +00:00
Rafael Espindola
08c8a9e6d5 Remove a bitcast that was a no-op.
Thanks to Eli Friedman for noticing it.

llvm-svn: 77942
2009-08-03 03:00:05 +00:00
Rafael Espindola
daefe7aa54 Use movq to move 64 bits in and out of mmx registers.
Fixes PR4669

llvm-svn: 77940
2009-08-03 02:45:34 +00:00
Evan Cheng
27ee95d344 Use the i12 variant of load / store opcodes if offset is zero. Now we pass all of multisource as well.
llvm-svn: 77939
2009-08-03 02:38:06 +00:00
Eli Friedman
c277c8fe13 Remove -disable-mips-abicall and -enable-mips-absolute-call command-line
options, which don't appear to be useful.  -enable-mips-absolute-call is
completely unused (and unless I'm mistaken, is supposed to have the 
same effect that -relocation-model=dynamic-no-pic should have), 
and -disable-mips-abicall appears to be effectively a 
synonym for -relocation-model=static. Adjust the few users of hasABICall
to checks which seem more appropriate.  Update MipsSubtarget, 
MipsTargetMachine, and MipselTargetMachine to synchronize with recent 
changes.

llvm-svn: 77938
2009-08-03 02:22:28 +00:00
Bill Wendling
b8e74aab37 - s/DOUT/DEBUG(errs()/g
- Tidy up some headers.

llvm-svn: 77929
2009-08-03 00:11:34 +00:00
Daniel Dunbar
9e079eec0c Move most targets TargetMachine constructor to only taking a target triple.
- The C, C++, MSIL, and Mips backends still need the module.

llvm-svn: 77927
2009-08-02 23:37:13 +00:00
Richard Osborne
179bf3bdc2 Add extra SEXT pattern.
llvm-svn: 77920
2009-08-02 22:45:24 +00:00
Bill Wendling
9f0ff01861 The x86 jit doesn't generate a def_cfa_offset unwind instruction after the
pushes in the function prolog if the function doesn't have any stack space,
i.e. for a prolog like:

0x40011870:     push %r15
0x40011872:     push %r14
0x40011874:     push %rbx

Patch by Zoltan!

llvm-svn: 77919
2009-08-02 22:25:37 +00:00
Daniel Dunbar
0b82c938fe Normalize Subtarget constructors to take a target triple string instead of
Module*.

Also, dropped uses of TargetMachine where unnecessary. The only target which
still takes a TargetMachine& is Mips, I would appreciate it if someone would
normalize this to match other targets.

llvm-svn: 77918
2009-08-02 22:11:08 +00:00
Jakob Stoklund Olesen
0f9cf8a32b Remove unneeded intrinsics from Blackfin backend.
__builtin_bfin_ones does the same as ctpop, so it can be implemented in the front-end.

__builtin_bfin_loadbytes loads from an unaligned pointer with the disalignexcpt instruction. It does the same as loading from a pointer with the low bits masked. It is better if the front-end creates a masked load. We can always instruction select the masked to disalignexcpt+load.

We keep csync/ssync/idle. These intrinsics represent instructions that need workarounds for some silicon revisions. We may even want to convert inline assembler to intrinsics to enable the workarounds.

llvm-svn: 77917
2009-08-02 21:49:05 +00:00
Jakob Stoklund Olesen
23ad8d1848 Add some basic blackfin intrinsics.
llvm-svn: 77903
2009-08-02 18:28:11 +00:00
Jakob Stoklund Olesen
4e31b23a32 Add support for CPU features (i.e., bugs) and workarounds.
This is just the framework to identify the needed workarounds. They are not actually implemented.

llvm-svn: 77902
2009-08-02 18:27:36 +00:00
Jakob Stoklund Olesen
5c6e03f669 Inline assembly support for Blackfin.
We use the same constraints as GCC, including those that are slightly insane for inline assembler.

llvm-svn: 77899
2009-08-02 17:39:17 +00:00
Jakob Stoklund Olesen
e7eb74ef39 Analog Devices Blackfin back-end.
Generate code for the Blackfin family of DSPs from Analog Devices:

  http://www.analog.com/en/embedded-processing-dsp/blackfin/processors/index.html
  
We aim to be compatible with the exsisting GNU toolchain found at:

  http://blackfin.uclinux.org/gf/project/toolchain
  
The back-end is experimental.

llvm-svn: 77897
2009-08-02 17:32:10 +00:00
Dan Gohman
481da8a541 Fix indentation.
llvm-svn: 77895
2009-08-02 16:10:52 +00:00
Dan Gohman
751baf25e9 Add a comment.
llvm-svn: 77894
2009-08-02 16:10:01 +00:00
Dan Gohman
d36cbd0574 Resync lea32addr and lea64addr.
llvm-svn: 77893
2009-08-02 16:09:17 +00:00
Chris Lattner
738a9ba448 move dwarf debug info section selection stuff from TAI to
TLOF, unifying all the dwarf targets at the same time.

llvm-svn: 77889
2009-08-02 07:24:22 +00:00
Chris Lattner
6f4a366e35 convert EHFrameSection to be managed by TLOF instead of TAI.
llvm-svn: 77888
2009-08-02 06:52:36 +00:00
Chris Lattner
21eb874b6c I need Triple information, 10.6 shouldn't set this, it bloats
object files.

llvm-svn: 77887
2009-08-02 06:51:58 +00:00