Christoph Mallon [Sat, 15 Dec 2012 11:33:44 +0000 (12:33 +0100)]
write_jna: Simplify fix_builtin_names().
Christoph Mallon [Sat, 15 Dec 2012 11:32:48 +0000 (12:32 +0100)]
write_jna: Properly check whether a declaration is in a system header.
Christoph Mallon [Sat, 15 Dec 2012 10:30:51 +0000 (11:30 +0100)]
cleanup: Reduce variable scope.
Christoph Mallon [Sat, 15 Dec 2012 10:24:58 +0000 (11:24 +0100)]
warning: Add the switch -Wsystem to show warnings in system headers.
Warnings in system headers are suppressed by default now.
Matthias Braun [Wed, 12 Dec 2012 18:53:00 +0000 (19:53 +0100)]
simplify license header similar to libFirm
Only state the project and the copyright. The rest can be found in the
COPYING file.
Matthias Braun [Wed, 12 Dec 2012 17:46:16 +0000 (18:46 +0100)]
cleanup: complex conditional creation style
It is now using the same techniques as can be found in the non-complex
code paths.
Matthias Braun [Wed, 12 Dec 2012 17:45:51 +0000 (18:45 +0100)]
cleanup: refactor complex assignment into an own function
Matthias Braun [Wed, 12 Dec 2012 17:43:06 +0000 (18:43 +0100)]
cleanup: improve coding style
- add some more consts
- remove some unnecessary asserts (which made the code noisy)
- replace an if with ?:
Matthias Braun [Wed, 12 Dec 2012 17:41:14 +0000 (18:41 +0100)]
cleanup: avoid unnecessary complicated code sharing
Matthias Braun [Mon, 10 Dec 2012 15:42:53 +0000 (16:42 +0100)]
update libfirm revision
Christoph Mallon [Wed, 12 Dec 2012 13:07:48 +0000 (14:07 +0100)]
parser: Parse and reject GCC range initializers "[0 ... 9]".
Christoph Mallon [Wed, 12 Dec 2012 15:48:58 +0000 (16:48 +0100)]
parser: Use parse_expression() instead of parse_assignment_expression() where appropriate.
Christoph Mallon [Wed, 12 Dec 2012 15:54:19 +0000 (16:54 +0100)]
ast2firm: Replace get_store(set_store(x)) by x.
Christoph Mallon [Wed, 12 Dec 2012 15:51:43 +0000 (16:51 +0100)]
ast2firm: Use conv_to_storage_type().
Christoph Mallon [Wed, 12 Dec 2012 15:50:11 +0000 (16:50 +0100)]
parser: Simplify parse_complex_extract_expression().
Christoph Mallon [Wed, 12 Dec 2012 15:38:24 +0000 (16:38 +0100)]
parser: Remove redundant assignment.
allocate_expression_zero() sets the pos.
Christoph Mallon [Wed, 12 Dec 2012 10:12:54 +0000 (11:12 +0100)]
ast: Remove redundant test.
Complex types are scalar.
Christoph Mallon [Wed, 12 Dec 2012 15:37:42 +0000 (16:37 +0100)]
parser: Remove redundant test.
parse_expression() never returns null.
Christoph Mallon [Wed, 12 Dec 2012 09:08:22 +0000 (10:08 +0100)]
libfirm: Update to newer version.
This resolves the assertion, that PIC types miss the segment flag.
Matthias Braun [Tue, 11 Dec 2012 10:34:00 +0000 (11:34 +0100)]
relational operators are only allowed for real types
Matthias Braun [Tue, 11 Dec 2012 10:21:40 +0000 (11:21 +0100)]
update libfirm submodule
This should avoid some failures when inlining calls with complex
args/results
Matthias Braun [Tue, 11 Dec 2012 10:07:28 +0000 (11:07 +0100)]
accept (but warn) '_Complex' without additional specifiers
Matthias Braun [Tue, 11 Dec 2012 10:03:24 +0000 (11:03 +0100)]
implement statement expressions for complex values
Matthias Braun [Tue, 11 Dec 2012 10:02:57 +0000 (11:02 +0100)]
do not warn for missing declarations if type is invalid
Matthias Braun [Mon, 10 Dec 2012 23:01:47 +0000 (00:01 +0100)]
complex bitops are not allowed even for _Complex int
Matthias Braun [Mon, 10 Dec 2012 15:35:47 +0000 (16:35 +0100)]
implement support for complex types
Not tested that much yet, and support for statement expressions is still
missing.
Matthias Braun [Wed, 5 Dec 2012 22:31:48 +0000 (23:31 +0100)]
fix TODO
Matthias Braun [Thu, 6 Dec 2012 12:25:51 +0000 (13:25 +0100)]
rename bitwise_negate to complement
Matthias Braun [Wed, 5 Dec 2012 23:05:38 +0000 (00:05 +0100)]
fix coding style
Matthias Braun [Mon, 10 Dec 2012 15:42:53 +0000 (16:42 +0100)]
update libfirm revision
Christoph Mallon [Mon, 10 Dec 2012 14:48:18 +0000 (15:48 +0100)]
ast2firm: When the result of ?: is unreachable, create a Bad value, not Unknown.
Christoph Mallon [Sun, 9 Dec 2012 22:27:57 +0000 (23:27 +0100)]
ast2firm: Convert operands to the arithmetic mode, not results.
This is a bit simpler and avoids several pointless conversions in float calculations.
Christoph Mallon [Sun, 9 Dec 2012 10:11:43 +0000 (11:11 +0100)]
ast2firm: Rewrite IR construction for expressions.
Christoph Mallon [Mon, 10 Dec 2012 07:12:19 +0000 (08:12 +0100)]
ast2firm: There is no sensible IR type to create for void, so do not do it.
Christoph Mallon [Mon, 10 Dec 2012 07:05:00 +0000 (08:05 +0100)]
semantic: Add missing skip_typeref() to avoid adding unnecessary implicit casts.
In particular this avoids insertion of non-scalar nop casts.
Therefore some tests, which later skip them, are removed, too.
Christoph Mallon [Sun, 9 Dec 2012 17:41:46 +0000 (18:41 +0100)]
ast2firm: Remove unnecessary special case handling for constant folding.
In particular the case in conditional_to_firm() should be covered by jump target handling.
Christoph Mallon [Sun, 9 Dec 2012 10:09:19 +0000 (11:09 +0100)]
ast2firm: Remove the thin wrapper function set_value_for_expression().
Christoph Mallon [Sun, 9 Dec 2012 09:06:15 +0000 (10:06 +0100)]
ast2firm: Remove nonsensical case: You cannot take the address of a function call result.
Christoph Mallon [Sun, 9 Dec 2012 09:50:49 +0000 (10:50 +0100)]
ast2firm: Use the value returned by set_value_for_expression_addr() as return value for prefix ++/--.
- This is important for bitfields, which contain fewer bits than the to be stored value has.
- This is important for float variables, when the calculation is done in higher precision.
Christoph Mallon [Sat, 8 Dec 2012 22:17:47 +0000 (23:17 +0100)]
ast2firm: Clean up create_incdec().
Christoph Mallon [Sat, 8 Dec 2012 11:18:48 +0000 (12:18 +0100)]
ast2firm: Factorise code to convert a value to its storage type.
Christoph Mallon [Sat, 8 Dec 2012 09:57:26 +0000 (10:57 +0100)]
cleanup: Remove unused typedef.
Christoph Mallon [Fri, 7 Dec 2012 12:42:55 +0000 (13:42 +0100)]
type: Add missing space for printing complex types.
Christoph Mallon [Thu, 6 Dec 2012 14:31:22 +0000 (15:31 +0100)]
Adapt to latest libfirm: "nooptcc=yes" is "optcc=false" now.
Matthias Braun [Tue, 4 Dec 2012 17:26:16 +0000 (18:26 +0100)]
adapt to latest libfirm
Matthias Braun [Thu, 29 Nov 2012 09:49:36 +0000 (10:49 +0100)]
support complex type (no arithmetic yet)
Sebastian Buchwald [Mon, 3 Dec 2012 07:30:30 +0000 (08:30 +0100)]
Fixed some typos.
Matthias Braun [Sat, 1 Dec 2012 14:27:26 +0000 (15:27 +0100)]
rename source_position_t to position_t, rename members to pos
Christoph Mallon [Thu, 29 Nov 2012 22:13:09 +0000 (23:13 +0100)]
preprocessor: Do not use uninitialized values for the column in error messages.
Matthias Braun [Wed, 28 Nov 2012 14:33:53 +0000 (15:33 +0100)]
do not fail when initializing tokens multiple times
Matthias Braun [Wed, 28 Nov 2012 12:29:38 +0000 (13:29 +0100)]
fix cases where compoundlits are constant/get an entity
This is possible when they are in global scope (and have a constant
initializers anyway) or when they have a const type and constant
initializers.
Matthias Braun [Tue, 27 Nov 2012 08:36:12 +0000 (09:36 +0100)]
implement -Wa, -Xlinker, -Xpreprocessor, -Xassembler
Matthias Braun [Mon, 26 Nov 2012 16:12:29 +0000 (17:12 +0100)]
don't grow the hashset if it just clobbered with deleted entries
Matthias Braun [Mon, 26 Nov 2012 14:07:07 +0000 (15:07 +0100)]
adapt to change firmstat settings
Matthias Braun [Sat, 24 Nov 2012 16:36:26 +0000 (17:36 +0100)]
support compound values in dynamic initializers
Christoph Mallon [Sat, 24 Nov 2012 09:32:34 +0000 (10:32 +0100)]
parser: Remove extra '' around %K in an error message.
Christoph Mallon [Fri, 23 Nov 2012 06:42:49 +0000 (07:42 +0100)]
timer: Enlarge the display space for description and time.
Matthias Braun [Thu, 22 Nov 2012 21:46:34 +0000 (22:46 +0100)]
support compound literals as initializers
Christoph Mallon [Thu, 22 Nov 2012 13:36:06 +0000 (14:36 +0100)]
semantic: Improve error messages.
Christoph Mallon [Thu, 22 Nov 2012 11:23:00 +0000 (12:23 +0100)]
semantic: The operands of % must be integer, not just arithmetic.
Christoph Mallon [Wed, 21 Nov 2012 20:22:09 +0000 (21:22 +0100)]
cleanup: Remove redundant assignment.
allocate_entity_zero() sets the source position already.
Christoph Mallon [Wed, 21 Nov 2012 15:42:49 +0000 (16:42 +0100)]
ast2firm: Keep the ijmp block and memory.
It might be an (endless) loop header.
Matthias Braun [Fri, 16 Nov 2012 18:08:30 +0000 (19:08 +0100)]
update for new release
Matthias Braun [Wed, 21 Nov 2012 16:47:09 +0000 (17:47 +0100)]
fix "make bootstrap" with libfirm submodule
Matthias Braun [Mon, 19 Nov 2012 16:59:02 +0000 (17:59 +0100)]
fold all nodes in the constant code irg regardless of opt settings
Matthias Braun [Fri, 16 Nov 2012 17:54:11 +0000 (18:54 +0100)]
update libfirm revision
Matthias Braun [Thu, 15 Nov 2012 18:38:06 +0000 (19:38 +0100)]
main: rework preprocessor invocation
- reintroduce the -x assembler-with-cpp support
- fix wrong output directory for -MMD,-MD switches
- do not output various c-flags for assembler cpp anymore
Christoph Mallon [Fri, 9 Nov 2012 08:41:45 +0000 (09:41 +0100)]
diagnostic: Use errorf(NULL, "[...]") instead of fprintf(stderr, "error: [...]\n").
Christoph Mallon [Fri, 9 Nov 2012 08:38:10 +0000 (09:38 +0100)]
diagnostic: Allow passing no position or only a filename to diagnosticposvf().
Christoph Mallon [Fri, 9 Nov 2012 08:46:05 +0000 (09:46 +0100)]
input: Simplify choose_decoder().
Matthias Braun [Sat, 10 Nov 2012 17:03:18 +0000 (18:03 +0100)]
Makefile: cleanup, rewrite, add coverage variant
Makes the style more similar to the one used in libfirm. Add build
variant for coverage testing.
Christoph Mallon [Fri, 9 Nov 2012 07:16:51 +0000 (08:16 +0100)]
Remove \n from error messages.
Christoph Mallon [Fri, 9 Nov 2012 08:16:27 +0000 (09:16 +0100)]
Add missing \n after printing a warning when using -fno-diagnostics-show-option.
Christoph Mallon [Fri, 26 Oct 2012 05:03:24 +0000 (07:03 +0200)]
Parse (and reject) asm goto.
Christoph Mallon [Thu, 8 Nov 2012 13:56:43 +0000 (14:56 +0100)]
Improve error recovery when parsing asm statements by adding more anchors.
Christoph Mallon [Thu, 8 Nov 2012 13:32:46 +0000 (14:32 +0100)]
Reject trailing commas when parsing asm argument and clobber lists.
Christoph Mallon [Thu, 8 Nov 2012 13:25:08 +0000 (14:25 +0100)]
Simplify passing passing the results of parse_asm_arguments() and parse_asm_clobbers().
Christoph Mallon [Thu, 8 Nov 2012 13:23:02 +0000 (14:23 +0100)]
Improve error recovery in parse_asm_arguments().
There is not need to abort parsing arguments, if we failed to parse the name for an asm argument.
Christoph Mallon [Thu, 8 Nov 2012 07:46:46 +0000 (08:46 +0100)]
Make printing asm statements a bit nicer by using fewer spaces.
Christoph Mallon [Thu, 8 Nov 2012 08:44:40 +0000 (09:44 +0100)]
Clean up print_asm_statement().
Christoph Mallon [Wed, 28 Mar 2012 07:10:29 +0000 (09:10 +0200)]
Add separator_t to aid printing lists with separators.
Christoph Mallon [Wed, 7 Nov 2012 14:15:59 +0000 (15:15 +0100)]
Rename next_if() to accept() and document it.
Christoph Mallon [Thu, 8 Nov 2012 03:58:39 +0000 (04:58 +0100)]
Only produce an error about the type of an array subscript, if the type is valid.
Christoph Mallon [Wed, 7 Nov 2012 08:07:12 +0000 (09:07 +0100)]
Check for constant conditions in create_condition_evaluation().
If the condition was folded to a constant, then make an unconditional jump to the appropriate target instead of constructing a Cond.
This avoids further unnecessary basic blocks and Bad nodes.
Christoph Mallon [Wed, 7 Nov 2012 07:39:15 +0000 (08:39 +0100)]
Reduce scope of variable.
Christoph Mallon [Tue, 6 Nov 2012 14:56:59 +0000 (15:56 +0100)]
Keep all loops, because they could become infinite.
Christoph Mallon [Sat, 27 Oct 2012 18:58:19 +0000 (20:58 +0200)]
Implement U, u and u8 strings.
Christoph Mallon [Sat, 27 Oct 2012 13:19:22 +0000 (15:19 +0200)]
Let panic() print file, line and function.
Adjust some panic messages accordingly.
Christoph Mallon [Fri, 26 Oct 2012 09:26:00 +0000 (11:26 +0200)]
Route all computed goto statements of a function through one IJmp.
This avoids the unsplitable critical edges, if there multiple computed goto statements.
Christoph Mallon [Fri, 26 Oct 2012 09:00:37 +0000 (11:00 +0200)]
Use jump_target for goto labels.
This saves an unnecessary block, if only a single forward jump reaches a label.
Christoph Mallon [Fri, 26 Oct 2012 08:43:52 +0000 (10:43 +0200)]
Use a separate block as target for indirect jumps.
This is a preparation for using jump_targets for labels and avoiding critical edges at indirect jumps.
Christoph Mallon [Fri, 26 Oct 2012 08:01:02 +0000 (10:01 +0200)]
Replace jump_if_reachable() by jump_targets.
Christoph Mallon [Fri, 26 Oct 2012 07:57:34 +0000 (09:57 +0200)]
Use jump_target for conditional jumps.
Christoph Mallon [Fri, 26 Oct 2012 06:48:11 +0000 (08:48 +0200)]
Use jump_target for break.
This saves an unnecessary block, if a loop/switch is only left via a single break.
Christoph Mallon [Fri, 26 Oct 2012 06:20:05 +0000 (08:20 +0200)]
Use jump_target for continue.
- This saves an unnecessary block in for-loops, if the step is only reached by one source.
- This saves an unnecessary block in do-while-loops, if the condition is only reached by one source.
Christoph Mallon [Fri, 26 Oct 2012 05:56:42 +0000 (07:56 +0200)]
Use jump_target to simplify the implementation of if_statement_to_firm().
Christoph Mallon [Fri, 26 Oct 2012 05:56:26 +0000 (07:56 +0200)]
Add jump_targets as general mechanism to avoid unnecessary basic blocks.
Matthias Braun [Wed, 24 Oct 2012 16:22:42 +0000 (18:22 +0200)]
use ir_tarval to calculate case values
This avoids problems when handling unsigned long long case values in
the parser, which formerly only used long/int.
Fixes 64bit switches in combination with new libfirm.
Christoph Mallon [Thu, 25 Oct 2012 10:50:29 +0000 (12:50 +0200)]
Remove typedefs of non-existent structs.
Christoph Mallon [Wed, 24 Oct 2012 11:58:55 +0000 (13:58 +0200)]
Use a reference counter to mature label blocks as early as possible.