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

341 Commits

Author SHA1 Message Date
Chris Lattner
9ce833945e improve portability to avoid conflicting with std::next in c++'0x.
Patch by Howard Hinnant!

llvm-svn: 90365
2009-12-03 00:50:42 +00:00
David Greene
97a1f550d1 Move DebugInfo checks into EmitComments and remove them from
target-specific AsmPrinters.  Not all comments need DebugInfo.

Re-enable the line numbers comment test.

llvm-svn: 88697
2009-11-13 21:34:57 +00:00
David Greene
9934b1d063 Make the MachineFunction argument of getFrameRegister const.
This also fixes a build error.

llvm-svn: 87027
2009-11-12 21:00:03 +00:00
David Greene
58e7c6145b Add a bool flag to StackObjects telling whether they reference spill
slots.  The AsmPrinter will use this information to determine whether to
print a spill/reload comment.

Remove default argument values.  It's too easy to pass a wrong argument
value when multiple arguments have default values.  Make everything
explicit to trap bugs early.

Update all targets to adhere to the new interfaces..

llvm-svn: 87022
2009-11-12 20:49:22 +00:00
Chris Lattner
25421b6954 indicate what the native integer types for the target are.
Please verify.

llvm-svn: 86397
2009-11-07 19:07:32 +00:00
Chris Lattner
8abcfed7c7 add some missing #includes
llvm-svn: 86367
2009-11-07 09:20:54 +00:00
Dan Gohman
eec0f1c506 Remove uninteresting and confusing debug output.
llvm-svn: 86149
2009-11-05 18:47:09 +00:00
Dan Gohman
3393a4c997 Rename usesCustomDAGSchedInserter to usesCustomInserter, and update a
bunch of associated comments, because it doesn't have anything to do
with DAGs or scheduling. This is another step in decoupling MachineInstr
emitting from scheduling.

llvm-svn: 85517
2009-10-29 18:10:34 +00:00
Evan Cheng
4e3bc5efb7 Add a second ValueType argument to isFPImmLegal.
llvm-svn: 85361
2009-10-28 01:43:28 +00:00
Dan Gohman
b20fae567f Update SystemZ to use PSW following the way x86 uses EFLAGS. Besides
eliminating a use of MVT::Flag, this is needed for an upcoming CodeGen
change.

This unfortunately requires SystemZ to switch to the list-burr
scheduler, in order to handle the physreg defs properly, however
that's what LLVM has available at this time.

llvm-svn: 85357
2009-10-28 00:55:57 +00:00
Evan Cheng
151726ad30 Do away with addLegalFPImmediate. Add a target hook isFPImmLegal which returns true if the fp immediate can be natively codegened by target.
llvm-svn: 85281
2009-10-27 19:56:55 +00:00
Nick Lewycky
2b8400628d Remove includes of Support/Compiler.h that are no longer needed after the
VISIBILITY_HIDDEN removal.

llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky
711c726c97 Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.

llvm-svn: 85042
2009-10-25 06:33:48 +00:00
Evan Cheng
d941e8b23a Revert 84315 for now. Re-thinking the patch.
llvm-svn: 84321
2009-10-17 07:53:04 +00:00
Evan Cheng
12dd96e2f8 Rename getFixedStack to getStackObject. The stack objects represented are not
necessarily fixed. Only those will negative frame indices are "fixed."

llvm-svn: 84315
2009-10-17 06:22:26 +00:00
Dan Gohman
b95136e649 Replace TargetInstrInfo::isInvariantLoad and its target-specific
implementations with a new MachineInstr::isInvariantLoad, which uses
MachineMemOperands and is target-independent. This brings MachineLICM
and other functionality to targets which previously lacked an
isInvariantLoad implementation.

llvm-svn: 83475
2009-10-07 17:38:06 +00:00
Jim Grosbach
61c5ce1bde Add register-reuse to frame-index register scavenging. When a target uses
a virtual register to eliminate a frame index, it can return that register
and the constant stored there to PEI to track. When scavenging to allocate
for those registers, PEI then tracks the last-used register and value, and
if it is still available and matches the value for the next index, reuses
the existing value rather and removes the re-materialization instructions.
Fancier tracking and adjustment of scavenger allocations to keep more
values live for longer is possible, but not yet implemented and would likely
be better done via a different, less special-purpose, approach to the
problem.

eliminateFrameIndex() is modified so the target implementations can return
the registers they wish to be tracked for reuse.

ARM Thumb1 implements and utilizes the new mechanism. All other targets are
simply modified to adjust for the changed eliminateFrameIndex() prototype.

llvm-svn: 83467
2009-10-07 17:12:56 +00:00
Dan Gohman
a803c712dd Instead of printing unnecessary basic block labels as labels in
verbose-asm mode, print comments instead. This eliminates a non-comment
difference between verbose-asm mode and non-verbose-asm mode.

Also, factor out the relevant code out of all the targets and into
target-independent code.

llvm-svn: 83392
2009-10-06 17:38:38 +00:00
Devang Patel
a8f35ac640 Update processDebugLoc() so that it can be used to process debug info before and after printing an instruction.
llvm-svn: 83363
2009-10-06 02:19:11 +00:00
Devang Patel
e097bf49d0 Use MachineInstr as an processDebugLoc() argument.
This will allow processDebugLoc() to handle scopes for DWARF debug info. 

llvm-svn: 83183
2009-09-30 23:12:50 +00:00
Dan Gohman
0ac693a89e Improve MachineMemOperand handling.
- Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions.
   This eliminates MachineInstr's std::list member and allows the data to be
   created by isel and live for the remainder of codegen, avoiding a lot of
   copying and unnecessary translation. This also shrinks MemSDNode.
 - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated
   fields for MachineMemOperands.
 - Change MemSDNode to have a MachineMemOperand member instead of its own
   fields with the same information. This introduces some redundancy, but
   it's more consistent with what MachineInstr will eventually want.
 - Ignore alignment when searching for redundant loads for CSE, but remember
   the greatest alignment.

Target-specific code which previously used MemOperandSDNodes with generic
SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range
so that the SelectionDAG framework knows that MachineMemOperand information
is available.

llvm-svn: 82794
2009-09-25 20:36:54 +00:00
Dan Gohman
0c4e55a2f8 Rename getTargetNode to getMachineNode, for consistency with the
naming scheme used in SelectionDAG, where there are multiple kinds
of "target" nodes, but "machine" nodes are nodes which represent
a MachineInstr.

llvm-svn: 82790
2009-09-25 18:54:59 +00:00
Dan Gohman
cca0e25a9e Fix the offset values for these memoperands. For frame objects, the
PseudoSourceValue already effectively represents the offset from the
frame base, so the actual offset should not be added to it.

llvm-svn: 82465
2009-09-21 17:58:09 +00:00
Evan Cheng
7714c8412d Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks.
llvm-svn: 82311
2009-09-19 09:51:03 +00:00
Evan Cheng
7cb9c456e5 Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
Not functionality change yet.

llvm-svn: 82273
2009-09-18 21:02:19 +00:00
Chris Lattner
334aa7a1d4 remove all but one reference to TargetRegisterDesc::AsmName.
llvm-svn: 81714
2009-09-13 20:31:40 +00:00
Chris Lattner
20b7392123 the tblgen produced 'getRegisterName' method does not access
the object, make it static instead of const.

llvm-svn: 81711
2009-09-13 20:19:22 +00:00
Chris Lattner
0cde5283e3 make tblgen produce a function that returns the name for a physreg.
Nothing is using this info yet.

llvm-svn: 81707
2009-09-13 20:08:00 +00:00
Chris Lattner
cbcbedf254 replace printBasicBlockLabel with EmitBasicBlockStart,
now that printBasicBlockLabel is only used for starting
a MBB.  This allows elimination of a bunch of arguments.

llvm-svn: 81684
2009-09-13 18:25:37 +00:00
Chris Lattner
de1324146e convert some uses of printBasicBlockLabel to use GetMBBSymbol
instead.

llvm-svn: 81677
2009-09-13 17:14:04 +00:00
Chris Lattner
b9aca1a178 remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter.  Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter.  This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.

llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Duncan Sands
10c1356bad Remove some unused variables and methods warned about by
icc (#177, partial).  Patch by Erick Tryzelaar.

llvm-svn: 81106
2009-09-06 08:33:48 +00:00
Sandeep Patel
9c4e094e2a Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Benjamin Kramer
61232721d9 Normalize makefile comments and sort cmake file lists.
llvm-svn: 80584
2009-08-31 13:05:24 +00:00
Daniel Dunbar
411094cde6 Fix some refactos for iostream changes (in -Asserts mode).
- The world needs better C++ refactoring tools, can I get an Amen!?

llvm-svn: 79843
2009-08-23 08:50:52 +00:00
Chris Lattner
bd73307361 eliminate uses of cerr()
llvm-svn: 79834
2009-08-23 07:05:07 +00:00
Chris Lattner
26ec3291f0 eliminate the last DOUTs from the targets.
llvm-svn: 79833
2009-08-23 06:49:22 +00:00
Benjamin Kramer
52cba58070 Forgot to update some CMakeLists.
llvm-svn: 79780
2009-08-22 22:20:11 +00:00
Chris Lattner
8d06945fff rename TAI -> MAI, being careful not to make MAILJMP instructions :)
llvm-svn: 79777
2009-08-22 21:43:10 +00:00
Chris Lattner
5d8af49626 Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.
llvm-svn: 79763
2009-08-22 20:48:53 +00:00
Anton Korobeynikov
23ecf9767c Some dummy cost model for s390x:
- Prefer short-imm instructions over ext-imm, when possible
 - Prefer Z10 instructions over Z9, when possible

This hopefully should fix some dejagnu test fails on solaris

llvm-svn: 79741
2009-08-22 11:46:16 +00:00
Anton Korobeynikov
9458a8c84d Add fcopysign instructions
llvm-svn: 79664
2009-08-21 20:02:37 +00:00
Anton Korobeynikov
cee0600755 Expand few nodes until someone will be crazy enough to implement them natively :)
llvm-svn: 79659
2009-08-21 18:52:42 +00:00
Anton Korobeynikov
a6998a6d4c Typo :(
llvm-svn: 79657
2009-08-21 18:41:02 +00:00
Anton Korobeynikov
3756177f71 Correct instruction names for subtract-with-borrow
llvm-svn: 79656
2009-08-21 18:37:28 +00:00
Anton Korobeynikov
a706ea5720 Handle 'r' inline asm constraint
llvm-svn: 79648
2009-08-21 18:15:41 +00:00
Chris Lattner
9cbc9c2d13 eliminate AsmPrinter::SwitchToSection and just have clients
talk to the MCStreamer directly instead.

llvm-svn: 79405
2009-08-19 05:49:37 +00:00
Dan Gohman
4b9cae5af3 Various AsmWriter output cleanups. Use WriteAsOperand instead of
PrintUnmangledNameSafely.

llvm-svn: 78878
2009-08-13 01:36:44 +00:00
Chris Lattner
55df534293 Change TargetAsmInfo to be constructed via TargetRegistry from a Target+Triple
pair instead of from a virtual method on TargetMachine.  This cuts the final
ties of TargetAsmInfo to TargetMachine, meaning that MC can now use 
TargetAsmInfo.

llvm-svn: 78802
2009-08-12 07:22:17 +00:00
Chris Lattner
0624ad99f0 prune #include
llvm-svn: 78749
2009-08-11 23:07:27 +00:00
Owen Anderson
48f2f0ae72 Split EVT into MVT and EVT, the former representing _just_ a primitive type, while
the latter is capable of representing either a primitive or an extended type.

llvm-svn: 78713
2009-08-11 20:47:22 +00:00
Chris Lattner
30d9c39337 pass the TargetTriple down from each target ctor to the
LLVMTargetMachine ctor.  It is currently unused.

llvm-svn: 78711
2009-08-11 20:42:37 +00:00
Owen Anderson
b4bce99769 Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.
llvm-svn: 78610
2009-08-10 22:56:29 +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
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
Anton Korobeynikov
c95b5fb0e5 Add memory versions of some instructions.
Patch by Neale Ferguson!

llvm-svn: 78203
2009-08-05 16:16:11 +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
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
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
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
Chris Lattner
c2297e1bc1 eliminate the TM argument to the TAI class, remove comment about supporting
solaris :)

llvm-svn: 77865
2009-08-02 04:32:07 +00:00
Chris Lattner
b5ceb50677 remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
no longer depends on TM!

llvm-svn: 77863
2009-08-02 04:27:24 +00:00
Chris Lattner
4cbb1c0c3f REmove dead fields of TAI.
llvm-svn: 77820
2009-08-01 22:40:22 +00:00
Chris Lattner
5c3e1e0d0c pass the mangler down into the various SectionForGlobal methods.
No functionality change.

llvm-svn: 77432
2009-07-29 05:09:30 +00:00
Chris Lattner
55461787cc Rip all of the global variable lowering logic out of TargetAsmInfo. Since
it is highly specific to the object file that will be generated in the end,
this introduces a new TargetLoweringObjectFile interface that is implemented
for each of ELF/MachO/COFF/Alpha/PIC16 and XCore.

Though still is still a brutal and ugly refactoring, this is a major step
towards goodness.

This patch also:
1. fixes a bunch of dangling pointer problems in the PIC16 backend.
2. disables the TargetLowering copy ctor which PIC16 was accidentally using.
3. gets us closer to xcore having its own crazy target section flags and
   pic16 not having to shadow sections with its own objects.
4. fixes wierdness where ELF targets would set CStringSection but not
   CStringSection_.  Factor the code better.
5. fixes some bugs in string lowering on ELF targets.

llvm-svn: 77294
2009-07-28 03:13:23 +00:00
Chris Lattner
cd7d963b75 Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
instead.

llvm-svn: 77186
2009-07-27 06:17:14 +00:00
Chris Lattner
a2b00bdd7a Eliminate SectionFlags, just embed a SectionKind into Section
instead and drive things based off of that.

llvm-svn: 77184
2009-07-27 05:32:16 +00:00
Chris Lattner
0f4d60ca90 untangle a TargetAsmInfo hack where ELFTargetAsmInfo would create a
'unnamed' bss section, but some impls would want a named one.  Since
they don't have consistent behavior, just make each target do their
own thing, instead of doing something "sortof common" then having
targets change immutable objects later.

llvm-svn: 77165
2009-07-26 19:23:28 +00:00
Daniel Dunbar
75a66c519b Eliminate some uses of DOUT, cerr, and getNameStart().
llvm-svn: 77145
2009-07-26 07:49:05 +00:00
Daniel Dunbar
a7a01acc7c Factor commonality in triple match routines into helper template for registering
classes, and migrate existing targets over.

llvm-svn: 77126
2009-07-26 05:03:33 +00:00
Daniel Dunbar
49987490c2 Kill Target specific ModuleMatchQuality stuff.
- This was overkill and inconsistently implemented.

llvm-svn: 77114
2009-07-26 02:22:58 +00:00
Daniel Dunbar
d699ffc2ac Simplify JIT target selection.
- Instead of requiring targets to define a JIT quality match function, we just
   have them specify if they support a JIT.

 - Target selection for the JIT just gets the host triple and looks for the best
   target which matches the triple and has a JIT.

llvm-svn: 77060
2009-07-25 10:09:50 +00:00
Daniel Dunbar
284fe09fe4 Add new helpers for registering targets.
- Less boilerplate == good.

llvm-svn: 77052
2009-07-25 06:49:55 +00:00
Owen Anderson
cc287b28c9 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Eli Friedman
a78b44069b Missed a piece of the commit to remove the shift flavor.
llvm-svn: 76635
2009-07-21 20:15:24 +00:00
Chris Lattner
3d4ab7a231 make AsmPrinter::doFinalization iterate over the global variables
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.

llvm-svn: 76604
2009-07-21 18:38:57 +00:00
Chris Lattner
433fbf959a fix Sparc, SystemZ, and MSP430 to not override AsmPrinter::doInitialization.
This eliminates redundancy setting up the mangler and adds support to them
for module-level inline asm and a .file directive.

llvm-svn: 76592
2009-07-21 17:37:35 +00:00
Chris Lattner
0f65fbf095 Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
LLVM IR concept.

llvm-svn: 76590
2009-07-21 17:30:51 +00:00
Bill Wendling
16a69eeaeb Pass in the unfortunately named "LessPrivatePrefix" for the
"LinkerPrivatePrefix". It seems to have been used in only one place before I
started this "linker_private" business. I'm thinking that a rename is in
order...

llvm-svn: 76479
2009-07-20 21:30:28 +00:00
Bill Wendling
1a10a060cb Add plumbing for the `linker_private' linkage type. This type is meant for
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.

This is plumbing, so we don't have a use of it yet. More to come, etc.

llvm-svn: 76385
2009-07-20 01:03:30 +00:00
Daniel Dunbar
e1a18819f7 CMake support for SystemZ.
llvm-svn: 76384
2009-07-20 00:24:17 +00:00
Daniel Dunbar
e52f9f19ff SystemZ *does* have a CodeGen/AsmPrinter split.
- What it doesn't have is the rest of its cmake files...

llvm-svn: 76352
2009-07-19 00:46:44 +00:00
Daniel Dunbar
f5a95d9e81 Tweak cmake files for the four targets that don't split CodeGen out.
- We should canonicalize this and get rid of the cmake and llvm-config hacks to
   support both variants.

llvm-svn: 76350
2009-07-19 00:26:46 +00:00
Daniel Dunbar
aca95eac72 Add dependencies from TargetInfo onto .td generation.
- Shouldn't really be necessary, but currently .inc files get included into
   some main target headers.

llvm-svn: 76349
2009-07-19 00:21:12 +00:00
Daniel Dunbar
960ef321ca Put Target definitions inside Target specific header, and llvm namespace.
llvm-svn: 76344
2009-07-18 23:03:22 +00:00
Anton Korobeynikov
d8faa95b25 Add carry producing / using versions of add / sub
llvm-svn: 76316
2009-07-18 14:16:06 +00:00
Anton Korobeynikov
89f45fb02c Expand frem
llvm-svn: 76315
2009-07-18 13:44:25 +00:00
Anton Korobeynikov
a806bf16c4 Turn abort() into unreachable
llvm-svn: 76314
2009-07-18 13:34:59 +00:00
Anton Korobeynikov
b3e0446dbb Turn few asserts into errors / unreachable's
llvm-svn: 76313
2009-07-18 13:33:17 +00:00
Anton Korobeynikov
a7b22f8483 Handle vector returns
llvm-svn: 76312
2009-07-18 12:51:06 +00:00
Anton Korobeynikov
ff561b2308 Provide expansion for ct* intrinsics
llvm-svn: 76311
2009-07-18 12:26:13 +00:00
Anton Korobeynikov
f31ebc380b Expand sext_inreg for i1
llvm-svn: 76310
2009-07-18 12:20:36 +00:00
Anton Korobeynikov
fbac44c040 Add missed return
llvm-svn: 76209
2009-07-17 18:28:59 +00:00
Duncan Sands
d1b273609e Avoid a compiler warning when assertions are turned off.
llvm-svn: 76176
2009-07-17 12:25:14 +00:00
Daniel Dunbar
fd7e588f92 Fix 'may be used uninitialized' warning.
- Anton, please review.

llvm-svn: 76144
2009-07-17 02:19:26 +00:00
Anton Korobeynikov
c66cf22284 Unbreak
llvm-svn: 76064
2009-07-16 14:36:52 +00:00
Anton Korobeynikov
3e8bb65ec8 Temporary disable 16 bit bswap
llvm-svn: 76063
2009-07-16 14:35:57 +00:00
Anton Korobeynikov
94e21c8740 Add instruction formats and few opcodes
llvm-svn: 76062
2009-07-16 14:35:20 +00:00
Anton Korobeynikov
e11a89ba74 Add bswap patterns
llvm-svn: 76061
2009-07-16 14:34:52 +00:00
Anton Korobeynikov
6c622a4547 Provide crazy pseudos for regpairs spills / reloads
llvm-svn: 76060
2009-07-16 14:34:15 +00:00
Anton Korobeynikov
c5e948c021 Handle long-disp stuff more consistently
llvm-svn: 76059
2009-07-16 14:33:52 +00:00
Anton Korobeynikov
d9c48cfd00 All FP instructions have 12 bit memory displacement field
llvm-svn: 76058
2009-07-16 14:33:27 +00:00
Anton Korobeynikov
e1bf81893d Another predicate routine
llvm-svn: 76057
2009-07-16 14:33:01 +00:00
Anton Korobeynikov
605ebc2c3c More helpers
llvm-svn: 76056
2009-07-16 14:32:41 +00:00
Anton Korobeynikov
014ce79e73 Add bunch of branch folding stuff
llvm-svn: 76055
2009-07-16 14:32:19 +00:00
Anton Korobeynikov
918a93419c Add missed opcodes to short => long displacement conversion
llvm-svn: 76054
2009-07-16 14:31:52 +00:00
Anton Korobeynikov
08d9f6b882 Cleanup
llvm-svn: 76053
2009-07-16 14:31:32 +00:00
Anton Korobeynikov
94f250ff30 Fix logic inversion for RI-mode address selection
llvm-svn: 76052
2009-07-16 14:31:14 +00:00
Anton Korobeynikov
373515d99e Expand 32-bit bitconverts via memory
llvm-svn: 76050
2009-07-16 14:30:29 +00:00
Anton Korobeynikov
080bdae588 Fix incomin arg stack frame offset in case we need to generate stack frame
llvm-svn: 76049
2009-07-16 14:29:57 +00:00
Anton Korobeynikov
c84e2bb30e Fix instruction mnemonics for some fp_to_sint operations
llvm-svn: 76048
2009-07-16 14:29:26 +00:00
Anton Korobeynikov
74497b2190 i32 values are passed extended also on stack. Handle this in generic way
llvm-svn: 76047
2009-07-16 14:29:05 +00:00
Anton Korobeynikov
319dc4e8d3 We definitely have 1-0 bools
llvm-svn: 76046
2009-07-16 14:28:46 +00:00
Anton Korobeynikov
2e8f54d16d Revert the commit, it just hides the real bug
llvm-svn: 76045
2009-07-16 14:28:26 +00:00
Anton Korobeynikov
0276bc9176 Out GR128 regclass is not a 'real' i128 one.
llvm-svn: 76044
2009-07-16 14:27:53 +00:00
Anton Korobeynikov
690fef7849 Add missed condbranch opcodes
llvm-svn: 76043
2009-07-16 14:27:26 +00:00
Anton Korobeynikov
4181716247 Handle bitconverts
llvm-svn: 76042
2009-07-16 14:27:01 +00:00
Anton Korobeynikov
60427c0b64 Unbreak mvi and friends - emit only 'significant' part of the operand
llvm-svn: 76041
2009-07-16 14:26:38 +00:00
Anton Korobeynikov
ff6d84fd85 Expand fp_to_uint too
llvm-svn: 76040
2009-07-16 14:26:06 +00:00
Anton Korobeynikov
da480ca78d We don't have FP truncstores
llvm-svn: 76039
2009-07-16 14:25:46 +00:00
Anton Korobeynikov
7ea47e70b3 Expand uint_to_fp
llvm-svn: 76038
2009-07-16 14:25:30 +00:00
Anton Korobeynikov
117e7a7179 Emit proper rounding mode for fp_to_sint
llvm-svn: 76037
2009-07-16 14:25:12 +00:00
Anton Korobeynikov
61bf5c13c4 f32/f64 regs are stored on stack if we're short in FP regs
llvm-svn: 76036
2009-07-16 14:24:57 +00:00
Anton Korobeynikov
bbf0fe2a76 Lower anyext to zext, 32-bit stuff does not have any implicit zero-extension side effects
llvm-svn: 76035
2009-07-16 14:24:41 +00:00
Anton Korobeynikov
886e977c69 Make FP zero to be legal FP immediate via LOAD ZERO
llvm-svn: 76034
2009-07-16 14:24:16 +00:00
Anton Korobeynikov
2474b40557 Loads are not two-address in any way
llvm-svn: 76033
2009-07-16 14:24:01 +00:00
Anton Korobeynikov
e45c7cb554 Add LOAD NEGATIVE instruction
llvm-svn: 76032
2009-07-16 14:23:44 +00:00
Anton Korobeynikov
d12e7875c9 LOAD COMPLEMENT instruction is not really two-addr
llvm-svn: 76031
2009-07-16 14:23:30 +00:00
Anton Korobeynikov
f8ac41d531 Add multiple add/sub instructions
llvm-svn: 76030
2009-07-16 14:23:16 +00:00
Anton Korobeynikov
df2f045667 Handle FP callee-saved regs
llvm-svn: 76029
2009-07-16 14:23:01 +00:00
Anton Korobeynikov
b90a38d00d Proper FP extloads
llvm-svn: 76028
2009-07-16 14:22:46 +00:00
Anton Korobeynikov
940ec5955b Add proper PWS impdef's
llvm-svn: 76027
2009-07-16 14:22:30 +00:00
Anton Korobeynikov
3f37f337be Propagate FP select_cc to dag inserters
llvm-svn: 76026
2009-07-16 14:22:15 +00:00
Anton Korobeynikov
dc167c2eec Implement fp_to_sint
llvm-svn: 76025
2009-07-16 14:21:57 +00:00
Anton Korobeynikov
e372330133 Implement FP regs spills / restores
llvm-svn: 76024
2009-07-16 14:21:41 +00:00
Anton Korobeynikov
0c3534b070 Add fabs
llvm-svn: 76023
2009-07-16 14:21:27 +00:00
Anton Korobeynikov
fc1f449073 Add fneg
llvm-svn: 76022
2009-07-16 14:21:12 +00:00
Anton Korobeynikov
a73f3ffb1f We don't have native sine / cosine instructions
llvm-svn: 76021
2009-07-16 14:20:56 +00:00
Anton Korobeynikov
d2feb0d2e4 More sint_to_fp stuff
llvm-svn: 76020
2009-07-16 14:20:39 +00:00
Anton Korobeynikov
23615e0340 Add bunch of FP instructions
llvm-svn: 76019
2009-07-16 14:20:24 +00:00
Anton Korobeynikov
32c9954322 We don't have any FP extloads
llvm-svn: 76018
2009-07-16 14:20:08 +00:00
Anton Korobeynikov
643215b0d7 Implement all comparisons
llvm-svn: 76017
2009-07-16 14:19:54 +00:00
Anton Korobeynikov
488f8c2fd1 Add constpool lowering / printing
llvm-svn: 76016
2009-07-16 14:19:35 +00:00
Anton Korobeynikov
4dbabbe3cf Allow FP arguments pass / return
llvm-svn: 76015
2009-07-16 14:19:16 +00:00
Anton Korobeynikov
d4e7c7a373 Register FP regclasses
llvm-svn: 76014
2009-07-16 14:19:02 +00:00
Anton Korobeynikov
2ccdd0fd2b Add FP regs
llvm-svn: 76013
2009-07-16 14:18:48 +00:00
Anton Korobeynikov
d8ced10967 Fix fallout from prev. patch
llvm-svn: 76012
2009-07-16 14:18:31 +00:00
Anton Korobeynikov
3e670f38f9 Provide consistent subreg idx scheme. This (hopefully) fixes remaining divide problems
llvm-svn: 76011
2009-07-16 14:18:17 +00:00
Anton Korobeynikov
bf722c6946 Use divide single for 32 bit signed divides
llvm-svn: 76010
2009-07-16 14:17:52 +00:00