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
Chris Lattner
61fcb8d26b
fix indentation
...
llvm-svn: 76587
2009-07-21 17:25:13 +00:00
Chris Lattner
31a9d57bb9
remove an unneeded override.
...
llvm-svn: 76586
2009-07-21 17:23:41 +00:00
Chris Lattner
2c8fed2c75
more random whitespace cleanup, eliminate #define, avoid copying
...
vectors needlessly, doxygenify comments, improve constness, etc.
llvm-svn: 76585
2009-07-21 17:20:18 +00:00
Chris Lattner
99a474f026
some simple whitespace cleanup, avoid copying vectors for no reason
...
as much, etc.
llvm-svn: 76578
2009-07-21 16:44:47 +00:00
Daniel Dunbar
3447c5ce67
Add missing include.
...
llvm-svn: 76555
2009-07-21 08:58:44 +00:00
Daniel Dunbar
6f594a00b0
Switch this API to StringRef.
...
llvm-svn: 76554
2009-07-21 08:57:31 +00:00
Daniel Dunbar
1edc7a0eab
Remove some unused code.
...
llvm-svn: 76541
2009-07-21 07:08:59 +00:00
Bruno Cardoso Lopes
2015382398
Support adding relocations for data sections, handling the cases where
...
global declared symbols are initialized with references from other global
symbols.
llvm-svn: 76540
2009-07-21 06:51:32 +00:00
Evan Cheng
d76397061a
Add jumps with 8-bit relocation for assembler / disassembler. Patch by Sean Callanan.
...
llvm-svn: 76536
2009-07-21 06:00:18 +00:00
Bill Wendling
50e5f4884a
Add the following functions:
...
- SYSCALL (normal fast system call instruction) [0f 05]
- SYSENTER (system call entry instruction) [0f 34]
- SYSEXIT (system call exit instruction) [0f 35]
- SYSEXIT64 (system call exit instruction to 64-bit user code) [REX.W 0f 35]
- SYSRET (system call return instruction) [0f 07]
Patch by Sean Callanan.
llvm-svn: 76528
2009-07-21 01:07:24 +00:00
Evan Cheng
949c2404a2
Fix ARM isle code that optimize multiply by constants which are power-of-2 +/- 1.
...
llvm-svn: 76520
2009-07-21 00:31:12 +00:00
Dale Johannesen
8b0ece80d9
revert 76503 while I figure out what's going on
...
llvm-svn: 76517
2009-07-21 00:12:29 +00:00
Dale Johannesen
ee3f2d6dc3
Make sure a global matching asm 'i' constraint gets its
...
flags set properly. (hasMemory is clearly irrelevant
when matching 'i', I don't understand what this was
supposed to be doing.)
gcc.apple/asm-block-25.c (test passed before by
accident, but generated code was wrong)
llvm-svn: 76503
2009-07-20 23:39:13 +00:00
Chris Lattner
27a2e74e58
clean up some formatting, indent by 2 instead of 4.
...
llvm-svn: 76490
2009-07-20 22:23:48 +00:00
David Goodwin
c5ee8fbaa7
CMP and TST define CPSR, not use it.
...
llvm-svn: 76489
2009-07-20 22:13:31 +00:00
David Greene
1ac6d4ac0e
Re-apply 75490, 75806 and 76177 with fixes and tests. Efficiency comes
...
next.
llvm-svn: 76486
2009-07-20 22:02:59 +00:00
Bill Wendling
ca94e95735
Simplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that humans can understand it.
...
llvm-svn: 76480
2009-07-20 21:38:26 +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
Daniel Dunbar
2e4aeceacd
Add MCAsmLexer interface.
...
- This provides the AsmLexer interface to the target specific assembly parsers.
llvm-svn: 76460
2009-07-20 20:01:54 +00:00
Evan Cheng
0048e876c3
Fix some sub-reg coalescing bugs where the coalescer wasn't updating the resulting interval's register class.
...
llvm-svn: 76458
2009-07-20 19:47:55 +00:00
Bill Wendling
0407ebb4f7
Rename Mangler linkage enums to something less gross.
...
llvm-svn: 76456
2009-07-20 19:41:27 +00:00
Daniel Dunbar
fca75cd98e
Add MCAsmParser interface.
...
- This provides the AsmParser interface to the target specific assembly
parsers.
llvm-svn: 76453
2009-07-20 18:55:04 +00:00
Chris Lattner
1f82d9a94c
remove TargetAsmInfo::ExpandInlineAsm
...
llvm-svn: 76445
2009-07-20 17:59:32 +00:00
Chris Lattner
72b24cbbf6
Copy ExpandInlineAsm to TargetLowering from TargetAsmInfo.
...
llvm-svn: 76441
2009-07-20 17:51:36 +00:00
Chris Lattner
19134c0748
rename TargetAsmInfo::getASDirective -> getDataASDirective
...
llvm-svn: 76431
2009-07-20 17:12:46 +00:00
David Goodwin
d5865e6c60
Use t2LDRri12 for frame index loads.
...
llvm-svn: 76424
2009-07-20 15:55:39 +00:00
Bruno Cardoso Lopes
b47b093de2
For PC relative relocations where symbols are defined in the same section they
...
are referenced, ignore the relocation entry and patch the relocatable field with
the computed symbol offset directly
llvm-svn: 76414
2009-07-20 08:52:02 +00:00
Evan Cheng
2125e12632
Fix PR4567. Thumb1 target was using the wrong instruction to handle sp = sub fp, #c.
...
llvm-svn: 76401
2009-07-20 06:59:32 +00:00
Evan Cheng
2f6b299d6f
Model fpscr to prevent fcmped / fcmpezs etc from being deleted.
...
llvm-svn: 76390
2009-07-20 02:12:31 +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
Eli Friedman
5208843938
Don't override LowerArguments in the SPARC backend. In addition to
...
being more consistent with other backends, this makes the SPARC backend
deal with functions with arguments with illegal types correctly, which
fixes some tests in test/CodeGen/Generic.
llvm-svn: 76375
2009-07-19 19:53:46 +00:00
Evan Cheng
fd384e9493
Fix a regression from 76124. Thumb1 instructions default to S bit being true.
...
llvm-svn: 76374
2009-07-19 19:16:46 +00:00
Daniel Dunbar
8be4e61a2d
Fix some minor MSVC compiler warnings.
...
llvm-svn: 76356
2009-07-19 01:38:38 +00:00
Daniel Dunbar
d45f99bdbf
Unbreak build
...
llvm-svn: 76354
2009-07-19 01:33:04 +00:00
Eli Friedman
e208ce316a
Switch Alpha over to the new call lowering style. New code mostly
...
copied from the SystemZ target. I don't think this causes any
significant changes to the output (I compared the assembly, and the
results appeared to be essentially unchanged), although I don't actually
have an Alpha to test on.
I would appreciate if anyone with the appropriate hardware could test
this. I'm not sure if that includes anyone subscribed to llvm-commits,
though.
llvm-svn: 76353
2009-07-19 01:11:32 +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
Bruno Cardoso Lopes
84568ea6f1
Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI usage inside getSection* functions
...
llvm-svn: 76347
2009-07-18 23:24:01 +00:00
Daniel Dunbar
cf7334116f
Add some missing includes.
...
llvm-svn: 76346
2009-07-18 23:22:46 +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
Bruno Cardoso Lopes
fc0fe7ea20
Use a better name for the label relocations while emitting them for Jump Tables
...
llvm-svn: 76334
2009-07-18 20:52:11 +00:00
Bruno Cardoso Lopes
d5eafae1fd
Add support to properly reference private symbols on relocation entries.
...
Use proper relocation type to build relocations for JumpTables (rodata
sections).
llvm-svn: 76326
2009-07-18 19:30:09 +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
Evan Cheng
84f06f0ee6
Enable cross register class coalescing.
...
llvm-svn: 76281
2009-07-18 02:10:10 +00:00
Evan Cheng
fe529a2c29
Revert 76177 for now. It's messing up ARM asm printing. Also this significant debate about its efficiency.
...
llvm-svn: 76279
2009-07-18 01:43:53 +00:00
Evan Cheng
67ccedff04
Fix x86 inline ams 'q' constraint support. In 32-bit mode, it's just like 'Q', i.e. EAX, EDX, ECX, EBX. In 64-bit mode, it just means all the i64r registers. Yeah, that makes sense.
...
llvm-svn: 76248
2009-07-17 22:13:25 +00:00
Chris Lattner
ffe0c407be
Untangle a snarl that I discovered when updating the mangler,
...
starting in getCurrentFunctionEHName. Among other problems,
we would try to privative a "foo.eh" label, but end up emitting
the label as _Lfoo.eh instead of L_foo.eh on darwin. This is really
bad, and the linker has always tolerated these labels existing.
For now, just emit them as _foo.eh.
This patch also fixes problems with ".eh" labels on unnamed
functions and eliminates two strangely defined TargetAsmInfo
hooks.
llvm-svn: 76231
2009-07-17 20:46:40 +00:00
Daniel Dunbar
de011196a4
Sketch support for target specific assembly parser.
...
- Not fully enabled yet, need a configure regeneration.
llvm-svn: 76230
2009-07-17 20:42:00 +00:00
Daniel Dunbar
cff1fabab5
Start generating AsmMatcher.inc for X86.
...
llvm-svn: 76213
2009-07-17 18:55:26 +00:00
Jeffrey Yasskin
1669f312b5
r76102 added the MachineCodeEmitter::processDebugLoc call and called it from
...
the X86 Emitter. This patch extends that to the rest of the targets that can
write to a MachineCodeEmitter: ARM, Alpha, and PPC.
llvm-svn: 76211
2009-07-17 18:49:39 +00:00
Anton Korobeynikov
fbac44c040
Add missed return
...
llvm-svn: 76209
2009-07-17 18:28:59 +00:00
David Greene
70e8a51127
Add logic to align instruction operands to columns for pretty-printing.
...
No target uses this currently. This patch only adds the mechanism so
that local installations can choose to enable this.
llvm-svn: 76177
2009-07-17 14:24:46 +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
Eli Friedman
6e61f56a5c
Oops, accidentally set a legal operation to expand.
...
llvm-svn: 76165
2009-07-17 07:34:23 +00:00
Eli Friedman
b946eb988f
Expand misc operations from test/CodeGen/Generic.
...
llvm-svn: 76163
2009-07-17 07:28:06 +00:00
Eli Friedman
93d9c9f85f
Handle void in XCoreTargetLowering::isLegalAddressingMode. Triggers in
...
test/CodeGen/Generic.
llvm-svn: 76162
2009-07-17 07:16:38 +00:00
Eli Friedman
7c72917709
Remove some unnecessary expansion markings. Add a few expansion
...
markings that show up in test/CodeGen/Generic.
llvm-svn: 76160
2009-07-17 07:03:00 +00:00
Eli Friedman
98a65107b3
Add operation expansion/promotion for a bunch of operations, many of
...
which show up in test/CodeGen/Generic.
llvm-svn: 76158
2009-07-17 06:36:24 +00:00
Evan Cheng
490d2cc5a4
Fix tSUBspi operand definition. It reads and writes sp, which is a high register.
...
llvm-svn: 76155
2009-07-17 05:43:12 +00:00
Eli Friedman
12bf15280b
Set an operation expansion, noticed while running
...
llc over test/CodeGen/Generic with -march=alpha.
llvm-svn: 76154
2009-07-17 05:23:03 +00:00
Eli Friedman
6be9680238
One more operation expansion for MIPS, from test/CodeGen/Generic.
...
llvm-svn: 76149
2009-07-17 04:07:24 +00:00
Daniel Dunbar
f988544dcf
Make sure CWriter's Context get's initialized.
...
llvm-svn: 76147
2009-07-17 03:43:21 +00:00
Eli Friedman
48510f16fb
Expand a bunch of illegal operations on MIPS (found by
...
inspection and running over CodeGen/Generic).
llvm-svn: 76146
2009-07-17 02:28:12 +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
dc39f4fff8
Emit cross regclass register moves for thumb2.
...
Minor code duplication cleanup.
llvm-svn: 76124
2009-07-16 23:26:06 +00:00
Evan Cheng
e9dc6cf3b1
GV with ghost linkage (module being lazily streamed in in JIT lazy compilation mode) do not require extra load from stub. This fixes ExecutionEngine/2005-12-02-TailCallBug.ll.
...
llvm-svn: 76121
2009-07-16 22:53:10 +00:00
Jakob Stoklund Olesen
c438f0ecfa
Silence warning in Linux builds:
...
X86InstrInfo.cpp:2272: warning: suggest explicit braces to avoid ambiguous 'else'
llvm-svn: 76105
2009-07-16 21:24:13 +00:00
Jeffrey Yasskin
a4b7ea7485
Add line numbers to OProfile. To do this, I added a processDebugLoc()
...
call to the MachineCodeEmitter interface and made copying the start
line of a function not conditional on whether we're emitting Dwarf
debug information. I'll propagate the processDebugLoc() calls to the
non-X86 targets in a followup patch.
In the long run, it'll probably be better to gather this information
through the DwarfWriter, but the DwarfWriter currently depends on the
AsmPrinter and TargetAsmInfo, and fixing that would be out of the way
for this patch.
There's a bug in OProfile 0.9.4 that makes it ignore line numbers for
addresses above 4G, and a patch fixing it at
http://thread.gmane.org/gmane.linux.oprofile/7634
Sample output:
$ sudo opcontrol --reset; sudo opcontrol --start-daemon; sudo opcontrol --start; `pwd`/Debug/bin/lli fib.bc; sudo opcontrol --stop
Signalling daemon... done
Profiler running.
fib(40) == 165580141
Stopping profiling.
$ opreport -g -d -l `pwd`/Debug/bin/lli|head -60
Overflow stats not available
CPU: Core 2, speed 1998 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
vma samples % linenr info image name symbol name
00007f67a30370b0 25489 61.2554 fib.c:24 10946.jo fib_left
00007f67a30370b0 1634 6.4106 fib.c:24
00007f67a30370b1 83 0.3256 fib.c:24
00007f67a30370b9 1997 7.8348 fib.c:24
00007f67a30370c6 2080 8.1604 fib.c:27
00007f67a30370c8 988 3.8762 fib.c:27
00007f67a30370cd 1315 5.1591 fib.c:27
00007f67a30370cf 251 0.9847 fib.c:27
00007f67a30370d3 1191 4.6726 fib.c:27
00007f67a30370d6 975 3.8252 fib.c:27
00007f67a30370db 1010 3.9625 fib.c:27
00007f67a30370dd 242 0.9494 fib.c:27
00007f67a30370e1 2782 10.9145 fib.c:28
00007f67a30370e5 3768 14.7828 fib.c:28
00007f67a30370eb 615 2.4128 (no location information)
00007f67a30370f3 6558 25.7287 (no location information)
00007f67a3037100 15603 37.4973 fib.c:29 10946.jo fib_right
00007f67a3037100 1646 10.5493 fib.c:29
00007f67a3037101 45 0.2884 fib.c:29
00007f67a3037109 2372 15.2022 fib.c:29
00007f67a3037116 2234 14.3178 fib.c:32
00007f67a3037118 612 3.9223 fib.c:32
00007f67a303711d 622 3.9864 fib.c:32
00007f67a303711f 385 2.4675 fib.c:32
00007f67a3037123 404 2.5892 fib.c:32
00007f67a3037126 634 4.0633 fib.c:32
00007f67a303712b 870 5.5759 fib.c:32
00007f67a303712d 62 0.3974 fib.c:32
00007f67a3037131 1848 11.8439 fib.c:33
00007f67a3037135 2840 18.2016 fib.c:33
00007f67a303713a 1 0.0064 fib.c:33
00007f67a303713b 1023 6.5564 (no location information)
00007f67a3037143 5 0.0320 (no location information)
000000000080c1e4 15 0.0360 MachineOperand.h:150 lli llvm::MachineOperand::isReg() const
000000000080c1e4 6 40.0000 MachineOperand.h:150
000000000080c1ec 2 13.3333 MachineOperand.h:150
...
llvm-svn: 76102
2009-07-16 21:07:26 +00:00
Evan Cheng
39e5f6205a
With recent MC changes, RIP base register is explicitly modeled. Make sure we add it when x86 V_SET0 / V_SETALLONES (by transforming it into a constpool load) into the use instruction.
...
llvm-svn: 76094
2009-07-16 18:44:05 +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
Anton Korobeynikov
785f486b30
Add missed operands types
...
llvm-svn: 76009
2009-07-16 14:17:07 +00:00
Anton Korobeynikov
41d3ac1720
Missed part of prev. patch
...
llvm-svn: 76008
2009-07-16 14:16:45 +00:00
Anton Korobeynikov
7cf7a634df
Another attempt to fix prologue emission
...
llvm-svn: 76007
2009-07-16 14:16:26 +00:00
Anton Korobeynikov
b3af53a626
Implement 'large' PIC model
...
llvm-svn: 76006
2009-07-16 14:16:05 +00:00
Anton Korobeynikov
2889a28adb
Implement shifts properly (hopefilly - finally!)
...
llvm-svn: 76005
2009-07-16 14:15:24 +00:00
Anton Korobeynikov
6ff1411adf
Remove redundand register move
...
llvm-svn: 76004
2009-07-16 14:14:54 +00:00
Anton Korobeynikov
f48e88136e
Properly handle divides. As a bonus - implement memory versions of them.
...
llvm-svn: 76003
2009-07-16 14:14:33 +00:00
Anton Korobeynikov
3434b05a2c
Fix epic fail: full-width muls are not commutable. This unbreaks bunch of stuff from SingleSource/Benchmarks/Stanford
...
llvm-svn: 76002
2009-07-16 14:14:01 +00:00
Anton Korobeynikov
ca4d4129c6
32 bit rotate is not twoaddr instruction
...
llvm-svn: 76001
2009-07-16 14:13:43 +00:00
Anton Korobeynikov
e6b7c15a63
32 bit shifts have only 12 bit displacements
...
llvm-svn: 76000
2009-07-16 14:13:24 +00:00
Anton Korobeynikov
cffc479110
Add proper register aliases
...
llvm-svn: 75999
2009-07-16 14:12:54 +00:00
Anton Korobeynikov
2954802d28
Properly generate stack frame
...
llvm-svn: 75998
2009-07-16 14:12:36 +00:00
Anton Korobeynikov
0e3d764cc1
Unbreak indirect branches
...
llvm-svn: 75997
2009-07-16 14:12:18 +00:00
Anton Korobeynikov
07380f3ab0
Unbreak
...
llvm-svn: 75996
2009-07-16 14:12:00 +00:00
Anton Korobeynikov
1764c55d85
Do not forget to save R15 when we allocate stack frame
...
llvm-svn: 75995
2009-07-16 14:11:40 +00:00
Anton Korobeynikov
31bef4e21c
All calls clobbers R14
...
llvm-svn: 75994
2009-07-16 14:11:22 +00:00
Anton Korobeynikov
a04cb342a7
Unbreak calls to vararg functions
...
llvm-svn: 75993
2009-07-16 14:11:03 +00:00
Anton Korobeynikov
decd66501b
Stupid typo
...
llvm-svn: 75992
2009-07-16 14:10:49 +00:00
Anton Korobeynikov
6d0c8510ab
Typos
...
llvm-svn: 75991
2009-07-16 14:10:35 +00:00
Anton Korobeynikov
6c1091e7f3
Consolidate reg-imm / reg-reg-imm address mode selection logic in one place.
...
llvm-svn: 75990
2009-07-16 14:10:17 +00:00
Anton Korobeynikov
292a84921d
Fix fallout from 12-bit stuff landing: decide whether 20 bit displacements are needed during elimination of frame indexes.
...
llvm-svn: 75989
2009-07-16 14:09:56 +00:00
Anton Korobeynikov
9a1ad49207
Add support for 12 bit displacements
...
llvm-svn: 75988
2009-07-16 14:09:35 +00:00
Anton Korobeynikov
c2ec4e23f6
We already have reserved call frame regardless whether variable sized frame objects were present or not
...
llvm-svn: 75987
2009-07-16 14:09:04 +00:00
Anton Korobeynikov
a809635fc8
Emit proper lowering of load from arg stack slot
...
llvm-svn: 75986
2009-07-16 14:08:42 +00:00
Anton Korobeynikov
9013a1ee39
Implement dynamic allocas
...
llvm-svn: 75985
2009-07-16 14:08:15 +00:00
Anton Korobeynikov
ee8ce5b760
Add jump tables
...
llvm-svn: 75984
2009-07-16 14:07:50 +00:00
Anton Korobeynikov
cb3ee3ee90
Exapnd br_jt into indirect branch. Provide pattern for indirect branches.
...
llvm-svn: 75983
2009-07-16 14:07:24 +00:00
Anton Korobeynikov
21e498ac1c
Implement 64 bit immediates
...
llvm-svn: 75982
2009-07-16 14:07:06 +00:00
Anton Korobeynikov
ab90a05ff3
Add rotates
...
llvm-svn: 75981
2009-07-16 14:06:49 +00:00
Anton Korobeynikov
ff5b07e994
Add patterns for integer negate
...
llvm-svn: 75980
2009-07-16 14:06:27 +00:00
Anton Korobeynikov
335aeecedc
Provide proper patterns for and with imm instructions. Tune the tests accordingly.
...
llvm-svn: 75979
2009-07-16 14:06:00 +00:00
Anton Korobeynikov
49d065e9c9
Add 32 bit and reg-imm and disable invalid patterns for now
...
llvm-svn: 75978
2009-07-16 14:05:32 +00:00
Anton Korobeynikov
c9778b81c9
Add z9 and z10 target processors. Mark z10-only instructions as such.
...
llvm-svn: 75977
2009-07-16 14:05:00 +00:00
Anton Korobeynikov
0cc45f7a03
Fix MUL64rm instruction asmprinting
...
llvm-svn: 75976
2009-07-16 14:04:38 +00:00
Anton Korobeynikov
34fae672be
Preliminary asmprinting of globals
...
llvm-svn: 75975
2009-07-16 14:04:22 +00:00
Anton Korobeynikov
2fb805526a
Implement asmprinting for odd-even regpairs
...
llvm-svn: 75974
2009-07-16 14:04:01 +00:00
Anton Korobeynikov
0fd61ed25a
32-bit ri addressing mode has only 12-bit displacement
...
llvm-svn: 75973
2009-07-16 14:03:41 +00:00
Anton Korobeynikov
77a5da3f8f
Forgot to add
...
llvm-svn: 75972
2009-07-16 14:03:24 +00:00
Anton Korobeynikov
c17d827f85
Do not put bunch of target-specific stuff into common namespace
...
llvm-svn: 75971
2009-07-16 14:03:08 +00:00
Anton Korobeynikov
0be41e9cc1
Print signed imms properly
...
llvm-svn: 75970
2009-07-16 14:02:45 +00:00
Anton Korobeynikov
9ddb4978ed
Provide hooks for spilling / restoring stuff
...
llvm-svn: 75969
2009-07-16 14:01:27 +00:00
Anton Korobeynikov
7d9fd11d73
Revert thinko
...
llvm-svn: 75968
2009-07-16 14:01:10 +00:00
Anton Korobeynikov
2bdca8fa4c
Temporary workaround problem with signed 32-bit imm's
...
llvm-svn: 75967
2009-07-16 14:00:42 +00:00
Anton Korobeynikov
0ed25fd249
Implement InsertBranch() hook
...
llvm-svn: 75966
2009-07-16 14:00:10 +00:00
Anton Korobeynikov
484e1956df
Pipehole pattern for i32 imm's
...
llvm-svn: 75965
2009-07-16 13:59:49 +00:00
Anton Korobeynikov
dfc4f762b3
Bunch of sext_inreg patterns
...
llvm-svn: 75964
2009-07-16 13:59:18 +00:00
Anton Korobeynikov
1030c0611e
Provide normal 32 bit load and store
...
llvm-svn: 75963
2009-07-16 13:58:43 +00:00
Anton Korobeynikov
1e1f1a789b
Proper lower 'small' results
...
llvm-svn: 75962
2009-07-16 13:58:24 +00:00
Anton Korobeynikov
db9fb21b48
Completel forgot about unconditional branches
...
llvm-svn: 75961
2009-07-16 13:57:52 +00:00
Anton Korobeynikov
ce2b70586e
Lower addresses of globals
...
llvm-svn: 75960
2009-07-16 13:57:27 +00:00
Anton Korobeynikov
d984dc6c9d
Provide "wide" muls and divs/rems
...
llvm-svn: 75958
2009-07-16 13:56:42 +00:00
Anton Korobeynikov
6ad41d1540
Fix thinko
...
llvm-svn: 75957
2009-07-16 13:56:11 +00:00
Anton Korobeynikov
72a2743b16
Fix epic bug with invalid regclass for R0D
...
llvm-svn: 75956
2009-07-16 13:55:51 +00:00
Anton Korobeynikov
c4e9f407ae
More register pairs (now 32 bit ones)
...
llvm-svn: 75954
2009-07-16 13:55:04 +00:00
Anton Korobeynikov
ffea8dd106
Add even-odd register pairs
...
llvm-svn: 75953
2009-07-16 13:54:45 +00:00
Anton Korobeynikov
6a90c957dd
Unbreak due to mainline api change
...
llvm-svn: 75952
2009-07-16 13:54:20 +00:00
Anton Korobeynikov
c42f164135
Preliminary mul lowering
...
llvm-svn: 75951
2009-07-16 13:53:55 +00:00
Anton Korobeynikov
f93f6b0ed3
More extloads
...
llvm-svn: 75950
2009-07-16 13:53:35 +00:00
Anton Korobeynikov
e26fb377c5
SELECT_CC lowering
...
llvm-svn: 75948
2009-07-16 13:52:51 +00:00
Anton Korobeynikov
769a8c2312
Conditional branches and comparisons
...
llvm-svn: 75947
2009-07-16 13:52:31 +00:00
Anton Korobeynikov
3df5bd3b40
Emit correct offset for PseudoSourceValue
...
llvm-svn: 75946
2009-07-16 13:52:10 +00:00
Anton Korobeynikov
57bf9a3426
Provide proper stack offsets for outgoing arguments
...
llvm-svn: 75945
2009-07-16 13:51:53 +00:00
Anton Korobeynikov
4906b76843
Change register allocation order to reduce amount of callee-saved regs to be spilled.
...
llvm-svn: 75944
2009-07-16 13:51:34 +00:00
Anton Korobeynikov
b4a6f3c467
Emit callee-saved regs spills / restores
...
llvm-svn: 75943
2009-07-16 13:51:12 +00:00
Anton Korobeynikov
4fcadd1a7d
Some preliminary call lowering
...
llvm-svn: 75941
2009-07-16 13:50:21 +00:00
Anton Korobeynikov
f4257ba74e
Prologue / epilogue emission
...
llvm-svn: 75940
2009-07-16 13:49:49 +00:00
Anton Korobeynikov
dd60515f11
Add simple frame index elimination
...
llvm-svn: 75939
2009-07-16 13:49:25 +00:00