| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new file Debug.ml contains the interface for generating and
printing debug information. In order to generate debug information
the init function initializes the necessary functions depending
on the -g flag. If the -g is not there all functions are dummy
functions which do nothing.
|
| | |
| | |
| | |
| | |
| | | |
Added the rest of the global declarations and started adding functions
to fill in the missing information about struct and union fields etc.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The insert_type function add types by adding their subtypes. Also currently
the structs or unions are added as empty skeletopn and later during filled
during the inserting of the declarations.
|
| | |
| | |
| | |
| | |
| | |
| | | |
In contrast to CtoDwarf this time we use the name to identify
everything. To make this work we print the full identifier with stamp
to avoid the problems with anonymous structs and unions.
|
| | | |
|
| | |
| | |
| | |
| | | |
This reverts commit 861292a6c5e58b4f78bef207c717b801b3fc1fed.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Added a new file debug/Debug.ml which will be the interface between for
generating and printing the debuging information. Currently it contains
only the code for the line directived.
|
| |\ \
| | | |
| | | |
| | | | |
Merge branch 'master' into debug_locations
|
| | | | |
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
debug/CtoDwarf.ml
debug/DwarfPrinter.ml
debug/DwarfTypes.mli
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
Atomic builtins
|
| | | | |
| | | | |
| | | | |
| | | | | |
for the rlwinm.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
the atomics.
|
| |\ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Instead of introducing a new bne instruction in Asm.v and the TargetPrinter.ml
I use the equivalent bf instruction. The duplicated code is due to unused return
values of builtins. Now we only emit the additional code for the return value if
the return value is used instead of duplicating the whole emiting sequence.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In order to avoid clashes during register allocation etc. The
builtins now use fixed registers and mark additional registers as
destroyed for temporaries.
|
| | | | | | |
|
| | | | | | |
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The new __builtin_atomic_compare_exchange(int *ptr,int *exp,int *dsr);
writes dsr into ptr if ptr is equal to exp and returns true if
ptr is not equal to exp it writes ptr into exp and returns false.
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Conflicts:
powerpc/CBuiltins.ml
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Implement the new __builtin_atomic_load(int *a, int *b); which stores
*a in *b. This differs from the atomic_load of the GCC, since the PPC
ISA manual states that you must jump before the load again if it fails.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The new builtin __builtin_atomic_exchange(int *a, int *b, int *c)
stores *b in *a and sets *c to the old value of *a.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
(Suggested by A. Appel.)
|
| |_|_|/ / / /
|/| | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The transformation is the same as the one used for structs but packing
always stops after each member.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
In RTL and beyond, the result of a builtin function that has return type different from "void" must be BR, never BR_none. Otherwise, we get compile-time fatal errors, either in Asmexpand or in Lineartyping.
|
| | | | | | | |
|
| |_|/ / / /
|/| | | | | |
|
| |/ / / /
|/| | | | |
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
If they only report an error an assertion failure in Reame.ml was
triggered.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The builtin_isel function takes a _Bool as first argument and returns
either the second or the third depending on the value of the _Bool.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This builtins can be used to get the call frame address and the return
address. To correctly compute the load address of the return address
the allocframe is extended to contain the offset of the return address.
|