| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/
|
|
| |
This violates the 80-column width limit, but is really important.
|
|
|
|
| |
handled as a function with void parameter.
|
|
|
|
|
| |
C11 allows a typedef redefinition if the types are the same.
We now allow this also and issue a warning and an error if the types are different.
|
|\
| |
| | |
Correction of a few bugs in the pre-parser, added comments.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
was not parsed correctly:
typedef int a;
int f() {
for(int a; ;)
if(1);
a * x;
}
Additionnaly, I tried to add some comments in the pre-parser code,
especially for the different hacks used to solve various conflicts.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Local variables are now added with bogus lexical scopes to reflect
the actually lexical scopes. Also this commit fixes assembler problems
of the das when a user section with the name ".text" is defined.
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
cparser/Unblock.ml
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As observed by B. Schommer, it is not enough to track scopes for every source line, as blocks can occur on a single line (think macros). Hence:
- Revert debug annotations of kind 1 to contain only line number info.
Generate them only when the line number changes.
- Use debug annotations of kind 6 to record the list of active scopes
(as BA_int integer arguments to __builtin_annot). Generate them
before every nontrivial statement, even if on the same line as others.
- Remove the generation of "variable x is declared in scope N" debug
annotations. This can be tracked separately and more efficiently.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of creating separate annotations for the local variables
we call the Debug.add_lvar_scope and we construct a mapping from
function id + scope id to scope information.
|
|\| |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
debug/CtoDwarf.ml
debug/DwarfPrinter.ml
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
C2C: the code that insert debug builtins with the line numbers is now
in Unblock. Handle calls to __builtin_debug.
Unblock: generate __builtin_debug(1) for line numbers, carrying
the list of active scopes as extra arguments.
Generate __builtin_debug(6) for local variable declarations,
carrying the corresponding scope number as extra argument.
Constprop: avoid duplicating debug arguments that are constants already.
PrintAsmaux: show this extra debug info as comments.
|
| |
| |
| |
| |
| | |
The transformation is the same as the one used for structs but packing
always stops after each member.
|
| |
| |
| |
| |
| | |
If they only report an error an assertion failure in Reame.ml was
triggered.
|
| |
| |
| |
| |
| | |
Instead of reimplementing the whole scope handling in the debug information
use the existing functionality and fill the scopes explicitly in the functions.
|
| |
| |
| |
| |
| |
| | |
Scopes will be handled by a stack of all open scopes. This stack
then can also be used to generate the debug directives to track the
scopes through the rest of the passes.
|
| |
| |
| |
| |
| | |
Introduced a new dwarf generation from the information collected in
the DebugInformation and removed the old CtODwarf translation.
|
|/
|
|
|
|
| |
Added functions to add more information to the debuging interface,
like the struct layout with offsets, bitifiled layout and removed
the no longer needed mapping from stamp to atom.
|
|
|
|
| |
structured builtin arguments and results.
|
|
|
|
| |
static variables to avoid problems with files such as "a b.c".
|
| |
|
|
|
|
| |
parameter.
|
| |
|
|
|
|
|
|
| |
The copy optimization is not correct in case of overlap between destination
and source. We would need to use an hypothetical __builtin_memmove_aligned
that can cope with overlap to implement the copy at return of callee.
|
|
|
|
|
|
|
|
| |
As per ISO C99, "hosted environment".
"return 0" is added at the end of any function named "main" that has
"int" as return type. If the name is "main" but the return type is
not "int", emit a warning and do not add anything.
|
|
|
|
| |
Also: improve error message by showing old and new types.
|
|
|
|
|
|
| |
cparser/Bitfields.ml: when assigning to a bit field of type _Bool, the
right-hand side must be normalized to 0 or 1 via a cast to _Bool.
test/regression/bitfields{1,9}.c: add corresponding test cases.
|
|\ |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
Conflicts:
driver/Driver.ml
|
| | |
|
|\| |
|
| |
| |
| |
| |
| | |
Otherwise we get too many errors on glibc's standard headers.
A real error will occur when the anonymous struct/union is accessed.
|
| |
| |
| |
| | |
variable is redefined as a typedef.
|
|/ |
|
| |
|
|
|
|
| |
non-static declaration is followed by a static declaration/definition.
|
|
|
|
|
|
|
|
|
|
| |
- Treat clobbered registers as being destroyed by EF_inline_asm builtins
(which is the truth, semantically).
- To enable the above, represent clobbers as Coq strings rather than idents
and move register_by_name from Machregsaux.ml to Machregs.v.
- Side benefit: more efficient implementation of Machregsaux.name_of_register.
-# Please enter the commit message for your changes. Lines starting
|
|
|
|
| |
and produce a diagnostic instead of ignoring them.
|
|
|
|
| |
bit field.
|
|
|
|
| |
unblocking; improve translation of bitfield initializers and compound literals.
|
|
|
|
|
|
| |
Bitfields: better translation of initializers and compound literals; run this pass before unblocking.
Transform.stmt: extend with ability to treat unblocked code.
test/regression: more bitfield tests.
|
|
|
|
| |
clobber lists.
|
|
|
|
|
| |
We can ignore alternatives as long as one of the constraints we
handle (r, m, i, n) is there.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- support "r", "m" and "i" constraints
- support "%Q" and "%R" modifiers for register pairs
- support register clobbers
- split off analysis and transformation of asm statements in
cparser/ExtendedAsm.ml
|
| |
|
|\ |
|