mirror of
https://github.com/frida/tinycc
synced 2025-01-12 14:49:18 +03:00
Add comment to explain the code added by 41ce391c
Add a comment in arm-gen.c to explain how commit
41ce391c86
solves the register corruption
when passing a structure in a function call.
This commit is contained in:
parent
48fc746652
commit
82b257c29c
@ -1127,7 +1127,10 @@ static int copy_params(int nb_args, struct plan *plan, int todo)
|
||||
for(pplan = plan->clsplans[CORE_STRUCT_CLASS]; pplan; pplan = pplan->prev) {
|
||||
int r;
|
||||
pplan->sval->r = pplan->start;
|
||||
/* TODO: why adding fake param */
|
||||
/* An SValue can only pin 2 registers at best (r and r2) but a structure
|
||||
can occupy more than 2 registers. Thus, we need to push on the value
|
||||
stack some fake parameter to have on SValue for each registers used
|
||||
by a structure (r2 is not used). */
|
||||
for (r = pplan->start + 1; r <= pplan->end; r++) {
|
||||
if (todo & (1 << r)) {
|
||||
nb_extra_sval++;
|
||||
|
Loading…
Reference in New Issue
Block a user