Daniel Dunbar
51e72707b7
Remove unused variables.
...
llvm-svn: 81718
2009-09-13 21:31:07 +00:00
Chris Lattner
eb2cc68254
remove all but one reference to TargetRegisterDesc::AsmName.
...
llvm-svn: 81714
2009-09-13 20:31:40 +00:00
Chris Lattner
ad10b3be3e
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
56950c6b97
switch the x86 asmprinters to use getRegisterName instead
...
of getting it from TRI, inst printing now is codegen context
free!
llvm-svn: 81710
2009-09-13 20:15:16 +00:00
Chris Lattner
06c5eed9e9
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
6ceb0faafd
make intel asmprinter use TRI::getAsmName instead of TRI::getName like
...
all the other targets. Add support for weak/linkonce linkage so it doesn't
crash on basically all nontrivial testcases.
llvm-svn: 81704
2009-09-13 19:44:38 +00:00
Chris Lattner
1cbd3ded33
split MCInst printing out of the X86ATTInstPrinter
...
class into its own X86ATTInstPrinter class. The inst
printer now has just one dependence on the code generator
(TRI).
llvm-svn: 81703
2009-09-13 19:30:11 +00:00
Chris Lattner
159db96ae1
reduce indentation with early exit.
...
llvm-svn: 81699
2009-09-13 19:10:08 +00:00
Chris Lattner
43f119c3da
delete the fixme too! :)
...
llvm-svn: 81689
2009-09-13 18:50:22 +00:00
Chris Lattner
033d31165d
merge the linux cpool/jtbl pic tests into pic.ll and convert to filecheck.
...
Change the picbase symbol on non-darwin systems from ".Lllvm$4.$piclabel" to
".L4$pb". The actual name doesn't matter and the darwin name is shorter.
llvm-svn: 81688
2009-09-13 18:46:37 +00:00
Chris Lattner
1c815bef6a
make X86ATTAsmPrinter::PrintPICBaseSymbol forward to X86MCInstLower.
...
llvm-svn: 81685
2009-09-13 18:33:59 +00:00
Chris Lattner
1d04aa78f3
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
4cd449813a
convert some uses of printBasicBlockLabel to use GetMBBSymbol
...
instead.
llvm-svn: 81677
2009-09-13 17:14:04 +00:00
Anton Korobeynikov
6b9b8c1471
Fix merge problem
...
llvm-svn: 81658
2009-09-13 01:12:15 +00:00
Anton Korobeynikov
6c89da7027
Define proper subreg sets for arm - this should fix bunch of subtle problems
...
with subreg - superreg mapping and also fix PR4965.
llvm-svn: 81657
2009-09-13 00:59:43 +00:00
Chris Lattner
a602bebb61
devirtualize AsmPrinter::printBasicBlockLabel since it is never overridden.
...
Move GetMBBSymbol up to AsmPrinter and make printBasicBlockLabel use it so that
we only have one place that decides what to name bb labels. Hopefully various
clients of printBasicBlockLabel can start using GetMBBSymbol instead.
llvm-svn: 81652
2009-09-12 23:02:08 +00:00
Anton Korobeynikov
8d0fbebb9f
Add QPR_VFP2 regclass and add copy_to_regclass nodes, where needed to
...
constraint the register usage.
llvm-svn: 81635
2009-09-12 22:21:08 +00:00
Chris Lattner
a1378f3d89
factor MBB label lowering better
...
llvm-svn: 81630
2009-09-12 21:06:08 +00:00
Chris Lattner
6ccf7ed4be
X86MCInstLower::Lower should only not emit anything to OutStreamer,
...
this means that it can only lower one MachineInstr to one MCInst. To
make this fly, we need to pull out handling of MO_GOT_ABSOLUTE_ADDRESS
(which generates an implicit label) out of X86MCInstLower.
llvm-svn: 81629
2009-09-12 21:01:20 +00:00
Chris Lattner
5090e6c4a7
eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
...
MBB labels like everything else.
llvm-svn: 81628
2009-09-12 20:45:03 +00:00
Chris Lattner
3172208823
split MachineInstr -> MCInst lowering into its own class (not
...
being embedded into X86ATTAsmPrinter). This still depends heavily
on X86ATTAsmPrinter, but this is a step in the right direction.
llvm-svn: 81627
2009-09-12 20:34:57 +00:00
Chris Lattner
a3f2662a24
remove the "old" at&t style asmprinter. Unfortunately, most of the
...
operand printing crapola cannot be removed yet because it is used by
the inline asm print stuff.
llvm-svn: 81626
2009-09-12 20:01:36 +00:00
Sean Callanan
57dba6768e
Added the WAIT instruction to the Intel tables,
...
for the purposes of the disassembler.
llvm-svn: 81603
2009-09-12 02:52:41 +00:00
Sean Callanan
29849eadef
Added CMPS (string comparison) instructions for all
...
operand widths to the Intel instruction tables, for
the purposes of the disassembler.
llvm-svn: 81601
2009-09-12 02:25:20 +00:00
Chris Lattner
42c1287b68
fix another GCC bootstrap problem, which manifested as things
...
like:
foo.s:2412:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb"
llvm-svn: 81596
2009-09-12 01:11:50 +00:00
Chris Lattner
37a4e48529
fix an embarassing typo that resulted in llvm-gcc bootstrap miscompare
...
because the sorting wasn't sorting.
llvm-svn: 81592
2009-09-12 00:49:00 +00:00
Sean Callanan
4dc00d3781
Added SCAS instructions in their 8, 16, 32, and
...
64-bit variants for the disassembler.
llvm-svn: 81591
2009-09-12 00:37:19 +00:00
Ted Kremenek
c74e09f654
Update CMake files.
...
llvm-svn: 81577
2009-09-11 21:49:45 +00:00
Jim Grosbach
210d6fef51
Revert array initialization regclass change so that the initialization stays static, not runtime.
...
llvm-svn: 81560
2009-09-11 20:13:17 +00:00
Jim Grosbach
a1072a85d6
Update register class references to use the global constant ARM::*RegisterClass names.
...
llvm-svn: 81556
2009-09-11 19:49:06 +00:00
Sean Callanan
31e48cdb5d
Added ADC, SUB, SBB, and OR instructions that operate
...
on rAX and an immediate.
llvm-svn: 81551
2009-09-11 19:01:56 +00:00
Chris Lattner
8b3a539579
fix pasto
...
llvm-svn: 81544
2009-09-11 18:33:44 +00:00
Chris Lattner
61bfc3adeb
fix some fixmes: emit stubs in sorted order.
...
llvm-svn: 81541
2009-09-11 18:20:26 +00:00
Chris Lattner
992e42b606
turn on -experimental-asm-printer for x86 / AT&T by default.
...
llvm-svn: 81532
2009-09-11 17:07:27 +00:00
Chris Lattner
19a9f42f20
switch HiddenGVStubs to be a DenseMap instead of a string map, mirroring FnStubs and GVStubs.
...
llvm-svn: 81514
2009-09-11 07:03:20 +00:00
Chris Lattner
446d589cad
Fix a bug I introduced in FnStubs generation, switch GVStubs to be a
...
densemap instead of StringMap to match FnStubs.
llvm-svn: 81513
2009-09-11 06:59:18 +00:00
Chris Lattner
9a7edd6bba
change FnStubs from being a StringMap<std::string> to being a much
...
more efficient SmallPtrSet<MCSymbol*>. This eliminates string
craziness and fixes CodeGen/X86/darwin-quote.ll with the new asmprinter.
Codegen is producing stubs in a nondeterminstic order, but it was doing
this before anyway.
llvm-svn: 81511
2009-09-11 06:36:33 +00:00
Chris Lattner
30c44c053f
printInstruction() no longer prints a \n after itself, do it
...
for the two instruction MOVPC32r sequence.
llvm-svn: 81509
2009-09-11 05:59:55 +00:00
Chris Lattner
35ed98aaef
reimplement X86ATTAsmPrinter::GetGlobalAddressSymbol in terms of
...
Mangler::getNameWithPrefix. In addition to avoiding some over
quoting, this also is more efficient because it uses smallvector
instead of std::string thrashing.
llvm-svn: 81508
2009-09-11 05:58:44 +00:00
Chris Lattner
1051efc339
convert X86ATTAsmPrinter::GetExternalSymbolSymbol to use SmallString
...
instead of std::string and Mangler.
llvm-svn: 81503
2009-09-11 04:36:43 +00:00
Chris Lattner
482c5df56d
rearrange some code, export a SmallString version of DecorateCygMingName.
...
llvm-svn: 81502
2009-09-11 04:28:13 +00:00
Evan Cheng
74a3231de4
Follow up to 81494. When the folded reload is narrowed to a 32-bit load then change the destination register to a 32-bit one or add a sub-register index.
...
llvm-svn: 81496
2009-09-11 01:01:31 +00:00
Evan Cheng
3cad6283b8
It's not legal to fold a load from a narrower stack slot into a wider instruction. If done, the instruction does a 64-bit load and that's not
...
safe. This can happen we a subreg_to_reg 0 has been coalesced. One
exception is when the instruction that folds the load is a move, then we
can simply turn it into a 32-bit load from the stack slot.
rdar://7170444
llvm-svn: 81494
2009-09-11 00:39:26 +00:00
Kevin Enderby
ce4bec8e0c
Added the ParseInstruction() hook for target specific assembler directives so
...
that things like .word can be parsed as target specific. Moved parsing .word
out of AsmParser.cpp into X86AsmParser.cpp as it is 2 bytes on X86 and 4 bytes
for other targets that support the .word directive.
llvm-svn: 81461
2009-09-10 20:51:44 +00:00
Sean Callanan
62aebf9fa2
Added XOR instructions for rAX and immediates of
...
various widths.
llvm-svn: 81458
2009-09-10 19:52:26 +00:00
Sean Callanan
64804f37bb
Added MOV instructions between rAX and memory offsets,
...
including segment offsets and (for 8-bit operands)
absolute offsets.
llvm-svn: 81457
2009-09-10 18:33:42 +00:00
Sean Callanan
31bb414efd
Added a variety of PUSH and POP instructions, including
...
ones capable of accessing R/M operands instead of just
registers.
llvm-svn: 81456
2009-09-10 18:29:13 +00:00
Evan Cheng
f6b2404a84
Proper support of non-lazy indirect symbols.
...
llvm-svn: 81422
2009-09-10 01:23:53 +00:00
Evan Cheng
71140344f0
Fix double load / store multiple encoding.
...
llvm-svn: 81403
2009-09-09 23:55:03 +00:00
Bob Wilson
a2e8333eed
Fix pr4939: Change FPCCToARMCC to translate SETOLE to ARMCC::LS.
...
See the bug report for details.
llvm-svn: 81397
2009-09-09 23:14:54 +00:00
Chris Lattner
321bc99a74
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
Chris Lattner
d9e12345af
add a gross hack to get "SrcLine" comments to show up with the
...
new asmprinter. Differently gross hack coming next.
llvm-svn: 81379
2009-09-09 20:45:42 +00:00
Chris Lattner
716a8c92d0
hoist the call to processDebugLoc out of the generated
...
asm printer into the "printInstruction" routine. This
fixes a problem where the experimental asmprinter would
drop debug labels in some cases, and fixes issues on ppc/xcore
where pseudo instructions like "mr" didn't get debug locs properly.
It is annoying that this moves the call from one place into each
target, but a future set of more invasive refactorings will fix
that problem.
llvm-svn: 81377
2009-09-09 20:34:59 +00:00
Anton Korobeynikov
bfd22dd704
Provide proper section flags for various BSS flavours
...
llvm-svn: 81322
2009-09-09 08:48:53 +00:00
Anton Korobeynikov
1df58860e8
Whitespace cleanup
...
llvm-svn: 81321
2009-09-09 08:41:20 +00:00
Chris Lattner
afa12db8a6
disable the new asmprinter by default. Both the Mangler and MCSymbol
...
printing stuff are quoting symbols now, breaking objc testcases.
llvm-svn: 81319
2009-09-09 06:11:14 +00:00
Evan Cheng
cf61d68eaf
Cast MO.getImm() to unsigned before comparing with an unsigned limit.
...
llvm-svn: 81318
2009-09-09 06:05:16 +00:00
Evan Cheng
4029b85567
Make sure to make stub region writable before emission, executable after emission.
...
llvm-svn: 81311
2009-09-09 01:56:29 +00:00
Evan Cheng
9fa8345b65
Fix arm jit encoding bug introduced by 75048. Some instructions', e.g. MOVi, bit 25 should be set.
...
llvm-svn: 81310
2009-09-09 01:47:07 +00:00
Evan Cheng
a1c6495af7
Remove comments which don't add much to .s readibility.
...
llvm-svn: 81306
2009-09-09 01:38:23 +00:00
Chris Lattner
ba0d9f538f
turn the mcinst asmprinter on by default for x86, tweaking two tests to
...
expect the slight syntax differences in the generated code.
llvm-svn: 81305
2009-09-09 00:41:36 +00:00
Chris Lattner
24083066c8
tidy up
...
llvm-svn: 81304
2009-09-09 00:40:31 +00:00
Chris Lattner
f2fefedcf8
make sure to send external symbols through the mangler,
...
this fixes mingw-alloca.ll with the new asmprinter.
llvm-svn: 81301
2009-09-09 00:23:32 +00:00
Chris Lattner
c5a95c5aad
add support for @PLT and friends on external symbols, fixes
...
x86-64-pic-11.ll with the new asmprinter.
llvm-svn: 81294
2009-09-09 00:10:14 +00:00
Chris Lattner
e819cfbc71
change selectiondag to add the sign extended versions of immediate operands
...
to instructions instead of zero extended ones. This makes the asmprinter
print signed values more consistently. This apparently only really affects
the X86 backend.
llvm-svn: 81265
2009-09-08 23:05:44 +00:00
Anton Korobeynikov
7697d37777
Unbreak getOnesVector() / getZeroVector() to use valid ARM extended imm's.
...
llvm-svn: 81262
2009-09-08 22:51:43 +00:00
Anton Korobeynikov
59e2b8e894
Add NEON 'laned' operations. This fixes another bunch of gcc testsuite fails and
...
makes the code faster.
llvm-svn: 81220
2009-09-08 15:22:32 +00:00
Richard Pennington
bd1fc36002
Add source debug information to the Sparc code generator.
...
llvm-svn: 81215
2009-09-08 12:47:30 +00:00
Nicolas Geoffray
8ab546ddca
Also emit a label for TargetInstrInfo::GC_LABEL.
...
llvm-svn: 81206
2009-09-08 07:36:18 +00:00
Chris Lattner
adb4545d14
add support for some missing modifiers on jumptable/constant pool entries.
...
llvm-svn: 81199
2009-09-08 06:25:12 +00:00
Chris Lattner
31d1810b16
add a bunch more evil lowering code to work around various :subreg32 modifiers
...
in the .td files. This gets us down to 18 failures in codegen/x86 with the
new asmprinter.
llvm-svn: 81198
2009-09-08 06:19:15 +00:00
Chris Lattner
520a7f9250
ADd support for "lowering" the X86::MOVZX16rr8/X86::MOVZX16rm8
...
subreg32 modifiers.
llvm-svn: 81196
2009-09-08 06:03:07 +00:00
Chris Lattner
8280e58545
add a hack to lower MOV16r0 to MOV32r0 in MCInstLower, eliminating
...
the problem with subreg32 modifiers. This gets all of Olden working
with the new asmprinter.
llvm-svn: 81195
2009-09-08 05:49:25 +00:00
Chris Lattner
b2fcd070e2
fix PR4767, a crash because fp stackifier visited blocks in
...
depth first order, so it wouldn't process unreachable blocks.
When compiling at -O0, late dead block elimination isn't done
and the bad instructions got to isel.
llvm-svn: 81187
2009-09-08 04:55:44 +00:00
Anton Korobeynikov
d2c19c74d6
Do not create calls via PLT in compilation callback - this is higly platform
...
dependent. Hopefully, this will fix PR3801.
llvm-svn: 81132
2009-09-06 20:21:48 +00:00
Duncan Sands
bfb9719dad
Remove a left over bit of code with no effect.
...
llvm-svn: 81128
2009-09-06 19:29:07 +00:00
Duncan Sands
8a2aa38c55
Remove unreachable code.
...
llvm-svn: 81126
2009-09-06 19:27:53 +00:00
Duncan Sands
6bd6a72e73
Avoid an unused variable warning when assertions are
...
disabled.
llvm-svn: 81122
2009-09-06 16:27:34 +00:00
Duncan Sands
d216b05e75
Mark more constants unsigned, as warned about by icc ( #68 ).
...
Patch by Erick Tryzelaar.
llvm-svn: 81116
2009-09-06 12:56:52 +00:00
Duncan Sands
89720bbd11
Remove some not-really-used variables, as warned
...
about by icc (#593 , partial). Patch by Erick Tryzelaar.
llvm-svn: 81115
2009-09-06 12:41:19 +00:00
Duncan Sands
8234cdb68f
Remove strange 'const' qualifiers, as warned about by icc
...
(#411 ). Patch by Erick Tryzelaar.
llvm-svn: 81113
2009-09-06 12:16:26 +00:00
Duncan Sands
2fbeaf084f
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
Jim Grosbach
1eaa90b901
Whitespace cleanup
...
llvm-svn: 80978
2009-09-04 01:38:51 +00:00
Bill Wendling
ea0185fe91
If we've pushed registers onto the stack, but aren't adjusting the stack pointer
...
(i.e., there are no local variables and stuff), we still need to output FDE
information for the pushed registers.
llvm-svn: 80960
2009-09-03 22:19:22 +00:00
David Goodwin
d93c668f00
Calls clobber FPSCR.
...
llvm-svn: 80956
2009-09-03 22:12:28 +00:00
Dan Gohman
d0d5e685da
Recognize more opportunities to use SSE min and max instructions,
...
swapping the operands if necessary.
llvm-svn: 80940
2009-09-03 20:34:31 +00:00
Mon P Wang
3e82117210
Fixed a few problems with vector shifts
...
- when transforming a vector shift of a non-immediate scalar shift amount, zero
extend the i32 shift amount to i64 since the vector shift reads 64 bits
- when transforming i16 vectors to use a vector shift, zero extend i16 shift amount
- improve the code quality in some cases when transforming vectors to use a vector shift
llvm-svn: 80935
2009-09-03 19:56:25 +00:00
Dan Gohman
319cc69f88
Add a -disable-16bit flag and associated support for experimenting with
...
disabling the use of 16-bit operations on x86. This doesn't yet work for
inline asms with 16-bit constraints, vectors with 16-bit elements,
trampoline code, and perhaps other obscurities, but it's enough to try
some experiments.
llvm-svn: 80930
2009-09-03 17:18:51 +00:00
Kevin Enderby
7d91218c75
Removed the non-target independent AsmToken::Register enum constant
...
from MCAsmLexer.h in preparation of supporting other targets. Changed the
X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking
for AsmToken::Percent when parsing in places that used AsmToken::Register.
Then changed X86ATTAsmParser::ParseRegister to parse out registers as an
AsmToken::Percent followed by an AsmToken::Identifier.
llvm-svn: 80929
2009-09-03 17:15:07 +00:00
Benjamin Kramer
13d048fdff
CppBackend: avoid printing unnecessary whitespace.
...
llvm-svn: 80917
2009-09-03 14:58:24 +00:00
Chris Lattner
51a0712538
don't call getOffset() on jump tables, this fixes three failing olden benchmarks
...
with the new asmprinter.
llvm-svn: 80906
2009-09-03 07:36:42 +00:00
Chris Lattner
c7b00730ad
Implement support for X86II::MO_GOT_ABSOLUTE_ADDRESS. We get very
...
different formatting from the old asmprinter, but it should be
semantically the same. We used to get:
popl %eax
addl $_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$6.$piclabel], %eax
...
Now we get:
popl %eax
.Lpicbaseref6:
addl $(_GLOBAL_OFFSET_TABLE_ + (.Lpicbaseref6 - .Lllvm$6.$piclabel)), %eax
...
llvm-svn: 80905
2009-09-03 07:30:56 +00:00
Evan Cheng
1b38952c99
Reference to hidden symbols do not have to go through non-lazy pointer in non-pic mode. rdar://7187172.
...
llvm-svn: 80904
2009-09-03 07:04:02 +00:00
Chris Lattner
7a53b96394
remove extraneous hack.
...
llvm-svn: 80893
2009-09-03 05:54:00 +00:00
Daniel Dunbar
c3a0aba120
Make these functions static and local.
...
llvm-svn: 80892
2009-09-03 05:47:34 +00:00
Chris Lattner
f4366a3998
Thread an MCAsmInfo pointer through the various MC printing APIs,
...
and fix a few things using << on MCSymbols to use ->print(). No
functionality change other than unbreaking my previous patch.
llvm-svn: 80890
2009-09-03 05:46:51 +00:00
Chris Lattner
1a67fe8862
just use dump()
...
llvm-svn: 80889
2009-09-03 05:39:09 +00:00
Chris Lattner
954b9cd41f
merge globaladdress symbol processing stuff into other stuff. Now
...
all global variable operand flag processing stuff is shared between
different operand types.
llvm-svn: 80886
2009-09-03 05:06:07 +00:00
Evan Cheng
155deabbcb
Unbreak x86_64 build.
...
llvm-svn: 80885
2009-09-03 05:01:00 +00:00
Chris Lattner
6370d5606c
Split the "operand -> symbol" logic from the "get offset and other munging
...
from operand" logic. GlobalAddress still todo.
llvm-svn: 80884
2009-09-03 04:56:20 +00:00
Chris Lattner
5daf61910e
implement lowering support for constant pool index operands, this gets a bunch more
...
olden programs working.
llvm-svn: 80881
2009-09-03 04:44:53 +00:00
Evan Cheng
47455a79ae
X86JITInfo::getLazyResolverFunction() should not read cpu id to determine whether sse is available. Just use consult subtarget.
...
No functionality changes.
llvm-svn: 80880
2009-09-03 04:37:05 +00:00
Chris Lattner
620713c5b4
simplify this by using SmallString::str(), much nicer!
...
llvm-svn: 80874
2009-09-03 03:54:02 +00:00
Sean Callanan
f400442927
Added opaque 32-, 48-, and 80-bit memory operand types to the X86
...
instruction tables to support segmented addressing (and other objects
of obscure type).
Modified the X86 assembly printers to handle these new operand types.
Added JMP and CALL instructions that use segmented addresses.
llvm-svn: 80857
2009-09-03 00:04:47 +00:00
Anton Korobeynikov
f0da41c3e4
More missed vdup patterns
...
llvm-svn: 80838
2009-09-02 21:21:28 +00:00
Chris Lattner
7bd37b47c8
switch from std::string to SmallString + raw_svector_ostream.
...
llvm-svn: 80807
2009-09-02 17:37:38 +00:00
Chris Lattner
74f4ca7cb2
split mcinst lowering stuff out to its own file.
...
llvm-svn: 80806
2009-09-02 17:35:12 +00:00
Sandeep Patel
68c5f477fa
Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
...
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Chris Lattner
d5f4fcceae
refactor select 'sched insertion' out to its own method.
...
llvm-svn: 80764
2009-09-02 05:57:00 +00:00
Chris Lattner
cc8c581a5b
Add support for modeling whether or not the processor has support for
...
conditional moves as a subtarget feature. This is the easy part of
PR4841.
llvm-svn: 80763
2009-09-02 05:53:04 +00:00
Sean Callanan
a8ee2e7496
Fixed the asmstrings for 8-bit, 16-bit, and 32-bit ADD %rAX, imm instructions.
...
Added a 64-bit ADD %RAX, imm32 instruction.
Added all 4 forms for AND %rAX, imm and CMP %rAX, imm.
llvm-svn: 80746
2009-09-02 00:55:49 +00:00
Daniel Dunbar
ff0e622d1c
Simplify.
...
llvm-svn: 80729
2009-09-01 22:07:06 +00:00
Daniel Dunbar
9ab9e0aa25
Fix what I believe is a copy-n-pasto introduced in r78129.
...
- Bruno, please check!!
llvm-svn: 80728
2009-09-01 22:07:00 +00:00
Daniel Dunbar
6c3843866c
X86/Encoding: Support ExternalSymbol operands in emitDisplacementField (for consistency).
...
llvm-svn: 80727
2009-09-01 22:06:53 +00:00
Daniel Dunbar
f7a14aa43d
Remove Offset from ExternalSybmol MachineOperands, this is unused (and at least partly unsupported, in X86 encoding at least).
...
llvm-svn: 80726
2009-09-01 22:06:46 +00:00
Jim Grosbach
e4459e466f
reduce size of SmallString to something more reasonable
...
llvm-svn: 80710
2009-09-01 18:55:08 +00:00
Bob Wilson
d7797754d4
Add support for generating code for vst{234}lane intrinsics.
...
llvm-svn: 80707
2009-09-01 18:51:56 +00:00
Jim Grosbach
c5fcbdc7ee
Use raw_ostream instead of sstream
...
llvm-svn: 80704
2009-09-01 18:49:12 +00:00
David Goodwin
5f582b7290
RRX reads CPSR.
...
llvm-svn: 80699
2009-09-01 18:32:09 +00:00
Sean Callanan
09b2e51711
Added TEST %rAX, $imm instructions to the Intel tables. These are required for the X86 disassembler.
...
llvm-svn: 80696
2009-09-01 18:14:18 +00:00
Bruno Cardoso Lopes
0f20a5b338
Reapply 80278
...
Add MO flags to simplify the printing of relocations.
Remove the support for printing large code model relocs (which
aren't supported anyway).
llvm-svn: 80691
2009-09-01 17:27:58 +00:00
Sanjiv Gupta
a19e971f0c
Further refactoring of PIC16 Obj file code.
...
llvm-svn: 80670
2009-09-01 10:47:31 +00:00
Bob Wilson
da9817cddd
Generate code for vld{234}_lane intrinsics.
...
llvm-svn: 80656
2009-09-01 04:26:28 +00:00
Jim Grosbach
345a5ae6e4
Fix compiler warnings
...
llvm-svn: 80650
2009-09-01 02:05:03 +00:00
Jim Grosbach
20eac92d88
Clean up LSDA name generation and use for SJLJ exception handling. This
...
makes an eggregious hack somewhat more palatable. Bringing the LSDA forward
and making it a GV available for reference would be even better, but is
beyond the scope of what I'm looking to solve at this point.
Objective C++ code could generate function names that broke the previous
scheme. This fixes that.
llvm-svn: 80649
2009-09-01 01:57:56 +00:00
Evan Cheng
4f835f1d7d
Remove .n suffix for some 16-bit opcodes now that Darwin assembler is fixed.
...
llvm-svn: 80615
2009-08-31 20:14:07 +00:00
Daniel Dunbar
b0215efc45
X86/exp-asm-printer: Lower MachineOperand::MO_JumpTableIndex to MCOperand.
...
- Down to 7 failures on 403.gcc.
llvm-svn: 80605
2009-08-31 19:14:05 +00:00
Daniel Dunbar
443f849b6b
Stop printing old asm printing code inline with -experimental-asm-printer (this allows diffing and assembling the .s)
...
llvm-svn: 80604
2009-08-31 19:13:56 +00:00
Daniel Dunbar
524630915d
Avoid unnecessary +0 in experimental-asm-printer.
...
llvm-svn: 80603
2009-08-31 19:13:47 +00:00
Devang Patel
9fda4bd998
Simplify isDerivedType() and other predicate interface.
...
llvm-svn: 80602
2009-08-31 18:49:10 +00:00
Duncan Sands
9cf8bcb69d
Revert commit 80428. It completely broke exception
...
handling on x86-32 linux.
llvm-svn: 80592
2009-08-31 16:45:16 +00:00
Benjamin Kramer
3c62f5095a
Normalize makefile comments and sort cmake file lists.
...
llvm-svn: 80584
2009-08-31 13:05:24 +00:00
Daniel Dunbar
73da11ebda
llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.
...
Also, use MCInst::print instead of custom code in MCAsmPrinter.
llvm-svn: 80575
2009-08-31 08:08:38 +00:00
Anton Korobeynikov
3681144bd8
Add missed pattern
...
llvm-svn: 80502
2009-08-30 19:06:39 +00:00
Anton Korobeynikov
eab572a8ff
EXTRACT_VECTOR_ELEMENT can have result type different from element type.
...
Remove the assertion and generalize the code for ARM NEON stuff.
llvm-svn: 80498
2009-08-30 17:14:54 +00:00
Daniel Dunbar
6e8b1a2530
llvm-mc/X86: Encode constant MCValue's correctly.
...
llvm-svn: 80485
2009-08-30 06:17:49 +00:00
Dan Gohman
ca73326f56
CMOV_GR8 clobbers EFLAGS when its expansion involves an xor to set
...
a register to 0. This fixes PR4814.
llvm-svn: 80445
2009-08-29 22:19:15 +00:00
Bill Wendling
39bb29f7fe
- Add target lowering methods to get the preferred format for the FDE and LSDA
...
encodings.
- Make some of the values emitted by the FDEs dependent upon the pointer
size. This is in line with how GCC does things. And it has the benefit of
working for Darwin in 64-bit mode now.
llvm-svn: 80428
2009-08-29 12:20:54 +00:00
Anton Korobeynikov
ece642a54c
Do not assert on too wide splats we don't support.
...
llvm-svn: 80409
2009-08-29 00:08:18 +00:00
Anton Korobeynikov
cd41d07f29
Add missed extract_element pattern
...
llvm-svn: 80408
2009-08-28 23:41:26 +00:00
Devang Patel
80ae34974b
Reapply 79977.
...
Use MDNodes to encode debug info in llvm IR.
llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Evan Cheng
43b9ca6f42
Let Darwin linker auto-synthesize stubs and lazy-pointers. This deletes a bunch of nasty code in ARM asm printer.
...
llvm-svn: 80404
2009-08-28 23:18:09 +00:00
Anton Korobeynikov
f43ab91486
Short-term workaround for frame-related weirdness on win64.
...
Some other minor win64 fixes as well.
Patch by Michael Beck!
llvm-svn: 80370
2009-08-28 16:06:41 +00:00
Daniel Dunbar
3033db2448
Fix -Asserts warning, round two.
...
llvm-svn: 80354
2009-08-28 08:08:22 +00:00
Evan Cheng
4047b53a40
Print a nl before pic labels so they start at a new line. This makes assembly more readable.
...
llvm-svn: 80350
2009-08-28 06:59:37 +00:00
Daniel Dunbar
d46e3466e7
Fix -Asserts warning.
...
llvm-svn: 80338
2009-08-28 05:47:56 +00:00
Evan Cheng
6da267de23
v4, v5 does not support sxtb / sxth.
...
llvm-svn: 80322
2009-08-28 00:31:43 +00:00
Bruno Cardoso Lopes
e91191630b
Revert 80278 for now, it caused a lot of MIPS tests to fail
...
llvm-svn: 80280
2009-08-27 19:57:56 +00:00
Bruno Cardoso Lopes
18c21daafb
Revamp our friend Mips :)
...
Add MO flags to simplify the printing of relocations.
Remove the support for printing large code model relocs (which
aren't supported anyway).
llvm-svn: 80278
2009-08-27 19:40:40 +00:00
Dan Gohman
931ec72ebf
Don't mark CMOV_GR8 as two-address, or commutable, since it's a pseudo.
...
llvm-svn: 80271
2009-08-27 18:16:24 +00:00
Eric Christopher
69baa5139b
Add FIXME for when we support more specific XMM registers.
...
llvm-svn: 80269
2009-08-27 18:08:16 +00:00
Eric Christopher
799c92bcfb
Nuke trailing whitespace.
...
llvm-svn: 80268
2009-08-27 18:07:15 +00:00
Anton Korobeynikov
ba53af58f0
Hopefully the final missing part :(
...
scalar_to_vector is fully legal now
llvm-svn: 80251
2009-08-27 16:25:49 +00:00
Anton Korobeynikov
076f105d86
Forgot about actual change :)
...
llvm-svn: 80250
2009-08-27 16:10:17 +00:00
Anton Korobeynikov
58ebae4acd
Transform float scalar_to_vector into subreg accesses.
...
No idea whether this is profitable or not.
llvm-svn: 80245
2009-08-27 14:38:44 +00:00
Misha Brukman
209baa5c48
STRD and LDRD require ARMv5TE, not just ARMv5T.
...
See http://llvm.org/PR4687 for more info and links.
llvm-svn: 80244
2009-08-27 14:14:21 +00:00
Daniel Dunbar
981a71c302
llvm-mc/X86: Implement single instruction encoding interface for MC.
...
- Note, this is a gigantic hack, with the sole purpose of unblocking further
work on the assembler (its also possible to test the mathcer more completely
now).
- Despite being a hack, its actually good enough to work over all of 403.gcc
(although some encodings are probably incorrect). This is a testament to the
beauty of X86's MachineInstr, no doubt! ;)
llvm-svn: 80234
2009-08-27 08:12:55 +00:00
Daniel Dunbar
6ec97df98f
X86: Mark EH_RETURN as code-gen-only.
...
llvm-svn: 80232
2009-08-27 07:58:05 +00:00
Evan Cheng
7a37b1a2ca
Fix PR4789. Teach eliminateFrameIndex how to handle VLDRQ and VSTRQ which cannot fold any immediate offset.
...
llvm-svn: 80191
2009-08-27 01:23:50 +00:00
Dan Gohman
7f0ca9a34c
X86FastISel support for loading and storing values of type i1.
...
llvm-svn: 80186
2009-08-27 00:31:47 +00:00
Dan Gohman
f1abb5511b
Expand i8 selects into control flow instead of 16-bit conditional
...
moves. This avoids the need to promote the operands (or implicitly
extend them, a partial register update condition), and can reduce
i8 register pressure. This substantially speeds up code such as
write_hex in lib/Support/raw_ostream.cpp.
subclass-coalesce.ll is too trivial and no longer tests what it was
originally intended to test.
llvm-svn: 80184
2009-08-27 00:14:12 +00:00
Daniel Dunbar
b039caa1c3
Simplify.
...
llvm-svn: 80176
2009-08-26 23:12:33 +00:00
Oscar Fuentes
3d3fc043f2
CMake: Removed outdated TODO.
...
llvm-svn: 80124
2009-08-26 18:37:05 +00:00
Venkatraman Govindaraju
bc2190fe50
Generate section for bss and enable weak symbols
...
llvm-svn: 80121
2009-08-26 18:24:12 +00:00
Dale Johannesen
f582ac7c11
Alter 79292 to produce output that actually assembles.
...
llvm-svn: 80119
2009-08-26 18:10:32 +00:00
Bob Wilson
e0636a7aed
Remove unneeded ARM-specific DAG nodes for VLD* and VST* Neon operations.
...
The instructions can be selected directly from the intrinsics. We will need
to add some ARM-specific nodes for VLD/VST of 3 and 4 128-bit vectors, but
those are not yet implemented.
llvm-svn: 80117
2009-08-26 17:39:53 +00:00
Anton Korobeynikov
5f6fc970c4
Unbreak FP128 stuff in cbe
...
llvm-svn: 80115
2009-08-26 17:39:23 +00:00
Anton Korobeynikov
0f756b27ae
Expand scalar_to_vector - we don't have any isel logic for it now
...
llvm-svn: 80107
2009-08-26 16:26:09 +00:00
Dan Gohman
45a6b06a45
Add comments detailing a known bug, so that people writing other
...
backends don't use it as an example.
llvm-svn: 80105
2009-08-26 16:06:11 +00:00
Dan Gohman
6c23fa2442
Don't use INSERT_SUBREG to model anyext operations on x86-64, as it
...
leads to partial-register definitions. To help avoid redundant
zero-extensions, also teach the h-register matching patterns that
use movzbl to match anyext as well as zext.
llvm-svn: 80099
2009-08-26 14:59:13 +00:00
Anton Korobeynikov
a0e01bec87
Add dummy inline asm handling for 'r' constraint. This fixes PR4778
...
llvm-svn: 80085
2009-08-26 13:44:29 +00:00
Devang Patel
f08e35d9dc
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
...
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Venkatraman Govindaraju
71425084f1
test commit
...
llvm-svn: 80070
2009-08-26 04:50:17 +00:00
Dale Johannesen
2aaf539564
Add an 'inline hint' attribute to represent source
...
code hints that it would be a good idea to inline
a function ("inline" keyword). No functional change
yet; FEs do not emit this and inliner does not use it.
llvm-svn: 80063
2009-08-26 01:08:21 +00:00
Scott Michel
c5dd8bd8d2
Updated i128 sext support for CellSPU backend, contributed by Ken Werner (IBM)
...
llvm-svn: 80042
2009-08-25 22:37:34 +00:00
Sanjiv Gupta
7699191ffb
Start refactoring PIC16 TargetObjectFile code. Eventually, all the stuff from
...
PIC16Section will move to MCSectionPIC16.
llvm-svn: 80021
2009-08-25 19:39:05 +00:00
Bob Wilson
f1beef9f48
Remove some unused SDNode definitions.
...
llvm-svn: 80015
2009-08-25 17:52:39 +00:00
Dan Gohman
0f6bf2dbb8
Use X86II::MO_NO_FLAG.
...
llvm-svn: 80012
2009-08-25 17:47:44 +00:00
Bob Wilson
9129376719
Expose the instruction contraint string as an argument to the NLdSt class.
...
llvm-svn: 80011
2009-08-25 17:46:06 +00:00
Anton Korobeynikov
271cdda8e1
Provide dynamic_stackalloc lowering for MSP430.
...
This fixes PR4769
llvm-svn: 80001
2009-08-25 17:00:23 +00:00
Devang Patel
02aac922b4
Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
...
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)
llvm-svn: 79977
2009-08-25 05:24:07 +00:00
Dale Johannesen
f8d37c6b81
Fix PR 4751, another difficulty with %a modifier on x86.
...
llvm-svn: 79961
2009-08-25 00:16:14 +00:00
Scott Michel
ec89f0c41a
- Remove SelectSEXTi128 from SPUISelDAGToDAG.cpp, evidently, this is redundant
...
code, according to Anton (I'm not totally convinced, but we can always
resurrect patches if we need to do so.)
- Start moving CellSPU's tests to prefer FileCheck.
llvm-svn: 79958
2009-08-24 23:57:35 +00:00
Scott Michel
8d1602af86
128-bit sign extension and vector shift cleanups, contributed by Ken Werner
...
(IBM).
llvm-svn: 79949
2009-08-24 22:28:53 +00:00
Scott Michel
b54075e7b8
Initialize ShufBytes, as gcc 4.4 can't detect that the entire array is
...
initialized and a warning about a potentially unintialized variable is
generated.
llvm-svn: 79946
2009-08-24 21:53:27 +00:00
Chris Lattner
44aed5dcf1
eliminate a #include.
...
llvm-svn: 79888
2009-08-24 04:07:51 +00:00
Chris Lattner
06fa176862
prune the #includes in raw_ostream.h by moving a
...
member out of line. ftostr is not particularly speedy,
so that method is presumably not perf sensitive.
llvm-svn: 79885
2009-08-24 03:52:50 +00:00
Dale Johannesen
6bbeda41b9
Make linkerprivate work for ARM and PPC. Testcase covers
...
all Darwin targets; could be split into separate tests for
the chip subdirectories, but from Chris' last mail on testing
I assume he'd rather have only one test. Generic seems to be
the best available, maybe there should be a Darwin subdirectory?
llvm-svn: 79877
2009-08-24 01:03:42 +00:00
Chris Lattner
30ebdc4311
remove the last uses of Config/alloca.h
...
llvm-svn: 79873
2009-08-23 22:57:38 +00:00
Chris Lattner
f31ef09249
Switch SubtargetFeature off of ostreams
...
llvm-svn: 79864
2009-08-23 21:41:43 +00:00
Benjamin Kramer
940fbb0e3c
Remove Streams.h from the targets.
...
llvm-svn: 79853
2009-08-23 11:52:17 +00:00
Daniel Dunbar
34ee203337
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
317dbbcfb1
eliminate uses of cerr()
...
llvm-svn: 79834
2009-08-23 07:05:07 +00:00
Chris Lattner
af29ea6d57
eliminate the last DOUTs from the targets.
...
llvm-svn: 79833
2009-08-23 06:49:22 +00:00
Chris Lattner
1362602eb2
Change Pass::print to take a raw ostream instead of std::ostream,
...
update all code that this affects.
llvm-svn: 79830
2009-08-23 06:03:38 +00:00
Chris Lattner
b25de3ff60
eliminate the "Value" printing methods that print to a std::ostream.
...
This required converting a bunch of stuff off DOUT and other cleanups.
llvm-svn: 79819
2009-08-23 04:37:46 +00:00
Chris Lattner
a6f074fb3a
remove various std::ostream version of printing methods from
...
MachineInstr and MachineOperand. This required eliminating a
bunch of stuff that was using DOUT, I hope that bill doesn't
mind me stealing his fun. ;-)
llvm-svn: 79813
2009-08-23 03:41:05 +00:00
Benjamin Kramer
f7b571726a
Forgot to update some CMakeLists.
...
llvm-svn: 79780
2009-08-22 22:20:11 +00:00
Benjamin Kramer
4db6267a2c
Update CMake build, unbreak linux build.
...
llvm-svn: 79779
2009-08-22 22:07:08 +00:00
Chris Lattner
e9a75a6654
rename TAI -> MAI, being careful not to make MAILJMP instructions :)
...
llvm-svn: 79777
2009-08-22 21:43:10 +00:00
Chris Lattner
054574666a
rename COFFMCAsmInfo -> MCAsmInfoCOFF, likewise for darwin.
...
llvm-svn: 79773
2009-08-22 21:03:30 +00:00
Chris Lattner
2b9f0d100b
move the MCAsmInfo .cpp/.h files into the right
...
directories and rename them.
llvm-svn: 79768
2009-08-22 20:58:17 +00:00
Chris Lattner
757dd1cd93
revert 79764, my dependencies failed me again.
...
llvm-svn: 79767
2009-08-22 20:56:12 +00:00
Chris Lattner
df16c223da
remove dead member.
...
llvm-svn: 79764
2009-08-22 20:50:18 +00:00
Chris Lattner
7b26fce23e
Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.
...
llvm-svn: 79763
2009-08-22 20:48:53 +00:00
Devang Patel
0939595711
Record variable debug info at ISel time directly.
...
llvm-svn: 79742
2009-08-22 17:12:53 +00:00
Anton Korobeynikov
f0d31ab7b8
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
Eli Friedman
682d8c1881
Make x86 test actually test x86 code generation. Fix the
...
construct on ARM, which was breaking by coincidence, and add a similar
testcase for ARM.
llvm-svn: 79719
2009-08-22 03:13:10 +00:00
Chris Lattner
a7668ff636
Revert r79563
...
llvm-svn: 79691
2009-08-21 23:12:47 +00:00
Chris Lattner
773416e062
revert r79562 + r79563
...
llvm-svn: 79690
2009-08-21 23:12:15 +00:00
Chris Lattner
f407dbbb1a
revert r79631
...
llvm-svn: 79686
2009-08-21 23:08:45 +00:00
Chris Lattner
6af22f02ef
revert 79631
...
llvm-svn: 79685
2009-08-21 23:08:09 +00:00
Bob Wilson
ceffeb6abd
Rename ARM "lane_cst" operands to "nohash_imm" since they are used for
...
several things other than Neon vector lane numbers. For inline assembly
operands with a "c" print code, check that they really are immediates.
llvm-svn: 79676
2009-08-21 21:58:55 +00:00
Bob Wilson
a70623102e
Match VTRN, VZIP, and VUZP shuffles. Restore the tests for these operations,
...
now using shuffles instead of intrinsics.
llvm-svn: 79673
2009-08-21 20:54:19 +00:00
Anton Korobeynikov
f31a44ec01
Add fcopysign instructions
...
llvm-svn: 79664
2009-08-21 20:02:37 +00:00
Owen Anderson
2dd877d12a
Try again at privatizing the layout info map, with a rewritten patch.
...
This preserves the existing behavior much more closely than my previous attempt.
llvm-svn: 79663
2009-08-21 19:59:12 +00:00
Anton Korobeynikov
47398930e4
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
cb7444342b
Typo :(
...
llvm-svn: 79657
2009-08-21 18:41:02 +00:00
Anton Korobeynikov
81be4b345a
Correct instruction names for subtract-with-borrow
...
llvm-svn: 79656
2009-08-21 18:37:28 +00:00
Anton Korobeynikov
a39f96c6ed
Handle 'r' inline asm constraint
...
llvm-svn: 79648
2009-08-21 18:15:41 +00:00
Duncan Sands
08b437d600
Fix a problem noticed by gcc-4.4:
...
warning: comparison is always true due to limited range of data type.
llvm-svn: 79642
2009-08-21 17:16:10 +00:00
Daniel Dunbar
2f0e8f55f5
Fix -Asserts warning.
...
llvm-svn: 79636
2009-08-21 16:17:36 +00:00
Anton Korobeynikov
7950510b29
Fix a typo
...
llvm-svn: 79634
2009-08-21 15:41:56 +00:00
Sanjiv Gupta
9ae3bcb79e
Add a pass to do call graph analyis to overlay the autos and frame sections of
...
leaf functions. This pass will be extended to color other nodes of the call tree
as well in future.
llvm-svn: 79631
2009-08-21 15:22:33 +00:00
Anton Korobeynikov
eaaca496c5
More cpp backend fixes. Now for FP stuff.
...
llvm-svn: 79626
2009-08-21 12:50:54 +00:00
Anton Korobeynikov
232b19c3d5
Fix some typos and use type-based isel for VZIP/VUZP/VTRN
...
llvm-svn: 79625
2009-08-21 12:41:42 +00:00
Anton Korobeynikov
9a232f46a8
Add lowering of ARM 4-element shuffles to multiple instructios via perfectshuffle-generated table.
...
llvm-svn: 79624
2009-08-21 12:41:24 +00:00
Anton Korobeynikov
ce3ff1be8a
Add nodes & dummy matchers for some v{zip,uzp,trn} instructions
...
llvm-svn: 79622
2009-08-21 12:40:50 +00:00
Anton Korobeynikov
e3046618de
Expand EXTRACT_SUBVECTOR
...
llvm-svn: 79621
2009-08-21 12:40:35 +00:00
Anton Korobeynikov
38f284f2ae
Provide vext.{16,32}
...
llvm-svn: 79620
2009-08-21 12:40:21 +00:00
Anton Korobeynikov
c32e99e3ed
Use masks not nodes for vector shuffle predicates. Provide set of 'legal' masks, so legalizer won't infinite cycle
...
llvm-svn: 79619
2009-08-21 12:40:07 +00:00
Bill Wendling
64965aafe7
Remove #include <iostream>.
...
llvm-svn: 79603
2009-08-21 06:52:44 +00:00
Bob Wilson
51c7aa04ec
Remove Neon intrinsics for VZIP, VUZP, and VTRN. We will represent these as
...
vector shuffles. Temporarily remove the tests for these operations until the
new implementation is working.
llvm-svn: 79579
2009-08-21 00:01:42 +00:00
Owen Anderson
baa922cf16
Re-revert r79555. Apparently it's not just buildbot weirdness.
...
llvm-svn: 79578
2009-08-20 23:51:44 +00:00
Owen Anderson
9ca906e69d
Reapply r79555 for testing. Daniel's trying to work out some buildbot weirdnesss.
...
llvm-svn: 79572
2009-08-20 23:14:20 +00:00
Bill Wendling
e3836f99bf
--- Reverse-merging r79555 into '.':
...
U include/llvm/Target/TargetData.h
U lib/Target/TargetData.cpp
Temporarily revert 79555. It was causing hangs and test failures.
llvm-svn: 79568
2009-08-20 22:04:42 +00:00
Sanjiv Gupta
a874d82492
part of the previous commit for PIC16 ISR implementation.
...
llvm-svn: 79563
2009-08-20 19:34:18 +00:00
Sanjiv Gupta
686e9f55dc
Implement support for ISRs.
...
Clone functions that are shared between the Main thread and Interrupt thread.
CallSites are changed in AsmPrinter currently. A better solution would have been to modify the legalizer (SoftenFloat) to allow targets to change the name of libcalls for float operations. But that currently breaks other targets.
Also, cloing of automatic variables is done AsmPrinter, a better approach would
be to use the ValueMap in CloneFunction itself.
llvm-svn: 79562
2009-08-20 19:28:24 +00:00
Owen Anderson
d2354b8cc5
Make the StructType->StructLayout table private to TargetData, allowing us to avoid locking on it.
...
llvm-svn: 79555
2009-08-20 18:26:03 +00:00
Sean Callanan
46bb77f2cf
Fixed PCMPESTRM128 to have opcode 0x60 instead of 0x62, as specified by the
...
Intel documentation.
llvm-svn: 79554
2009-08-20 18:24:27 +00:00
Dan Gohman
05046085b6
Fix an x86 code size regression: prefer RIP-relative addressing
...
over absolute addressing even in non-PIC mode (unless the address
has an index or something else incompatible), because it has a
smaller encoding.
llvm-svn: 79553
2009-08-20 18:23:44 +00:00
Evan Cheng
01de985ae6
Fix an obvious copy-n-paste bug.
...
llvm-svn: 79535
2009-08-20 17:01:04 +00:00
Dan Gohman
f91a992c30
Update and fix some comments.
...
llvm-svn: 79532
2009-08-20 16:27:10 +00:00
Dale Johannesen
aec3830ce7
Add an extra line to conform with preferred style.
...
llvm-svn: 79495
2009-08-19 23:44:01 +00:00
Reid Kleckner
5c51639e3e
Modify an assert to avoid what looks like a GCC 4.2.4 signed-ness bug.
...
llvm-svn: 79494
2009-08-19 23:39:59 +00:00
Dale Johannesen
1d764f61ef
Handle 'a' modifier in X86 asms. PR 4742.
...
llvm-svn: 79484
2009-08-19 22:44:41 +00:00
Reid Kleckner
d72b091840
Fixed error in CPPBackend from a contextification API change.
...
llvm-svn: 79483
2009-08-19 22:38:37 +00:00
Dan Gohman
de255fc8f6
Remove temporary testing code.
...
llvm-svn: 79443
2009-08-19 18:27:08 +00:00
Dan Gohman
ac33a9061d
Add an x86 peep that narrows TEST instructions to forms that use
...
a smaller encoding. These kinds of patterns are very frequent in
sqlite3, for example.
llvm-svn: 79439
2009-08-19 18:16:17 +00:00
David Goodwin
a7c2dfbca1
Update Cortex-A8 instruction itineraries for integer instructions.
...
llvm-svn: 79436
2009-08-19 18:00:44 +00:00
Bob Wilson
32cd8550ce
Add support for Neon VEXT (vector extract) shuffles.
...
This is derived from a patch by Anton Korzh. I modified it to recognize
the VEXT shuffles during legalization and lower them to a target-specific
DAG node.
llvm-svn: 79428
2009-08-19 17:03:43 +00:00
Chris Lattner
4b7dadb76e
eliminate AsmPrinter::SwitchToSection and just have clients
...
talk to the MCStreamer directly instead.
llvm-svn: 79405
2009-08-19 05:49:37 +00:00
Eric Christopher
9fe912de5f
Implement sse4.2 string/text processing instructions:
...
Add patterns and instruction encoding information.
Add custom lowering to deal with hardwired return register of
uncertain type (xmm0).
llvm-svn: 79377
2009-08-18 22:50:32 +00:00
Jakob Stoklund Olesen
36d747745e
Simplify RegScavenger::FindUnusedReg.
...
- Drop the Candidates argument and fix all callers. Now that RegScavenger
tracks available registers accurately, there is no need to restict the
search.
- Make sure that no aliases of the found register are in use. This was a potential bug.
llvm-svn: 79369
2009-08-18 21:14:54 +00:00
Richard Osborne
2349fb4d45
Add support for mergeable sections back into the XCore backend.
...
llvm-svn: 79368
2009-08-18 21:14:31 +00:00
Richard Osborne
934d61648b
Put data with relocations in the same sections as data without relocations.
...
llvm-svn: 79351
2009-08-18 17:58:17 +00:00
Chris Lattner
03ded465d2
fix COFF targets (mingw/cygwin) to provide ehframe and LSDA sections
...
llvm-svn: 79346
2009-08-18 16:56:17 +00:00
Anton Korobeynikov
e4d2e8465a
Text sections should have 'exec' flag set. This seems to unbreak libstdc++ on linux.
...
Patch by Dmitry Gorbachev!
llvm-svn: 79334
2009-08-18 14:06:12 +00:00
Chris Lattner
966d32dffb
remove some pointless null switchtosections. The IntelAsmPrinter doesn't really work anyway.
...
llvm-svn: 79321
2009-08-18 06:03:07 +00:00
Evan Cheng
dd406177de
Fix revsh pattern.
...
llvm-svn: 79318
2009-08-18 05:43:23 +00:00
Chris Lattner
40bbb85949
add support for some targetflags on GV operands. This allows us to
...
send instructions like:
NEW: movl "L___stack_chk_guard$non_lazy_ptr" - "L1$pb"(%esi), %eax
OLD: movl L___stack_chk_guard$non_lazy_ptr-"L1$pb"(%esi), %eax
through the streamer. Several fixmes.
llvm-svn: 79317
2009-08-18 05:33:27 +00:00
Dan Gohman
47a31a29c5
Fix function alignment at -Os on x86 to be 1, not 2. getFunctionAlignment
...
returns a log2 value.
llvm-svn: 79293
2009-08-18 00:20:06 +00:00
Dale Johannesen
4a50e68b65
PowerPC inline asm was emitting two output operands
...
for a single "m" constraint; this is wrong because the
opcode of a load or store would have to change in parallel.
This patch makes it always compute addresses into a register,
which is correct but not as efficient as possible. 7144566.
llvm-svn: 79292
2009-08-18 00:18:39 +00:00
Benjamin Kramer
bd3c033713
Clear the uniquing table when initializing TLOF to avoid a crash when the TLOF is reinitialized with a different MCContext.
...
llvm-svn: 79253
2009-08-17 17:05:44 +00:00
Richard Osborne
94a2c1acae
Update getSectionForConstant() to to allow mergable sections to be nulled out
...
if not supported by the ELF subtarget.
llvm-svn: 79249
2009-08-17 16:37:11 +00:00
Chris Lattner
ee97b8b11c
the MinPad argument to PadToColumn only really makes sense to be 1,
...
just remove the argument and replace it with 1.
llvm-svn: 79246
2009-08-17 15:48:08 +00:00
Dan Gohman
f0b984021c
Avoid emitting XMM save code in soft-float or no-implicit-float mode
...
or some other situation where no xmm registers need to be saved.
llvm-svn: 79207
2009-08-16 21:24:25 +00:00
Dan Gohman
4bb9357921
Delete an unused field.
...
llvm-svn: 79206
2009-08-16 21:19:53 +00:00
Benjamin Kramer
2c64130c43
Fix use after free in Thumb2SizeReduction (PR4707). A MachineInstr was used after erasure.
...
llvm-svn: 79189
2009-08-16 11:56:42 +00:00
Bill Wendling
195fd9d970
Styalistic and format changes. No functionality change.
...
llvm-svn: 79187
2009-08-16 11:00:26 +00:00
Chris Lattner
8a4c35dd18
add support for external symbols + X86::MOVPC32r.
...
llvm-svn: 79175
2009-08-16 04:28:14 +00:00
Chris Lattner
c659caa848
implement support for lowering references to global addresses. For example, we now
...
can asmprint:
NEW: movl "L___stack_chk_guard$non_lazy_ptr", %eax
OLD: movl L___stack_chk_guard$non_lazy_ptr, %eax
where 'new' is coming out of the MCInst version of the printer.
llvm-svn: 79170
2009-08-16 03:12:25 +00:00
Chris Lattner
10f605ce2b
more formatting improvements, no functionality change.
...
llvm-svn: 79167
2009-08-16 02:45:18 +00:00
Chris Lattner
043bb021da
code formatting improvements, no functionality change.
...
llvm-svn: 79165
2009-08-16 02:36:40 +00:00
Bill Wendling
b405803fbe
An overhaul of the exception handling code. This is arguably more correct than
...
what was there before. In "no FP mode", we weren't generating labels and unwind
table entries after each "push" instruction. While more than likely "okay", it's
not technically correct. The major thing was that the ordering of when to define
a new CFA register and at what offset wasn't correct. This would cause the
exception handling to fail in ways most miserable to users.
I also cleaned up some code a bit. There's one function which has a "return" at
the beginning, so it's never used. Should I just remove it? :-)
llvm-svn: 79139
2009-08-15 21:27:32 +00:00
Bill Wendling
bae6b2cca3
Reapply r79127. It was fixed by d0k.
...
llvm-svn: 79136
2009-08-15 21:21:19 +00:00
Bill Wendling
d3fade656f
Revert r79127. It was causing compilation errors.
...
llvm-svn: 79135
2009-08-15 21:14:01 +00:00
Evan Cheng
52d4e64711
Change allowsUnalignedMemoryAccesses to take type argument since some targets
...
support unaligned mem access only for certain types. (Should it be size
instead?)
ARM v7 supports unaligned access for i16 and i32, some v6 variants support it
as well.
llvm-svn: 79127
2009-08-15 19:23:44 +00:00
Chris Lattner
447b9b43a3
the .eh_frame sections we generate need to be writable (which
...
is why they are datarel). This should fix PR4724, and is fallout
from r78890.
llvm-svn: 79111
2009-08-15 16:54:02 +00:00
Nicolas Geoffray
78e0ffa25f
Use the new API for creating an OpaqueType.
...
llvm-svn: 79107
2009-08-15 15:41:32 +00:00
Chris Lattner
ee500a5d19
tidy up
...
llvm-svn: 79101
2009-08-15 15:08:28 +00:00
Nicolas Geoffray
aee49c29ff
Update cpp generation with new LLVM API for primitive types.
...
llvm-svn: 79098
2009-08-15 14:47:42 +00:00
Sanjiv Gupta
1e5027aaef
Revert a few changes that were done in 78603.
...
PIC16DebugInfo currently rely on NameStr of composite type descriptors to uniquely
identify debug info for two aggregate type decls with same name.
This implementation will change when we have MDNodes based debug info implemenatation in place
llvm-svn: 79097
2009-08-15 14:36:48 +00:00
Richard Osborne
ddd1d4e0f2
Move XCore AsmPrinter to XCore/AsmPrinter directory.
...
llvm-svn: 79094
2009-08-15 12:53:15 +00:00
Tilmann Scheller
d1aaa3243a
Add support for the PowerPC 64-bit SVR4 ABI.
...
The Link Register is volatile when using the 32-bit SVR4 ABI.
Make it possible to use the 64-bit SVR4 ABI.
Add non-volatile registers for the 64-bit SVR4 ABI.
Make sure r2 is a reserved register when using the 64-bit SVR4 ABI.
Update PPCFrameInfo for the 64-bit SVR4 ABI.
Add FIXME for 64-bit Darwin PPC.
Insert NOP instruction after direct function calls.
Emit official procedure descriptors.
Create TOC entries for GlobalAddress references.
Spill 64-bit non-volatile registers to the correct slots.
Only custom lower VAARG when using the 32-bit SVR4 ABI.
Use simple VASTART lowering for the 64-bit SVR4 ABI.
llvm-svn: 79091
2009-08-15 11:54:46 +00:00
Evan Cheng
6ddd7bcdd1
Turn on if-conversion for thumb2.
...
llvm-svn: 79084
2009-08-15 07:59:10 +00:00
Chris Lattner
84ff2c9348
update for rename.
...
llvm-svn: 79082
2009-08-15 06:14:07 +00:00
Chris Lattner
6362cbe64e
rename PIC16Section.h -> MCSectionPIC16.h for consistency with
...
the class it defines.
llvm-svn: 79081
2009-08-15 06:13:40 +00:00
Chris Lattner
4b9ea39e76
cmake likes its explicit list of files to build.
...
llvm-svn: 79080
2009-08-15 06:10:23 +00:00
Chris Lattner
93980d68e4
use XCore-specific section with xcore specific cp/dp flags to restore
...
support for globals going into the appropriate sections with the flags.
This hopefully finishes unbreaking the previous behavior that I broke before.
llvm-svn: 79079
2009-08-15 06:09:35 +00:00
Chris Lattner
ddb991c255
If ELF subtargets don't want to support 4/8/16-byte mergable sections, allow
...
them to null out the default section pointers.
llvm-svn: 79078
2009-08-15 06:08:34 +00:00
Chris Lattner
0fbe0f51a4
add support for target-specific ELF section flags, add a new MCSectionXCore
...
class which represents the XCore cp/dp section flags. No functionality
change yet.
llvm-svn: 79077
2009-08-15 05:56:11 +00:00
Dan Gohman
fca896815d
Simplify a few more things, eliminating a few more dependencies on
...
"the current basic block".
llvm-svn: 79069
2009-08-15 02:07:36 +00:00
Evan Cheng
75c9e535c6
Do not use frame register to reference fixed stack objects if the function is frameless.
...
llvm-svn: 79067
2009-08-15 02:05:35 +00:00
Dan Gohman
0700a56860
On x86-64, for a varargs function, don't store the xmm registers to
...
the register save area if %al is 0. This avoids touching xmm
regsiters when they aren't actually used.
llvm-svn: 79061
2009-08-15 01:38:56 +00:00
Evan Cheng
7dae88d2c9
Leaf functions which do not save CSRs can be frameless even with -disable-fp-elim.
...
llvm-svn: 79039
2009-08-14 20:48:13 +00:00
Anton Korobeynikov
a6b3ce203a
Allow targets to specify their choice of calling conventions per
...
libcall. Take advantage of this in the ARM backend to rectify broken
choice of CC when hard float is in effect. PIC16 may want to see if
it could be of use in MakePIC16Libcall, which works unchanged.
Patch by Sandeep!
llvm-svn: 79033
2009-08-14 20:10:52 +00:00
Evan Cheng
dc49a8d3f1
Add Thumb2 lsr hooks.
...
llvm-svn: 79032
2009-08-14 20:09:37 +00:00
Oscar Fuentes
6b5cb8a6b3
CMake: Corrected variable check.
...
llvm-svn: 79030
2009-08-14 19:56:04 +00:00
Evan Cheng
09c070f4ce
80 col violation.
...
llvm-svn: 79026
2009-08-14 19:11:20 +00:00