Matthias Braun [Tue, 6 Sep 2011 14:16:40 +0000 (16:16 +0200)]
sparc: fix invalid stack bias calculation in omit-fp-mode
Matthias Braun [Tue, 6 Sep 2011 14:16:24 +0000 (16:16 +0200)]
sparc: panic instead of segfault for struct parameters
Matthias Braun [Tue, 6 Sep 2011 11:55:20 +0000 (13:55 +0200)]
remove has_compound_ret_parameter, we already had cc_compound_ret
This should also fix compound returns in combination with
-msoft-float on sparc
Matthias Braun [Tue, 6 Sep 2011 11:24:28 +0000 (13:24 +0200)]
sparc: support for thread local storage
Matthias Braun [Tue, 6 Sep 2011 11:00:45 +0000 (13:00 +0200)]
begnuas: let user specify elf variants
Matthias Braun [Mon, 5 Sep 2011 14:22:19 +0000 (16:22 +0200)]
lower parameter entities in softfloat lowerer
Matthias Braun [Mon, 5 Sep 2011 15:00:08 +0000 (17:00 +0200)]
sparc: do not use MATCH_MODE_NEUTRAL when using Or/And/Eor for flags
Manuel Mohr [Fri, 26 Aug 2011 11:28:02 +0000 (13:28 +0200)]
sparc: Ignore long doubles like ia32 backend.
Softfloat library does not support long double anyway.
Matthias Braun [Mon, 5 Sep 2011 14:48:49 +0000 (16:48 +0200)]
sparc: split Mulh node into SMulh and UMulh
(Hannes ancient technique based on the Proj-mode is deprecated)
Manuel Mohr [Wed, 24 Aug 2011 14:30:23 +0000 (16:30 +0200)]
sparc: Stop looking for delay slot node when leaving current block.
Manuel Mohr [Wed, 24 Aug 2011 12:51:58 +0000 (14:51 +0200)]
Added dw_lower special case to handle Calls whose result is never used.
Matthias Braun [Mon, 5 Sep 2011 12:07:17 +0000 (14:07 +0200)]
Alternative fix for const functions with aggregate return
They really are const before lowering. So only mark the function
as non-const after lowering
This reverts commit
72c631f337f78b20460c508bd8af37fe67a5af37.
Matthias Braun [Tue, 23 Aug 2011 17:09:29 +0000 (19:09 +0200)]
sparc: initial support for Alloc/Free nodes
This commit also adds a generic Alloc/Free lowering helper
Unfortunately we often produce invalid code, because currently our
stackpointer wiring logic is too weak and produces invalid results for
example when using alloca in a loop.
Matthias Braun [Tue, 23 Aug 2011 16:51:08 +0000 (18:51 +0200)]
rename Free argument from size to count to be consistent with Alloc
Andreas Zwinkau [Tue, 6 Sep 2011 09:14:06 +0000 (11:14 +0200)]
Fix cfopt bug due to infinite loops
Christoph Mallon [Sat, 3 Sep 2011 14:45:22 +0000 (16:45 +0200)]
Print the linkage of entities only once, not twice.
Christoph Mallon [Sat, 3 Sep 2011 14:34:29 +0000 (16:34 +0200)]
Print the value of const initializers instead of just <CONST>Const.
Christoph Mallon [Sat, 3 Sep 2011 14:33:22 +0000 (16:33 +0200)]
Add missing newlines when dumping entities.
Christoph Mallon [Sat, 3 Sep 2011 14:31:45 +0000 (16:31 +0200)]
Print "default" instead of nothing if an entity has default linkage.
Sebastian Buchwald [Fri, 2 Sep 2011 12:53:34 +0000 (14:53 +0200)]
We may return a parameter and thus need to copy them.
This fixes opt/fehler200.c.
Manuel Mohr [Thu, 1 Sep 2011 17:41:51 +0000 (19:41 +0200)]
Directly ask backend for current machine size in CopyB lowering.
Old version used parameter.
Andreas Zwinkau [Thu, 1 Sep 2011 16:54:31 +0000 (18:54 +0200)]
Adapt documentation to implementation
Andreas Zwinkau [Thu, 1 Sep 2011 14:34:47 +0000 (16:34 +0200)]
Cmp must not counted as an operation
Andreas Zwinkau [Thu, 1 Sep 2011 14:27:33 +0000 (16:27 +0200)]
Let collect_nodes cope with Bad nodes
Manuel Mohr [Thu, 1 Sep 2011 14:00:31 +0000 (16:00 +0200)]
Do not regard functions with compound return types as pure/const.
Manuel Mohr [Wed, 31 Aug 2011 17:34:55 +0000 (19:34 +0200)]
Improved CopyB lowering, made it part of target lowering.
Backends can configure CopyB lowering, so that it's possible to keep
CopyB nodes in a certain size range for special backend-specific
optimizations. Furthermore, large CopyBs are turned into memcpy calls.
Andreas Zwinkau [Thu, 1 Sep 2011 10:40:37 +0000 (12:40 +0200)]
fix warning
Andreas Zwinkau [Thu, 1 Sep 2011 09:10:22 +0000 (11:10 +0200)]
Improve cfopt
The part, which does not handle Phis is now recomputing block info,
because converting Cond -> Jmp, might make this info obsolete.
Additionally, it can now remove empty Jmp blocks with more than one
control flow predecessor, provided the origin block has no Phis.
Now cfopt should now be idempotent
(at least the part not handling Phis).
Matthias Braun [Tue, 23 Aug 2011 17:19:05 +0000 (19:19 +0200)]
fix the fix of the call ordering...
Matthias Braun [Tue, 23 Aug 2011 11:22:40 +0000 (13:22 +0200)]
ia32: make sure the stackframe IncSp is always used
Matthias Braun [Mon, 22 Aug 2011 14:11:58 +0000 (16:11 +0200)]
sparc: support va_start
Matthias Braun [Mon, 22 Aug 2011 13:24:05 +0000 (15:24 +0200)]
a const parameter is enough for get_method_XXX()
Matthias Braun [Mon, 22 Aug 2011 12:47:14 +0000 (14:47 +0200)]
add special constant to represent VA_START-address in a parameter_entity
Matthias Braun [Thu, 18 Aug 2011 17:17:30 +0000 (19:17 +0200)]
beverify: test register width in regalloc verification
Matthias Braun [Thu, 18 Aug 2011 13:01:44 +0000 (15:01 +0200)]
fix mode of call-result proj
Manuel Mohr [Fri, 19 Aug 2011 13:25:54 +0000 (15:25 +0200)]
Fixed call dependency comparison for backend call ordering.
Code was taken from cmp_call_dependency in beabi.c which handles the
situation correctly.
Sebastian Buchwald [Fri, 19 Aug 2011 12:07:11 +0000 (14:07 +0200)]
Bugfix: Added special case for x mod 1.
Julian Oppermann [Fri, 19 Aug 2011 11:46:32 +0000 (13:46 +0200)]
IR export: export mode name as string; mark "the" mode_P mode.
Andreas Zwinkau [Fri, 19 Aug 2011 08:17:01 +0000 (10:17 +0200)]
Clarify remove_bads doc
Christoph Mallon [Fri, 19 Aug 2011 06:15:04 +0000 (08:15 +0200)]
Correct comment.
Christoph Mallon [Fri, 19 Aug 2011 06:14:21 +0000 (08:14 +0200)]
Reduce code duplication.
Christoph Mallon [Fri, 19 Aug 2011 06:08:41 +0000 (08:08 +0200)]
Use new_*_Const(irg, get_mode_$VAL(mode)) instead of new_*_Const_long(irg, mode, $VAL).
Manuel Mohr [Thu, 18 Aug 2011 16:56:55 +0000 (18:56 +0200)]
sparc: Set object file format when initializing backend.
Old version breaks for files which do not contain any functions because
in this case, emit_routine never gets called.
Andreas Zwinkau [Thu, 18 Aug 2011 14:56:50 +0000 (16:56 +0200)]
Fix div by one
For k==0 the Div to Shift conversion is wrong.
Instead, we just convert to the left operand of the Div.
Andreas Zwinkau [Thu, 18 Aug 2011 14:53:18 +0000 (16:53 +0200)]
Refactoring to remove one level of indentation
Andreas Zwinkau [Thu, 18 Aug 2011 14:44:19 +0000 (16:44 +0200)]
A comment for better understanding
Manuel Mohr [Thu, 18 Aug 2011 14:40:52 +0000 (16:40 +0200)]
sparc: Added a comment.
Manuel Mohr [Thu, 18 Aug 2011 14:06:24 +0000 (16:06 +0200)]
sparc: Add support for Conds where selector is not a Cmp.
Andreas Zwinkau [Thu, 18 Aug 2011 13:41:54 +0000 (15:41 +0200)]
cleanup
The variable is overwritten right afterwards
Julian Oppermann [Thu, 18 Aug 2011 12:39:19 +0000 (14:39 +0200)]
Don't try to import cons_flags.
Sebastian Buchwald [Thu, 18 Aug 2011 12:31:40 +0000 (14:31 +0200)]
Fixed opt/fehler196.c.
Christoph Mallon [Wed, 17 Aug 2011 19:00:50 +0000 (21:00 +0200)]
Allow selecting one past the last parameter to get variadic parameters.
Christoph Mallon [Wed, 17 Aug 2011 17:40:37 +0000 (19:40 +0200)]
Remove unnecessary assignment, which at worst hides a panic.
Christoph Mallon [Wed, 17 Aug 2011 13:44:43 +0000 (15:44 +0200)]
Fix emission of string initializers.
Non-printable characters are emitted as octal sequences, e.g. \0 for 0.
Always pad them to three digits, so they do not accidently join with a following ASCII digit.
E.g. "\0""7" was emitted as "\07", correct is "\0007".
Sebastian Buchwald [Wed, 17 Aug 2011 14:33:13 +0000 (16:33 +0200)]
Fixed local optimization.
We have to convert the values the same way the program does.
Matthias Braun [Wed, 17 Aug 2011 13:15:38 +0000 (15:15 +0200)]
replace unsupported builtins with library calls
Matthias Braun [Tue, 16 Aug 2011 11:26:19 +0000 (13:26 +0200)]
sparc: fix mode of Ldf Projs
Matthias Braun [Mon, 15 Aug 2011 16:10:38 +0000 (18:10 +0200)]
add callback for constructing spill/reload
So we are not forced to use the generic be_Spill, be_Reload functions
which don't work correctly with double-width register requirements.
This should really fix sparc float spill/reload this time.
Matthias Braun [Mon, 15 Aug 2011 13:24:55 +0000 (15:24 +0200)]
simplify copy interface and respect double/aligned reqs
Matthias Braun [Mon, 15 Aug 2011 12:23:40 +0000 (14:23 +0200)]
fix warnings reported by cparser
Christoph Mallon [Wed, 17 Aug 2011 07:57:39 +0000 (09:57 +0200)]
Correct reg_reqs_equal().
If req2 was limited and req1 wasn't, then it incorrectly returned true.
Christoph Mallon [Wed, 17 Aug 2011 07:57:06 +0000 (09:57 +0200)]
Correct typos in comments.
Christoph Mallon [Wed, 17 Aug 2011 07:56:36 +0000 (09:56 +0200)]
Correct indentation.
Sebastian Buchwald [Mon, 15 Aug 2011 14:39:21 +0000 (16:39 +0200)]
Added soft float support for SPARC backend.
Andreas Zwinkau [Tue, 16 Aug 2011 12:58:03 +0000 (14:58 +0200)]
Fix C/bitfield4
Load-Store-Opt now shifts constant loads from bitfields accordingly.
Andreas Zwinkau [Tue, 16 Aug 2011 12:29:38 +0000 (14:29 +0200)]
cleanup
Andreas Zwinkau [Tue, 16 Aug 2011 12:01:35 +0000 (14:01 +0200)]
fix missing else
Andreas Zwinkau [Tue, 16 Aug 2011 11:28:18 +0000 (13:28 +0200)]
API Change: Use graph state instead of parameter
The lowering phase had a lower_bitfield parameter.
Instead of passing "true", the (e.g. EDG) frontends now must
set_irg_state(irg, IR_GRAPH_STATE_IMPLICIT_BITFIELD_MASKING).
This is necessary, because not only the lowering phase is affected.
Additionally, the load store optimisation should handle Sels differently.
Andreas Zwinkau [Fri, 12 Aug 2011 10:34:09 +0000 (12:34 +0200)]
cleanup
Removes obsolete debug output and confusing comments
Matthias Braun [Mon, 15 Aug 2011 11:41:11 +0000 (13:41 +0200)]
big refactoring of arch_XXX functions
This tries to get the names in a consistent format. We basically have 2
views on register allocation/constraints now:
1) Register Requirements and Assigments are per-instruction. Each
instruction has requirements on its inputs and outputs, register get
assigned for outputs of an instruction (assignment is an attribute of
an instruction, not of the Proj-nodes).
The internal datastructures model this form!
The functions here have the form:
arch_get_irn_register_req_in(node, input_nr)
arch_get_irn_register_in(node, input_nr)
arch_get_irn_register_req_out(node, output_nr)
arch_set_irn_register_out(node, output_nr, register)
2) Register Requirements and Assignments are on firm-values. This view
allows to query/assign requirements and registers at the Proj nodes
instead of the repsective predecessors.
This is a convenience interface modeled on top of the other!
The functions have the form:
arch_get_irn_register_req(node)
arch_get_irn_register(node)
arch_set_irn_register(node, register)
Matthias Braun [Sun, 14 Aug 2011 12:01:53 +0000 (14:01 +0200)]
remove old type
Matthias Braun [Fri, 12 Aug 2011 12:53:13 +0000 (14:53 +0200)]
sparc: fix spilling+reloading of float values
Matthias Braun [Fri, 12 Aug 2011 11:30:22 +0000 (13:30 +0200)]
implement aggregate returns according to sparc ABI
Matthias Braun [Thu, 11 Aug 2011 12:35:43 +0000 (14:35 +0200)]
custom stack bias code for sparc
Matthias Braun [Thu, 11 Aug 2011 12:36:53 +0000 (14:36 +0200)]
sparc: fix float calling conventions
Matthias Braun [Thu, 11 Aug 2011 13:32:00 +0000 (15:32 +0200)]
sparc: fix mode of fdiv result
Matthias Braun [Tue, 9 Aug 2011 07:59:45 +0000 (09:59 +0200)]
sparc: fix wrong incsp in omit-fp mode
Matthias Braun [Tue, 9 Aug 2011 07:54:25 +0000 (09:54 +0200)]
fix names of some dumped vcg files
Matthias Braun [Mon, 8 Aug 2011 15:03:04 +0000 (17:03 +0200)]
sparc: floatingpoint flags producing nodes have 1 cycle delay, add an ad-hoc fix for that
Matthias Braun [Mon, 8 Aug 2011 15:01:54 +0000 (17:01 +0200)]
fix sparc fneg instruction emitter
Matthias Braun [Wed, 27 Jul 2011 10:53:10 +0000 (12:53 +0200)]
avoid generic names like flags in generator
Matthias Braun [Fri, 15 Jul 2011 12:10:41 +0000 (14:10 +0200)]
Implement double-register support for prefalloc with an ILP method
Matthias Braun [Mon, 25 Jul 2011 13:52:20 +0000 (15:52 +0200)]
use 'default' ilp solver if nothing specified
Matthias Braun [Fri, 15 Jul 2011 12:10:05 +0000 (14:10 +0200)]
lpp: only read solution in gurobi solver if one was found
Matthias Braun [Fri, 15 Jul 2011 12:01:30 +0000 (14:01 +0200)]
lpp: call the constraint types lpp_{less|greater}_equal because they are a {less|greater} equal operation
Matthias Braun [Fri, 15 Jul 2011 11:38:03 +0000 (13:38 +0200)]
consistently give all lpp functions an lpp_ prefix
Matthias Braun [Fri, 15 Jul 2011 11:36:08 +0000 (13:36 +0200)]
lpp: use inline functions instead of macros
Matthias Braun [Thu, 14 Jul 2011 11:48:00 +0000 (13:48 +0200)]
lpp: add firm copyright header, some cleanups
Matthias Braun [Wed, 15 Jun 2011 11:35:38 +0000 (13:35 +0200)]
fix cparser warnings in beprefalloc
Matthias Braun [Fri, 17 Sep 2010 11:37:03 +0000 (13:37 +0200)]
prefalloc will respect alignment when initially assigning registers
Matthias Braun [Fri, 12 Aug 2011 16:31:48 +0000 (18:31 +0200)]
do not sign_extend too early in tarval_convert_to
Matthias Braun [Thu, 11 Aug 2011 11:59:17 +0000 (13:59 +0200)]
simplify/remove unnecessary complicated copy-pasta code
Matthias Braun [Thu, 11 Aug 2011 11:46:15 +0000 (13:46 +0200)]
merge after_ra and finish phase, and move stack_bias fixing into backends
Sebastian Buchwald [Thu, 11 Aug 2011 13:26:39 +0000 (15:26 +0200)]
Added soft float support for IA32 backend.
Sebastian Buchwald [Thu, 11 Aug 2011 12:18:48 +0000 (14:18 +0200)]
Implemented floating point lowering to Calls into a soft float library.
Andreas Zwinkau [Fri, 12 Aug 2011 09:02:16 +0000 (11:02 +0200)]
Fix size_t related warnings
Andreas Zwinkau [Fri, 12 Aug 2011 08:17:57 +0000 (10:17 +0200)]
Inliner must not inline parameter entities
This reverts commit
a63fa62c9468f8af3fa6b16001912de9c9c472af.
While the inliner could do this right,
the fix for now is to not inline such functions.
Andreas Zwinkau [Thu, 11 Aug 2011 14:12:31 +0000 (16:12 +0200)]
Inliner must clear parameter flag of entities
Matthias Braun [Wed, 10 Aug 2011 08:57:32 +0000 (10:57 +0200)]
also change mode_P when setting a new modeP_data
Matthias Braun [Tue, 9 Aug 2011 08:48:13 +0000 (10:48 +0200)]
let backends specify the complete long double type