mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-20 18:50:21 +02:00
Correct build and pass all tests on Solaris Sparc.
* lib/jit_sparc-cpu.c: Correct compiler warning of value used before assignment. The usage is bogus as the api requires always patching jumps, but the random value used could cause an assertion due to invalid displacement. * lib/jit_sparc.c: Always load and store double arguments in stack as 2 float loads or stores, for safety, as unaligned access is not allowed in Sparc Solaris.
This commit is contained in:
parent
7807aab036
commit
af92c5adfe
4 changed files with 26 additions and 7 deletions
|
@ -372,8 +372,10 @@ _jit_getarg_d(jit_state_t *_jit, jit_int32_t u, jit_node_t *v)
|
|||
jit_ldxi_f(u, JIT_FP, -8);
|
||||
jit_ldxi_f(u + 1, JIT_FP, stack_framesize);
|
||||
}
|
||||
else
|
||||
jit_ldxi_d(u, JIT_FP, v->u.w);
|
||||
else {
|
||||
jit_ldxi_f(u, JIT_FP, v->u.w);
|
||||
jit_ldxi_f(u + 1, JIT_FP, v->u.w + 4);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -455,7 +457,10 @@ _jit_pushargr_d(jit_state_t *_jit, jit_int32_t u)
|
|||
_jitc->function->call.size += sizeof(jit_float32_t);
|
||||
}
|
||||
else {
|
||||
jit_stxi_d(_jitc->function->call.size + stack_framesize, JIT_SP, u);
|
||||
jit_stxi_f(_jitc->function->call.size + stack_framesize,
|
||||
JIT_SP, u);
|
||||
jit_stxi_f(_jitc->function->call.size + stack_framesize + 4,
|
||||
JIT_SP, u + 1);
|
||||
_jitc->function->call.size += sizeof(jit_float64_t);
|
||||
}
|
||||
}
|
||||
|
@ -480,7 +485,10 @@ _jit_pushargi_d(jit_state_t *_jit, jit_float64_t u)
|
|||
_jitc->function->call.size += sizeof(jit_float32_t);
|
||||
}
|
||||
else {
|
||||
jit_stxi_d(_jitc->function->call.size + stack_framesize, JIT_SP, regno);
|
||||
jit_stxi_f(_jitc->function->call.size + stack_framesize,
|
||||
JIT_SP, regno);
|
||||
jit_stxi_f(_jitc->function->call.size + stack_framesize + 4,
|
||||
JIT_SP, regno + 1);
|
||||
_jitc->function->call.size += sizeof(jit_float64_t);
|
||||
}
|
||||
jit_unget_reg(regno);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue