Commit Graph

126 Commits

Author SHA1 Message Date
Chris Lattner b421aebcc0 Fix problems with programs that prototype printf to something unusual
llvm-svn: 8538
2003-09-15 16:47:12 +00:00
Misha Brukman acda7df68b Fixed spelling and grammar.
llvm-svn: 8489
2003-09-11 22:34:13 +00:00
Chris Lattner e7980ae2ee Remove a bunch of warnings from the CBE generated C code
llvm-svn: 8455
2003-09-10 20:12:09 +00:00
Chris Lattner ad3f079976 "the one true solution for compatibility with GCC 3.3+"
... or so I hope

llvm-svn: 8454
2003-09-10 20:08:00 +00:00
Chris Lattner 04ecefe232 Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
llvm-svn: 8411
2003-09-08 19:44:26 +00:00
Chris Lattner 9c58cf6d03 Add support for the unwind instruction
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner cbd234f26b Fix really nasty bugs in the CWriter, handling invoke instructions. Tracking
these down was NOT phun.

llvm-svn: 8181
2003-08-28 19:56:10 +00:00
Chris Lattner c434e138ac Simplify code
llvm-svn: 8139
2003-08-24 21:00:22 +00:00
Chris Lattner 35829a154d Implement support for the unwind intrinsic in the CBE
llvm-svn: 8116
2003-08-24 13:06:10 +00:00
Chris Lattner a592cac43c Add support for the sig(set|long)jmp intrinsics
llvm-svn: 7951
2003-08-18 16:06:09 +00:00
Misha Brukman 7eb05a170a Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner 47be951787 Stop annoying warnings about mismatched types with the argument of a free
implement more constant expressions so that 176.gcc compiles with the CBE

llvm-svn: 7847
2003-08-14 19:19:53 +00:00
Chris Lattner 584058220a The HAVE_JUMP code is dead, these intrinsics should _never_ be expanded
llvm-svn: 7642
2003-08-06 18:04:40 +00:00
Chris Lattner 9fabe8dddf Unbreak the CBE output
llvm-svn: 7453
2003-07-31 17:47:24 +00:00
John Criswell 6e264f078a Modified the code so that it generates (0) for setjmp() and abort() for
longjmp() (and does not include setjmp.h).
This is to fix some problems on Sparc while non-local jumps are still
unimplemented.

llvm-svn: 7449
2003-07-31 15:11:08 +00:00
Brian Gaeke 3d35fad525 Don't include llvm/SlotCalculator.h, or <set>.
Move up the inclusion of llvm/Support/Mangler.h.

llvm-svn: 7320
2003-07-25 20:21:06 +00:00
Brian Gaeke 46f8b71376 Use unified CWriter-X86/Printer name mangler. Do not bother using
SlotCalculator in CWriter.  (Unfortunately, all this means a lot of
X86/Printer's methods have to be de-constified again.  Oh well.)

llvm-svn: 7299
2003-07-24 20:20:44 +00:00
Chris Lattner bbc2bc1790 Fix program: SingleSource/UnitTests/2003-07-09-SignedArgs with the CBE
llvm-svn: 7276
2003-07-23 20:45:31 +00:00
Chris Lattner 6077c3195f Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting

llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Misha Brukman 96c8d59c9c Eliminated dead code.
llvm-svn: 7209
2003-07-21 16:34:35 +00:00
Misha Brukman 1194d54975 Some beautification changes (tabs to spaces, removed extra blank lines);
no functionality changed.

llvm-svn: 7138
2003-07-09 17:33:50 +00:00
John Criswell b99b317cba Removed size_t from the parameter list of the malloc() prototype in generated C
code.  This prevents a compiler warning on Sparc that causes the tests to fail.

llvm-svn: 7125
2003-07-08 14:52:09 +00:00
Chris Lattner fd7016a8ba jmp_buf is really a pointer type that is passed around...
llvm-svn: 6935
2003-06-28 19:29:34 +00:00
Chris Lattner 27223935d7 Add support for the Invoke instruction!
llvm-svn: 6934
2003-06-28 17:53:05 +00:00
Chris Lattner a80de5a3be Preserve compatibility with non-gcc compilers
llvm-svn: 6932
2003-06-28 17:15:12 +00:00
Chris Lattner 90921a7eee Fix bug: CBackend/2003-06-28-LinkOnceGlobalVars.llx
llvm-svn: 6931
2003-06-28 17:08:36 +00:00
Joel Stanley fbb9ab4913 - Fixed name mangling conditions to handle 'linkonce' linkage type. In
particular, name mangling for GlobalValues only occurs when the linkage type is
internal or when the name must be mangled to avoid a collision.  See comments in
CWriter::getValueName for more information.

- 'inline' keyword is now emitted for functions with 'linkonce' linkage type.

- Fixed typos.

llvm-svn: 6898
2003-06-25 04:52:09 +00:00
Brian Gaeke 7610971759 It seems likely that floats would need a cast too, because they are
ordinarily promoted to doubles.

llvm-svn: 6894
2003-06-25 03:05:33 +00:00
Brian Gaeke 04bdfe624c Fix 2003-06-23-PromotedExprs.llx -- if we are adding two bytes we better
explicitly cast the result to be a byte, or C will gleefully promote it
to int.

llvm-svn: 6869
2003-06-23 20:00:51 +00:00
Brian Gaeke 87b4f0765c lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code here
into a new function FPCSafeToPrint(), and use it in printConstant()
and printFunction() to decide whether we should output ConstantFPs as
floating-point constants or as references to stack-allocated variables.

lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above.

llvm-svn: 6762
2003-06-17 23:55:35 +00:00
Chris Lattner fb70cf528e Fairly major change: emit fixed sized allocas in the entry block as a variable,
instead of a variable pointer and an alloca.  All accesses to the variable then
use the address-of operator to access it.  This plays better with the internal
GCC code generation phases, which bail early on functions which contain allocas.
It also makes the code a bit easier to read.

llvm-svn: 6734
2003-06-17 04:39:14 +00:00
Brian Gaeke 32f27e9f45 Don't include alloca.h on FreeBSD.
llvm-svn: 6728
2003-06-16 23:57:13 +00:00
Chris Lattner 71ec97a6e1 Fix typeo
llvm-svn: 6704
2003-06-16 12:21:19 +00:00
Chris Lattner d994fd3d88 Fix bug: CBackend/2003-06-11-HexConstant.ll
Fix bug: CBackend/2003-06-11-LiteralStringProblem.ll

llvm-svn: 6697
2003-06-16 12:09:09 +00:00
Chris Lattner b630abfd47 Don't output explicit initializers for globals that are zero initialized
llvm-svn: 6651
2003-06-06 07:10:24 +00:00
Chris Lattner 239ff501ac Fix bug: CBackend/2003-06-01-NullPointerType.ll
llvm-svn: 6526
2003-06-02 03:10:53 +00:00
Chris Lattner 886fca4dc2 Fix a bug with casts to bool. This fixes testcase UnitTests/2003-05-31-CastToBool.c
llvm-svn: 6507
2003-06-01 03:36:51 +00:00
Chris Lattner f789f29aaa Eliminate unnecessary ->get calls that are now automatically handled.
llvm-svn: 6397
2003-05-29 15:12:27 +00:00
Chris Lattner 192623ec93 Add support for setjmp/longjmp primitives
Patch checked in for Bill Wendling :)

llvm-svn: 6241
2003-05-17 22:26:33 +00:00
Chris Lattner c009d58eb3 Casts are now unnecessary
llvm-svn: 6199
2003-05-14 17:50:19 +00:00
Chris Lattner 922f4f2bd4 Fix bug: CBackend/2003-05-13-VarArgFunction.ll
In C, a prototype with no arguments is varargs.  A prototype that takes void
has zero args.

llvm-svn: 6172
2003-05-13 20:15:37 +00:00
Chris Lattner 778b947bfc Fix bug: CWriter/2003-05-12-IntegerSizeWarning.c
llvm-svn: 6128
2003-05-12 15:39:31 +00:00
Chris Lattner 7ba4f0a737 Add support for variable argument functions!
llvm-svn: 6044
2003-05-08 18:41:45 +00:00
Chris Lattner 5b5c7933ce Fix bug: UnitTests/2003-05-02-DependantPHI.c
Fix testcase MultiSource/Ptrdist-ks

llvm-svn: 6000
2003-05-03 07:11:00 +00:00
Chris Lattner 57ebe40f57 * Eliminate using decls
* Fix some styleistic things
* Fix bug: CWriter/2002-05-16-NameCollide.ll

llvm-svn: 5988
2003-05-03 03:14:35 +00:00
Chris Lattner 5bc7eb5fd8 Fix problem where labels were being incorrectly elided, and fix problem
where PHI copies where not emitted for the default label of switch insts

llvm-svn: 5882
2003-04-23 19:15:13 +00:00
Chris Lattner 5cc1270689 Fix the super obnoxious "cast to pointer from integer of different size" warnings
llvm-svn: 5881
2003-04-23 19:09:22 +00:00
Chris Lattner 6ee2cf5d89 Remove unneccesary &*
llvm-svn: 5871
2003-04-23 16:36:11 +00:00
Chris Lattner f86060f45a Add support for the switch instruction to the CWriter
llvm-svn: 5847
2003-04-22 20:19:52 +00:00
Joel Stanley e490214bae Fixed alloca declaration problem on sun.
llvm-svn: 5546
2003-02-12 20:45:00 +00:00