1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

2298 Commits

Author SHA1 Message Date
Jim Laskey
6f5d7d292f Only gather frame info if debug or eh.
llvm-svn: 33639
2007-01-29 23:20:22 +00:00
Nate Begeman
dc46021355 Finish off bug 680, allowing targets to custom lower frame and return
address nodes.

llvm-svn: 33636
2007-01-29 22:58:52 +00:00
Anton Korobeynikov
2b2aa3f0a1 Save all registers by default, as they can be used to pass parameters
for "inreg" calls

llvm-svn: 33631
2007-01-29 21:28:01 +00:00
Jim Laskey
eba0cf04e5 Landing pad-less eh for PPC.
llvm-svn: 33622
2007-01-29 18:51:14 +00:00
Nick Lewycky
e788dc93d5 Fix compile error "jump to case label crosses initialization".
What compiler are people using that accepts this code?

llvm-svn: 33603
2007-01-28 15:39:16 +00:00
Anton Korobeynikov
611d5e2eda Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.

NOTEs: 1. Documentation will be updated soon.
       2. llvm-upgrade should be improved to translate csret => sret.
          Before this, there will be some unexpected test fails.
llvm-svn: 33597
2007-01-28 13:31:35 +00:00
Bill Wendling
5b83c819ec Make d'tor out-of-line.
llvm-svn: 33585
2007-01-27 11:40:32 +00:00
Bill Wendling
9c7b0a19eb Return an X86ELFWriterInfo object.
llvm-svn: 33574
2007-01-27 02:56:16 +00:00
Bill Wendling
f5cec978ec X86 implementation of the TargetELFWriterInfo class.
llvm-svn: 33571
2007-01-27 02:54:30 +00:00
Jim Laskey
64f4242072 Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
for debugging and exception handling.

llvm-svn: 33550
2007-01-26 21:22:28 +00:00
Jim Laskey
23ed7d2625 Make LABEL a builtin opcode.
llvm-svn: 33537
2007-01-26 14:34:52 +00:00
Chris Lattner
18aeb42a6f Fix test/CFrontend/2007-01-24-InlineAsmCModifier.c on X86. The %c modifier
says that no $ prefix should be emitted on X86.

llvm-svn: 33495
2007-01-25 02:53:24 +00:00
Jim Laskey
ba1dc7a8c7 Call frames for intel.
llvm-svn: 33490
2007-01-24 19:15:24 +00:00
Jim Laskey
ebaec45158 80 columns
llvm-svn: 33489
2007-01-24 18:50:57 +00:00
Chris Lattner
784201d1b9 Fix a misencoding of CBW and CWD. This fixes PR1030.
llvm-svn: 33486
2007-01-24 18:31:00 +00:00
Evan Cheng
b6a4a7f72a PEI is now responsible for adding MaxCallFrameSize to frame size and align the stack. Each target can further adjust the frame size if necessary.
llvm-svn: 33460
2007-01-23 09:38:11 +00:00
Evan Cheng
d9d93832b0 hasFP() is now a virtual method of MRegisterInfo.
llvm-svn: 33455
2007-01-23 00:57:47 +00:00
Evan Cheng
8de7964067 Double and long preferred alignment is 8 byte.
llvm-svn: 33446
2007-01-22 23:09:50 +00:00
Evan Cheng
818c6bdfa2 Linux GOT indirect reference is only necessary in PIC mode.
llvm-svn: 33441
2007-01-22 21:34:25 +00:00
Chris Lattner
601692407e add a note
llvm-svn: 33423
2007-01-21 07:03:37 +00:00
Chris Lattner
9df9e3e57b Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!

llvm-svn: 33409
2007-01-20 22:35:55 +00:00
Evan Cheng
174826c1b9 One more try...
llvm-svn: 33400
2007-01-20 10:17:53 +00:00
Evan Cheng
672910d722 Last check-in was bogus. There is no need to align the stack if the function is a leaf function (and without alloca).
llvm-svn: 33399
2007-01-20 10:11:56 +00:00
Evan Cheng
5807fbc934 Backend is reponsible for aligning the stack.
llvm-svn: 33388
2007-01-20 02:08:16 +00:00
Evan Cheng
f6b1a88a1a - Target PIC style is no longer affected by relocation model.
- In x86-64 mode, symbols with external linkage (not just symbols which are
  defined externally) requires GOT indirect reference.
- Stylistic code clean up.

llvm-svn: 33345
2007-01-18 22:27:12 +00:00
Bill Wendling
62dff8125a The zerofill directive needs a newline after it.
llvm-svn: 33327
2007-01-18 02:30:19 +00:00
Evan Cheng
7ff918163b Minor code clean up.
llvm-svn: 33323
2007-01-18 01:49:58 +00:00
Chris Lattner
770735e1ca Modify emission of jump tables on darwin to emit an extra "l" label that
delimits the boundaries of jump tables.  This lets the linker's dead code
stripping optimization do a better job.

llvm-svn: 33315
2007-01-18 01:15:58 +00:00
Chris Lattner
cea9f391af restructure code a bit to make use of continue (simplifying things). Generalize
the .zerofill directive emission to not be darwin-specific

llvm-svn: 33304
2007-01-17 17:44:25 +00:00
Chris Lattner
5f4435800e darwin doesn't support .bss, but it does have .zerofill
llvm-svn: 33303
2007-01-17 17:43:33 +00:00
Anton Korobeynikov
2509765bef * Fix one more bug in PIC codegen: extra load is needed for *all*
non-statics.
* Introduce new option to output zero-initialized data to .bss section.
This can reduce size of binaries. Enable it by default for ELF &
Cygwin/Mingw targets. Probably, Darwin should be also added.

llvm-svn: 33299
2007-01-17 10:33:08 +00:00
Bill Wendling
6cf6bb2d24 Revert patch.
llvm-svn: 33298
2007-01-17 09:06:13 +00:00
Bill Wendling
60dcce11c7 Create the specified TargetObjInfo and use it.
llvm-svn: 33291
2007-01-17 03:51:37 +00:00
Bill Wendling
5789edd7f5 New "TargetObjInfo" class. This holds information that the object writers will
use to write things to the file. It's abstract so each target should implement
its own version for each writer type.

llvm-svn: 33286
2007-01-17 03:46:30 +00:00
Anton Korobeynikov
47f343edc3 Missed "<" :)
llvm-svn: 33265
2007-01-16 20:22:18 +00:00
Anton Korobeynikov
9b380c56f2 Cleanup. Comments added.
llvm-svn: 33260
2007-01-16 18:23:09 +00:00
Chris Lattner
30cef1024d document some subtlety
llvm-svn: 33257
2007-01-16 17:51:40 +00:00
Anton Korobeynikov
8fbc09843e Emit symbol type information for ELF/COFF targets
llvm-svn: 33256
2007-01-16 16:41:57 +00:00
Bill Wendling
efde03bbf6 Instead of yet another enum indicating the "assembly language flavor",
just use the one that's in the subtarget.

llvm-svn: 33255
2007-01-16 09:29:17 +00:00
Bill Wendling
08272a2fa6 Make inline ASM the INTEL one if it's in that emission mode.
llvm-svn: 33247
2007-01-16 04:13:03 +00:00
Bill Wendling
cfdd717db5 Fix for PR1095:
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.

llvm-svn: 33246
2007-01-16 03:42:04 +00:00
Chris Lattner
851b9e93a2 add some notes
llvm-svn: 33228
2007-01-15 06:25:39 +00:00
Chris Lattner
c5e1611848 rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.

This makes naming much more consistent.  For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)

llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
bf132d8342 Make use of isInteger vs isIntegral more explicit
llvm-svn: 33216
2007-01-15 01:48:11 +00:00
Anton Korobeynikov
9398ef2167 No hidden visiblity on Mingw32/Cygwin
llvm-svn: 33202
2007-01-14 11:49:39 +00:00
Chris Lattner
f43ad084b8 add support for hidden visibility to darwin/x86
llvm-svn: 33198
2007-01-14 06:29:53 +00:00
Chris Lattner
716c76605c add a missing else. This caused globals to be printed as:
movq ___dso_handle@GOTPCREL(%rip)(%rip), %rsi

instead of:
        movq ___dso_handle@GOTPCREL(%rip), %rsi

llvm-svn: 33196
2007-01-14 06:08:14 +00:00
Chris Lattner
3560a9f595 darwin doesn't use .hidden. Disable this until we fix it right.
llvm-svn: 33191
2007-01-14 00:50:56 +00:00
Chris Lattner
a4d48724af Fix PR1103 and Regression/CodeGen/X86/2007-01-13-StackPtrIndex.ll
llvm-svn: 33189
2007-01-14 00:13:07 +00:00
Chris Lattner
937b09c54a remove dead code, frameindices must be resolve before the asmprinter runs.
llvm-svn: 33187
2007-01-13 23:59:03 +00:00