??? 03/12/11 08:41 Read: times |
#181557 - SDCC Responding to: ???'s previous message |
I don't know what Keil does, but SDCC passes bool parameters at fixed addresses just like all other parameters for non-reentrant functions. No change in calling convention here.
For reentrant functions SDCC uses a byte in the bit-addressable area to implement bool pseudo-registers. This byte is pushed/popped on stack around function calls just like other real registers. Each function can thus use 8 bool parameters and local variables. Sometimes more depending on live ranges. The bool parameters are ignored for the calling convention of passing other parameters. This is what I considered optimal. |
Topic | Author | Date |
bit type function parameter | 01/01/70 00:00 | |
Look at instruction set | 01/01/70 00:00 | |
What is your actual problem here? | 01/01/70 00:00 | |
main concern is code operation. | 01/01/70 00:00 | |
parameter converted to global variable | 01/01/70 00:00 | |
No reentrancy | 01/01/70 00:00 | |
Is it the 8051 instruction set? | 01/01/70 00:00 | |
Still looked at the bit capabilities of the processor? | 01/01/70 00:00 | |
You need to ask Keil | 01/01/70 00:00 | |
Use bool to simplify | 01/01/70 00:00 | |
BOOLEAN directive used | 01/01/70 00:00 | |
stdbool | 01/01/70 00:00 | |
Use stdbool | 01/01/70 00:00 | |
Optimal implementation | 01/01/70 00:00 | |
SDCC | 01/01/70 00:00 | |
Optimal for what? | 01/01/70 00:00 | |
both | 01/01/70 00:00 |