[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter documents the Backend for the 68hc12 microcontroller family.
Note that this backend is not done!
This backend provides the following additional options:
Place identical floating point constants at the same memory location. This can reduce program size and increase compilation time.
By default constant data will be placed in a read-only section. Using this option it will be placed in the data section.
By default arguments of function calls are not always popped from the stack immediately after the call, so that the arguments of several calls may be popped at once. With this option vbcc can be forced to pop them after every function call. This may simplify debugging and very slightly reduce the stack size needed by the compiled program.
Do not perform peephole-optimizations.
Try to hold values loaded from memory in registers and reuse them. Due to the small register-set of the hc12 this is disabled by default as it increases register- pressure and tends to spill to the stack.
The current version generates assembly output for use with the GNU assembler using the non-banked model.
This backend supports the following registers:
d
for the accumulator (also used for byte, i.e. a
)
x
for index register x
y
for index register y
sp
for the stack-pointer
All registers are scratch (i.e. caller-save).
The first function arguments which has integer or pointer types
is passed in the accumulator d
or the register pair d/x
.
The
remaining arguments are passed on the stack.
Integers and pointers are returned in d
or d/x
.
All other types are returned by passing the function the address
of the result as a hidden argument - so when you call such a function
without a proper declaration in scope you can expect a crash.
The elementary data types are represented like:
type size in bits alignment in bytes char 8 1 short 16 2 int 16 2 long currently not supported near pointers 16 2 far pointers currently not supported huge pointers currently not supported float currently not supported double currently not supported |
The hc12-backend offers the following variable attributes:
__interrupt
Return with rfi
rather than blr
.
__section("name","attr")
Place this function/object in section "section" with attributes "attr".
This backend defines the following macros:
__HC12__
If the ‘-stack-check’ option is used, every function-prologue will
call the function __stack_check
with the stacksize needed by this
function in register y
. This function has to consider its own
stacksize and must restore all registers.
To be written...
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by vb on January 3, 2015 using texi2html 1.82.