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

11669 Commits

Author SHA1 Message Date
Dan Gohman
f2f57ebc84 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
86546fb692 Fix an obvious copy-n-paste bug.
llvm-svn: 79535
2009-08-20 17:01:04 +00:00
Dan Gohman
565d0c0f3b Update and fix some comments.
llvm-svn: 79532
2009-08-20 16:27:10 +00:00
Dale Johannesen
bb3b75a863 Add an extra line to conform with preferred style.
llvm-svn: 79495
2009-08-19 23:44:01 +00:00
Reid Kleckner
8bd08ffbf4 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
fc8ee02c25 Handle 'a' modifier in X86 asms. PR 4742.
llvm-svn: 79484
2009-08-19 22:44:41 +00:00
Reid Kleckner
cb12d4d677 Fixed error in CPPBackend from a contextification API change.
llvm-svn: 79483
2009-08-19 22:38:37 +00:00
Dan Gohman
b19c5b81dd Remove temporary testing code.
llvm-svn: 79443
2009-08-19 18:27:08 +00:00
Dan Gohman
eb6fbd7fd1 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
d57f44783c Update Cortex-A8 instruction itineraries for integer instructions.
llvm-svn: 79436
2009-08-19 18:00:44 +00:00
Bob Wilson
fae9057bf0 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
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
Eric Christopher
32d5222c4e 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
9496240bbf 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
a3a49aeee0 Add support for mergeable sections back into the XCore backend.
llvm-svn: 79368
2009-08-18 21:14:31 +00:00
Richard Osborne
84785e0714 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
17c3a9cf99 fix COFF targets (mingw/cygwin) to provide ehframe and LSDA sections
llvm-svn: 79346
2009-08-18 16:56:17 +00:00
Anton Korobeynikov
d2d8c91b9f 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
e01c6eb25a 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
d4d2a3d0a6 Fix revsh pattern.
llvm-svn: 79318
2009-08-18 05:43:23 +00:00
Chris Lattner
178666f2e3 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
e28638faa2 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
ff6e66e502 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
d1c6b5de4e 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
358842178f 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
0ed3ef52af 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
8a92a2475c 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
a5e2aaee6d Delete an unused field.
llvm-svn: 79206
2009-08-16 21:19:53 +00:00
Benjamin Kramer
a8760e3e5a 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
ee380b1dd2 Styalistic and format changes. No functionality change.
llvm-svn: 79187
2009-08-16 11:00:26 +00:00
Chris Lattner
76b09f600c add support for external symbols + X86::MOVPC32r.
llvm-svn: 79175
2009-08-16 04:28:14 +00:00
Chris Lattner
ca89ccb1dd 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
af83ac2ba5 more formatting improvements, no functionality change.
llvm-svn: 79167
2009-08-16 02:45:18 +00:00
Chris Lattner
9a017d13c8 code formatting improvements, no functionality change.
llvm-svn: 79165
2009-08-16 02:36:40 +00:00
Bill Wendling
696d0388e9 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
962adec4ee Reapply r79127. It was fixed by d0k.
llvm-svn: 79136
2009-08-15 21:21:19 +00:00
Bill Wendling
bfebbb6477 Revert r79127. It was causing compilation errors.
llvm-svn: 79135
2009-08-15 21:14:01 +00:00
Evan Cheng
5d841097a9 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
07186e7840 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
572b4e6cb3 Use the new API for creating an OpaqueType.
llvm-svn: 79107
2009-08-15 15:41:32 +00:00
Chris Lattner
e12f92568f tidy up
llvm-svn: 79101
2009-08-15 15:08:28 +00:00
Nicolas Geoffray
679c83e1bf Update cpp generation with new LLVM API for primitive types.
llvm-svn: 79098
2009-08-15 14:47:42 +00:00
Sanjiv Gupta
2399e49802 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
31f04e14f0 Move XCore AsmPrinter to XCore/AsmPrinter directory.
llvm-svn: 79094
2009-08-15 12:53:15 +00:00
Tilmann Scheller
03f517b799 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
9d351a7246 Turn on if-conversion for thumb2.
llvm-svn: 79084
2009-08-15 07:59:10 +00:00
Chris Lattner
aa462f6d51 update for rename.
llvm-svn: 79082
2009-08-15 06:14:07 +00:00
Chris Lattner
8101f115c5 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
7021a8b286 cmake likes its explicit list of files to build.
llvm-svn: 79080
2009-08-15 06:10:23 +00:00
Chris Lattner
ee52642cd3 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
2c1a96d901 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
3665e2058e 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
fcb5e33aa1 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
cf13e0c732 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
d69323d37a 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
4e97ccc132 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
3a0cde8c91 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
67fd47b38b Add Thumb2 lsr hooks.
llvm-svn: 79032
2009-08-14 20:09:37 +00:00
Oscar Fuentes
4acb0629da CMake: Corrected variable check.
llvm-svn: 79030
2009-08-14 19:56:04 +00:00
Evan Cheng
ebbcd00c17 80 col violation.
llvm-svn: 79026
2009-08-14 19:11:20 +00:00
Anton Korobeynikov
a52d80928a Cleanup the mess in msp430 target registration and hopefully unbreak the build
llvm-svn: 79024
2009-08-14 19:06:50 +00:00
Evan Cheng
1fa8ad98aa Indentation.
llvm-svn: 79022
2009-08-14 19:01:37 +00:00
Anton Korobeynikov
094a764f5d Hopefully unbreak cmake builds
llvm-svn: 79015
2009-08-14 18:46:49 +00:00
Evan Cheng
7d8caa143b Also shrink immediate branches; also more assembler workarounds.
llvm-svn: 79014
2009-08-14 18:31:44 +00:00
Anton Korobeynikov
5787e69dfb Give MSP430 a separate asmprinter lib
llvm-svn: 79012
2009-08-14 18:28:12 +00:00
Anton Korobeynikov
933d8e1118 Properly handle indirect win64 args when they're passed in memory
llvm-svn: 79009
2009-08-14 18:19:10 +00:00
Owen Anderson
fc21fa21cf Get the CPP backend into some semblance of working by updating for numerous LLVMContext changes,
as well as the StringRef change.

llvm-svn: 79006
2009-08-14 17:41:33 +00:00
Bob Wilson
80db08baec Now that all the legal Neon shuffles (or at least the ones that have been
implemented so far) are recognized during legalization, it is easy to fall
back to the default expansion for other shuffles.

llvm-svn: 78995
2009-08-14 05:16:33 +00:00
Bob Wilson
d337cde6e5 Create a new ARM-specific DAG node, VDUP, to represent a splat from a
scalar_to_vector.  Generate these VDUP nodes during legalization instead
of trying to recognize the pattern during selection.

llvm-svn: 78994
2009-08-14 05:13:08 +00:00
Bob Wilson
7a311914ab During legalization, change Neon vdup_lane operations from shuffles to
target-specific VDUPLANE nodes.  This allows the subreg handling for the
quad-register version to be done easily with Pats in the .td file, instead
of with custom code in ARMISelDAGToDAG.cpp.

llvm-svn: 78993
2009-08-14 05:08:32 +00:00
Daniel Dunbar
dc5840c57c Update llvm-mc / MCAsmStreamer to print the instruction using the actual target
specific printer (this only works on x86, for now).
 - This makes it possible to do some correctness checking of the parsing and
   matching, since we can compare the results of 'as' on the original input, to
   those of 'as' on the output from llvm-mc.

 - In theory, we could now have an easy ATT -> Intel syntax converter. :)

llvm-svn: 78986
2009-08-14 03:48:55 +00:00
Daniel Dunbar
ca38bc510e Add virtual printMCInst method to AsmPrinter, as a quick way to expose the API
to print one instruction.

llvm-svn: 78985
2009-08-14 03:43:57 +00:00
Daniel Dunbar
b0adbe646d Add X86 instruction printer support for printing MCValue operands.
llvm-svn: 78984
2009-08-14 03:42:12 +00:00
Evan Cheng
45d6a21e21 Shrink ADR and LDR from constantpool late during constantpool island pass.
llvm-svn: 78970
2009-08-14 00:32:16 +00:00
Evan Cheng
22969c64d0 New entry.
llvm-svn: 78968
2009-08-14 00:16:47 +00:00
Dan Gohman
ba476a2945 Make these matching rules more strict so that they don't
accidentally match unrelated things.

llvm-svn: 78966
2009-08-14 00:10:19 +00:00
Daniel Dunbar
eab68eaec4 TargetRegistry: Change AsmPrinter constructor to be typed as returning an
AsmPrinter instance (instead of just a FunctionPass)

llvm-svn: 78962
2009-08-13 23:48:47 +00:00
Bruno Cardoso Lopes
98ffbd5041 Remove HasCrazyBSS and add a flag in TAI to indicate that '.section'
must be emitted for PowerPC-Linux '.bss' section

llvm-svn: 78958
2009-08-13 23:30:21 +00:00
Owen Anderson
9df206d02d Push LLVMContexts through the IntegerType APIs.
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Daniel Dunbar
62eec42595 TargetRegistry: Reorganize AsmPrinter construction so that clients pass in the
TargetAsmInfo. This eliminates a dependency on TargetMachine.h from
TargetRegistry.h, which technically was a layering violation.
 - Clients probably can only sensibly pass in the same TargetAsmInfo as the
   TargetMachine has, but there are only limited clients of this API.

llvm-svn: 78928
2009-08-13 19:38:51 +00:00
Daniel Dunbar
854120b114 Reapply pieces of 78914 reverted in 78916, this has been fixed.
llvm-svn: 78921
2009-08-13 17:08:54 +00:00
Daniel Dunbar
40f904fcfb Revert 78892 and 78895, these break generating working executables on
x86_64-apple-darwin10.

--- Reverse-merging r78895 into '.':
U    test/CodeGen/PowerPC/2008-12-12-EH.ll
U    lib/Target/DarwinTargetAsmInfo.cpp
--- Reverse-merging r78892 into '.':
U    include/llvm/Target/DarwinTargetAsmInfo.h
U    lib/Target/X86/X86TargetAsmInfo.cpp
U    lib/Target/X86/X86TargetAsmInfo.h
U    lib/Target/ARM/ARMTargetAsmInfo.h
U    lib/Target/ARM/ARMTargetMachine.cpp
U    lib/Target/ARM/ARMTargetAsmInfo.cpp
U    lib/Target/PowerPC/PPCTargetAsmInfo.cpp
U    lib/Target/PowerPC/PPCTargetAsmInfo.h
U    lib/Target/PowerPC/PPCTargetMachine.cpp
G    lib/Target/DarwinTargetAsmInfo.cpp

llvm-svn: 78919
2009-08-13 17:03:38 +00:00
Jim Grosbach
361b7db9bd Add missing defs of R2 and D1.
llvm-svn: 78918
2009-08-13 16:59:44 +00:00
Daniel Dunbar
42cd283c34 Remove obsoleted files (from AsmPrinter move)
llvm-svn: 78917
2009-08-13 16:57:03 +00:00
Owen Anderson
99061befb3 Revert r78914, as it was breaking the build.
llvm-svn: 78916
2009-08-13 16:54:39 +00:00
Sanjiv Gupta
fd1ffc19f9 Move PIC16 AsmPrinter to PIC16/AsmPrinter directory.
Remove CooperTargetMachine, as currently only one is supported.

llvm-svn: 78914
2009-08-13 16:37:05 +00:00
David Goodwin
dd797db6bd Finalize itineraries for cortex-a8 integer multiply
llvm-svn: 78908
2009-08-13 15:51:13 +00:00
Jim Grosbach
6511e74282 Remove unnecessary newline
llvm-svn: 78905
2009-08-13 15:12:16 +00:00
Jim Grosbach
aba7f6b60b Correct comment wording
llvm-svn: 78904
2009-08-13 15:11:43 +00:00
Chris Lattner
4cebf6ca28 reintroduce support for Mips "small" section handling. This is
implemented somewhat differently than before, but it should have
the same functionality and the previous testcase passes again.

llvm-svn: 78900
2009-08-13 06:28:06 +00:00
Evan Cheng
8bfaf895e5 tPOP_RET now has predicate operands.
llvm-svn: 78898
2009-08-13 06:05:07 +00:00
Bob Wilson
e3eedf3cd2 Add a fixme message about canonicalizing floating-point vector types.
llvm-svn: 78897
2009-08-13 06:01:30 +00:00
Bob Wilson
8cb7da85e3 Revert r78852 for now. I want to do this differently, but I don't have time
to fix it tonight.

llvm-svn: 78896
2009-08-13 05:58:56 +00:00
Chris Lattner
696f1d8318 fix typo, add 10.6 version of test for my previous patch.
llvm-svn: 78895
2009-08-13 05:43:33 +00:00
Chris Lattner
fa4858791d Restore some "small section" support code, reverting my patch from r76936.
llvm-svn: 78894
2009-08-13 05:41:27 +00:00
Evan Cheng
309650d7ba It's ok to spill a tGPR register as long as it's still allocated a low register.
llvm-svn: 78893
2009-08-13 05:40:51 +00:00
Chris Lattner
4df533ba16 fix a minor fixme. When building with SL and later tools, the ".eh" symbols
don't need to be exported from the .o files.

llvm-svn: 78892
2009-08-13 05:30:22 +00:00
Bruno Cardoso Lopes
f2855aabec Change MCSectionELF to represent a section semantically instead of
syntactically as a string, very similiar to what Chris did with MachO.
The parsing support and validation is not introduced yet.

llvm-svn: 78890
2009-08-13 05:07:35 +00:00
Bob Wilson
2940b8e9a5 Add a comment to describe why vector shuffles are legalized to custom DAG nodes.
llvm-svn: 78884
2009-08-13 02:13:04 +00:00
Bob Wilson
11ee30bdc8 Use cast<> instead of dyn_cast<> in places where the type is known.
llvm-svn: 78881
2009-08-13 01:57:47 +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
04f74d3510 sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF implementations.
MCContext no longer maintains a string -> section map.

llvm-svn: 78874
2009-08-13 00:37:15 +00:00
Dale Johannesen
0e41973cf4 Symbols with LinkerPrivateLinkage are weak.
This allows WebKit to build again.

llvm-svn: 78872
2009-08-13 00:28:52 +00:00
Chris Lattner
bd02c60d9e make PIC16 unique its own sections instead of having mcontext do it.
llvm-svn: 78871
2009-08-13 00:26:52 +00:00
Chris Lattner
7ead5b498b add some comments: MCContext owns the MCSections, but it bump pointer allocates
them, so it doesn't have to explicitly free them.

llvm-svn: 78870
2009-08-13 00:21:53 +00:00
Chris Lattner
52e6d663b3 reject invalid code like:
int x __attribute__((section("_foo, _bar"))) = 4;
int y __attribute__((section("_foo, _bar, 4byte_literals"))) = 1;

llvm-svn: 78867
2009-08-13 00:05:07 +00:00
Chris Lattner
4c9dae455e implement support for uniquing MachO sections.
llvm-svn: 78866
2009-08-12 23:55:02 +00:00
Chris Lattner
456301c2cd some compiler don't get string from TLOF.h implicitly or something.
llvm-svn: 78864
2009-08-12 23:53:59 +00:00
Chris Lattner
7eeb032b37 reduce #includage
llvm-svn: 78860
2009-08-12 23:34:27 +00:00
Bob Wilson
b089d07a1f Recognize Neon VDUP shuffles during legalization instead of selection.
llvm-svn: 78852
2009-08-12 22:54:19 +00:00
Bob Wilson
d8b7ca4c28 Recognize Neon VREV shuffles during legalization instead of selection.
llvm-svn: 78850
2009-08-12 22:31:50 +00:00
Dan Gohman
bc6b14ba00 This void is implicit in C++.
llvm-svn: 78848
2009-08-12 22:10:57 +00:00
Bob Wilson
0cf2be2466 Generate Neon VTBL and VTBX instructions from the corresponding intrinsics.
llvm-svn: 78835
2009-08-12 20:51:55 +00:00
Dan Gohman
61b163ccdc Use PadToColumn instead of tabs.
llvm-svn: 78834
2009-08-12 18:55:32 +00:00
Evan Cheng
9199f62b3d PredCC is meant to be 2 bits wide, like PredCC1.
llvm-svn: 78829
2009-08-12 18:35:50 +00:00
David Goodwin
90e7f9873c Enhance the InstrStage object to enable the specification of an Itinerary with overlapping stages. The default is to maintain the current behavior that the "next" stage immediately follows the previous one.
llvm-svn: 78827
2009-08-12 18:31:53 +00:00
Jim Grosbach
74c682dde4 Add catch block handling to SjLj exception handling.
llvm-svn: 78817
2009-08-12 17:38:44 +00:00
Bob Wilson
61f35e39cf Fix TableGen warnings. This partly reverts my previous change to this file,
leaving the mayLoad and mayStore settings around only the load/store
instructions where those can't be inferred from the patterns.

llvm-svn: 78815
2009-08-12 17:04:56 +00:00
Chris Lattner
736c853143 change CBE to just get TAI now, instead of TM to get TAI.
llvm-svn: 78813
2009-08-12 16:41:44 +00:00
Dan Gohman
00ee3a9a1a Transform -X/C to X/-C, implementing a README.txt entry.
llvm-svn: 78812
2009-08-12 16:37:02 +00:00
Oscar Fuentes
b153643da2 CMake: Added asm file to x86_64 MSVC build.
llvm-svn: 78807
2009-08-12 15:54:28 +00:00
Jim Grosbach
77d5653945 register naming cleanup (s/ip/r12/)
llvm-svn: 78806
2009-08-12 15:21:13 +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
Jakob Stoklund Olesen
7ec5ee575e Move immediate constant predicate templates from the Blackfin target to MathExtras.h
llvm-svn: 78793
2009-08-12 06:22:07 +00:00
Evan Cheng
c369ccbe83 Shrink Thumb2 movcc instructions.
llvm-svn: 78790
2009-08-12 05:17:19 +00:00
Evan Cheng
bb24fe8602 Remove another Darwin assembler workaround.
llvm-svn: 78779
2009-08-12 02:07:19 +00:00
Evan Cheng
410447e028 80 col violation.
llvm-svn: 78778
2009-08-12 02:03:03 +00:00
Evan Cheng
9302c40108 Remove an Darwin assembler workaround.
llvm-svn: 78777
2009-08-12 01:56:42 +00:00
Evan Cheng
65f3e466df Shrink ADDS, ADC, RSB, and SUBS.
llvm-svn: 78776
2009-08-12 01:49:45 +00:00
Bob Wilson
00d605d359 Add missing chain operands for VLD* and VST* instructions.
Set "mayLoad" and "mayStore" on the load/store instructions.

llvm-svn: 78761
2009-08-12 00:49:01 +00:00
Owen Anderson
dbf9a912fb Add contexts to some of the MVT APIs. No functionality change yet, just the infrastructure work needed to get the contexts to where they need to be first.
llvm-svn: 78759
2009-08-12 00:36:31 +00:00
Chris Lattner
0624ad99f0 prune #include
llvm-svn: 78749
2009-08-11 23:07:27 +00:00
Chris Lattner
70cdd11e1c prune #includage.
llvm-svn: 78748
2009-08-11 23:06:16 +00:00
Chris Lattner
57aca57c35 fix CodeGen/PowerPC/2007-01-15-AsmDialect.ll, fallout from r78742
llvm-svn: 78747
2009-08-11 23:03:40 +00:00
Chris Lattner
c2a229453e change the -x86-asm-syntax=intel/att flag to be in X86TAI
instead of X86 Subtarget.  This elimianates dependencies on
X86Subtarget from X86TAI.

llvm-svn: 78746
2009-08-11 23:01:09 +00:00
Evan Cheng
a29ee9f509 Shrinkify Thumb2 r = add sp, imm.
llvm-svn: 78745
2009-08-11 23:00:31 +00:00
Chris Lattner
d45aa1bcf1 second half of commit.
llvm-svn: 78744
2009-08-11 22:52:15 +00:00
Chris Lattner
dfc686541d pass "is64Bit" flag into PPC TAI ctors instead of a whole targetmachine.
llvm-svn: 78743
2009-08-11 22:51:34 +00:00
Chris Lattner
0ff895cd83 eliminate asmflavor from subtarget, PPCTAI is the only client
and each callee knows that it returns.

llvm-svn: 78742
2009-08-11 22:49:34 +00:00
Chris Lattner
a74023896f Change the asmprinter to print the comment character before the
"inlineasmstart/end" strings so that the contents of the directive
are separate from the comment character.  This lets elf targets
get #APP/#NOAPP for free even if they don't use "#" as the comment
character.  This also allows hoisting the darwin stuff up to the
shared TAI class.

llvm-svn: 78737
2009-08-11 22:39:40 +00:00
David Goodwin
2686178489 Allow a zero cycle stage to reserve/require a FU without advancing the cycle counter.
llvm-svn: 78736
2009-08-11 22:38:43 +00:00
Chris Lattner
f27d5f6662 factorize more darwin TAI stuff. Note that this gives
darwin/arm support for .no_dead_strip

llvm-svn: 78734
2009-08-11 22:31:42 +00:00
Daniel Dunbar
514498ccec X86/AsmParser: Mark MOV64GSrm, MOV64FSrm, GS_MOV32rm, FS_MOV32rm as codegen only.
llvm-svn: 78733
2009-08-11 22:24:40 +00:00
Chris Lattner
7015f75b6a factorize darwin ProtectedDirective and SetDirective.
llvm-svn: 78732
2009-08-11 22:22:44 +00:00
Daniel Dunbar
63f93255ae Add 'isCodeGenOnly' bit to Instruction .td records.
- Used to mark fake instructions which don't correspond to an actual machine
   instruction (or are duplicates of a real instruction). This is to be used for
   "special cases" in the .td files, which should be ignored by things like the
   assembler and disassembler. We still need a good solution to handle pervasive
   duplication, like with the Int_ instructions.

 - Set the bit on fake "mov 0" style instructions, which allows turning an
   assembler matcher warning into a hard error.

 - -2 FIXMEs.

llvm-svn: 78731
2009-08-11 22:17:52 +00:00
Chris Lattner
bf7a1a3e38 all darwin targets have .space and .zerofill, pull up.
llvm-svn: 78730
2009-08-11 22:17:31 +00:00
Chris Lattner
44a2fda8c1 eliminate template from arm TAI
llvm-svn: 78729
2009-08-11 22:14:59 +00:00
Chris Lattner
b460bd4895 fix a bug I introduced in r78724 that caused failures in:
CodeGen/X86/dll-linkage.ll & CodeGen/X86/mingw-alloca.ll

llvm-svn: 78728
2009-08-11 22:12:58 +00:00
Chris Lattner
8c7eb509d3 move LCOMMDirective = "\t.lcomm\t" up to DarwinTAI, eliminate
template in PPC backend for TAI.

llvm-svn: 78727
2009-08-11 22:06:07 +00:00
Owen Anderson
75ebfc8728 Fix warnings.
llvm-svn: 78725
2009-08-11 21:59:30 +00:00
Chris Lattner
05bde58b5e eliminate the X86TargetAsmInfo template.
llvm-svn: 78724
2009-08-11 21:57:08 +00:00
Sean Callanan
b2288f269b Added ADD instructions with rAX as one parameter to the Intel instruction
tables.

llvm-svn: 78721
2009-08-11 21:26:06 +00:00
Evan Cheng
783028063e Shrinkify Thumb2 load / store multiple instructions.
llvm-svn: 78717
2009-08-11 21:11:32 +00:00
Daniel Dunbar
186ba504b3 llvm-mc/AsmParser: Allow target to specific a comment delimiter, which will be
used to strip hard coded comments out of .td assembly strings.

llvm-svn: 78716
2009-08-11 20:59:47 +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
Chris Lattner
40af6d5199 now that JumpTableDirective can differentate picness itself, MIPS TAI
no longer needs a targetmachine to initialize itself.

llvm-svn: 78710
2009-08-11 20:32:51 +00:00
Chris Lattner
45bdc96988 split "JumpTableDirective" (an existing hack) into a PIC and nonPIC
version.  This allows TAI implementations to specify the directive to use
based on the mode being codegen'd for.

The real fix for this is to remove JumpTableDirective, but I don't feel
like diving into the jumptable snarl just now.

llvm-svn: 78709
2009-08-11 20:30:58 +00:00
Jim Grosbach
67841ae0a8 Add Thumb2 eh_sjlj_setjmp implementation
llvm-svn: 78701
2009-08-11 19:42:21 +00:00
Jim Grosbach
c80da41574 fix GetInstSizeInBytes for eh_sjlj_setjmp
llvm-svn: 78683
2009-08-11 17:08:15 +00:00
Chris Lattner
edb3daa5e9 move some 32-bit instrs to x86instrinfo.td
llvm-svn: 78680
2009-08-11 16:58:39 +00:00
Benjamin Kramer
0481803d2a This void is implicit in C++.
llvm-svn: 78678
2009-08-11 16:03:08 +00:00
Dan Gohman
24939b2c4f Tidy #includes.
llvm-svn: 78677
2009-08-11 16:02:12 +00:00
Dan Gohman
9fbdb3de0d Simplify this code. The case where one class is GR64RegClass and the
other is a subclass of it is effectively handled by the prior tests.

llvm-svn: 78676
2009-08-11 15:59:48 +00:00
Jim Grosbach
3c898a99bd Whitespace cleanup. Remove trailing whitespace.
llvm-svn: 78666
2009-08-11 15:33:49 +00:00
Jim Grosbach
d5fc7e81b2 Move ~ARMConstantPoolValue() to the .cpp file to avoid needing to include <cstdlib> in the header.
llvm-svn: 78665
2009-08-11 15:26:27 +00:00
Evan Cheng
249f07cf57 Fix the previous accidental commit. Now shrinking common Thumb2 load / store instructions.
llvm-svn: 78659
2009-08-11 09:37:40 +00:00
Evan Cheng
434a66fa9b Fix Thumb2 load / store addressing mode matching code. Do not use so_reg form to
match base only address, i.e. [r] since Thumb2 requires a offset register field.
For those, use [r + imm12] where the immediate is zero.
Note the generated assembly code does not look any different after the patch.
But the bug would have broken the JIT (if there is Thumb2 support) and it can
break later passes which expect the address mode to be well-formed.

llvm-svn: 78658
2009-08-11 08:52:18 +00:00
Evan Cheng
9fdf9b4435 80 column violation.
llvm-svn: 78657
2009-08-11 08:47:46 +00:00
Evan Cheng
766c076bea Cosmetic changes.
llvm-svn: 78655
2009-08-11 07:36:14 +00:00
Evan Cheng
dbccf353d1 Adding a blank line back.
llvm-svn: 78654
2009-08-11 07:32:58 +00:00
Bob Wilson
d64e304671 Use vAny type to get rid of Neon intrinsics that differed only in whether
the overloaded vector types allowed floating-point or integer vector elements.
Most of these operations actually depend on the element type, so bitcasting
was not an option.

If you include the vpadd intrinsics that I updated earlier, this gets rid
of 20 intrinsics.

llvm-svn: 78646
2009-08-11 05:39:44 +00:00
Daniel Dunbar
4e0d543e35 llvm-mc/X86: Parse '*' correctly (in the way the matcher expects).
llvm-svn: 78642
2009-08-11 05:00:25 +00:00
Sanjiv Gupta
239a8992f6 Fixed more problems caused by 78142.
Passing of indirect arguments starts after return value on the callee's frame.

llvm-svn: 78635
2009-08-11 01:51:55 +00:00
Bob Wilson
1c75a23299 Use new EVT::vAny type to combine Neon intrinsics for VPADD.
llvm-svn: 78632
2009-08-11 01:15:26 +00:00
Sean Callanan
b6295e7143 Added the x86 INT instructions; both the special-case INT 3 and the general-case
INT i8.  These instructions are only for interpretation by disassemblers, not
for emission, so they do not as yet have patterns.

llvm-svn: 78630
2009-08-11 01:09:06 +00:00
David Goodwin
8ca187462c Fix bug in NEON convert for single-precision FP. This also fixes the tblgen warnings.
llvm-svn: 78629
2009-08-11 01:07:38 +00:00
Jim Grosbach
c2fd915309 Add stdlib.h
llvm-svn: 78627
2009-08-11 00:20:00 +00:00
Jim Grosbach
c9a1dd9291 SjLj based exception handling unwinding support. This patch is nasty, brutish
and short. Well, it's kinda short. Definitely nasty and brutish.

The front-end generates the register/unregister calls into the SjLj runtime,
call-site indices and landing pad dispatch. The back end fills in the LSDA
with the call-site information provided by the front end. Catch blocks are
not yet implemented.

Built on Darwin and verified no llvm-core "make check" regressions.

llvm-svn: 78625
2009-08-11 00:09:57 +00:00
Evan Cheng
49aac700f4 Enable Thumb2 instruction shrinking (32-bit to 16-bit) pass. Convert a bunch of thumb2 tests to FileCheck.
llvm-svn: 78622
2009-08-10 23:56:04 +00:00
Dan Gohman
888bcd3483 Fix a bug where DAGCombine was producing an illegal ConstantFP
node after legalize, and remove the workaround code from the
ARM backend.

llvm-svn: 78615
2009-08-10 23:15:10 +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
Eric Christopher
e1bfb18ec3 Whitespace, 80-column, and isTwoAddress -> Constraints = "" changes.
No functional change.

llvm-svn: 78608
2009-08-10 22:37:37 +00:00
David Goodwin
36a5b02e4f Use NEON for single-precision int<->FP conversions.
llvm-svn: 78604
2009-08-10 22:17:39 +00:00
Devang Patel
d56797d16f Do not rely on magic "llvm.dbg.*" global variable name to find debug info.
PIC16 developers, please verify. 

llvm-svn: 78603
2009-08-10 22:11:20 +00:00
Eric Christopher
88514e18ca Fix up whitespace, remove commented out code.
llvm-svn: 78600
2009-08-10 21:48:58 +00:00
Daniel Dunbar
1ff8dc01aa llvm-mc/AsmParser: Disambiguate i64i8imm.
llvm-svn: 78598
2009-08-10 21:06:41 +00:00
Daniel Dunbar
15c79b6fd7 llvm-mc/AsmParser: Allow .td users to redefine the names of the methods to call
on target specific operands for testing class membership and converting to
MCInst operands.

llvm-svn: 78597
2009-08-10 21:00:45 +00:00
Owen Anderson
30bf6c8dab SimpleValueType-ify a few more methods on TargetLowering.
llvm-svn: 78595
2009-08-10 20:46:15 +00:00
Evan Cheng
f0bb0f5204 Handle the constantfp created during post-legalization dag combiner phase.
llvm-svn: 78594
2009-08-10 20:25:59 +00:00
Owen Anderson
cf56d576eb Continue the SimpleValueType-ification.
llvm-svn: 78593
2009-08-10 20:18:46 +00:00
Daniel Dunbar
20829b121a llvm-mc/AsmMatcher: Fix thinko, Mem isn't a subclass of Imm.
llvm-svn: 78587
2009-08-10 19:08:02 +00:00
Owen Anderson
dcb47bda67 Start moving TargetLowering away from using full MVTs and towards SimpleValueType, which will simplify the privatization of IntegerType in the future.
llvm-svn: 78584
2009-08-10 18:56:59 +00:00
Daniel Dunbar
749ff1de5a llvm-mc/AsmMatcher: Change assembler parser match classes to their own record
structure.

llvm-svn: 78581
2009-08-10 18:41:10 +00:00
Chris Lattner
3e6da637f6 split MachO section handling stuff out to its out .h/.cpp file.
llvm-svn: 78576
2009-08-10 18:15:01 +00:00
Chris Lattner
7abff8fdb4 arm only needs to emit one .align directive for hidden nlp's, not one
per pointer.

llvm-svn: 78574
2009-08-10 18:02:16 +00:00
Chris Lattner
b89551026b make sure that arm nonlazypointers are aligned properly
llvm-svn: 78573
2009-08-10 18:01:34 +00:00
Chris Lattner
49b8a24b7e Fix a weird ppc64-specific link error during an llvm-gcc build:
ld: bad offset (0x00000091) for lo14 instruction pic-base fix-up in ___popcountdi2 from libgcc/./_popcountsi2_s.o

The problem is that the non lazy symbol pointers need to be 8 byte aligned
on ppc64 and .section doesn't have an implicit alignment like ".non_lazy_symbol_pointer"
does.

llvm-svn: 78572
2009-08-10 17:58:51 +00:00
Chris Lattner
7ee4b3a2c0 fix some warnings for the MSVC build, by Yonggang Luo!
llvm-svn: 78571
2009-08-10 17:35:42 +00:00
David Goodwin
b2f53ed68a Checkpoint scheduling itinerary changes.
llvm-svn: 78564
2009-08-10 15:56:13 +00:00