DWARF2 debugging information is now written for the Diab and GCC backends.
.json
format.<f>
becomes _<file>_<f>
.return 0
for main()
without return.typedef
name
is used after a for loop that uses the same name for a loop variable.Note: the built-ins are for a PPC architecture in embedded mode only.
__builtin_set_spr(spr,val) | Moves val to special purpose register spr |
result = __builtin_get_spr(spr) | Returns the value of the special purpose register spr in result |
__builtin_prefetch(ea,rw=0/1,ct=0/1/2) | Data Cache Block (rw=0) or Data Cache Block for Store (rw=1) |
__builtin_dcbf(ea) | Data Cache Block Flush |
__builtin_dcbt(ea) | Data Cache Block Touch |
__builtin_dcbtls(ea,ct=0/2) | Data Cache Block Touch and Lock Set |
__builtin_dcbi(ea) | Data Cache Block Invalidate |
__builtin_dcbz(ea) | Data Cache Block Set to Zero |
__builtin_icbtls(ea,ct=0/2) | Instruction Cache Block Touch and Lock Set |
__builtin_icbi(ea) | Instruction Cache Block Invalidate |
__builtin_mbar(mo=0/1) | Memory Barrier |
__builtin_isync() | Instruction Synchronize |
__builtin_sync() / __builtin_lwsync | Synchronize |
__builtin_cmpb(result,a,b) | Compare Bytes |
__atomic_exchange(ea0,ea1,result) | Atomic Exchange: stores the contents of *ea1 into *ea0 while
the original value of *ea0 is copied
to *result |
result = __atomic_compare_exchange(ea,expected,desired) | |
Atomic Compare and Exchange: compares the content of *ea
to that of *expected ; if these are equal, the operation
is a read-modify-write that writes *desired into *ea
and the returned value result is 1 ; if they are not
equal, the operation is a read and the current content of *ea
is written into *expected while the returned value result
is 0 |
|
__atomic_load(source,destination) | Atomic Load: returns the contents of *source in *destination |
result = __sync_fetch_and_add(ea,val) | Syncronize Fetch and Add: increments the content of *ea by val and returns the previous
value of *ea |
result = __builtin_clz(val) | Count Leading Zeros in val |
result = __builtin_isel(e, vala, valb) | Returns vala if the given boolean expression e
is true, and valb otherwise |
_Bool
,
the right-hand side is now normalized to 0
or 1
via a cast to _Bool
.stwux
and cntlzw
instructions.wchar_t
type and the typedef
in the stddef
header are now compatible to the WindRiver Diab C compiler.If any of the following features are used, code correctness cannot be guaranteed in the current version of CompCert and must be checked separately.
float
that are passed
via the stack are passed as 4-byte single precision values.
This behaviour differs from that of the Windriver Diab C compiler,
which converts float arguments to double precision when passing
them via the stack.