riscv: fp parameters
makes 23_type_coercion work. (clean up to 31_args)
This commit is contained in:
parent
0d3db83f16
commit
02c8e69a07
1 changed files with 5 additions and 3 deletions
|
@ -432,14 +432,16 @@ ST_FUNC void gfunc_prolog(CType *func_type)
|
||||||
} else {
|
} else {
|
||||||
int regcount = 1;
|
int regcount = 1;
|
||||||
if (size > XLEN)
|
if (size > XLEN)
|
||||||
regcount++;
|
regcount++, tcc_error("unimp: scalars > 64bit");
|
||||||
if (regcount + (is_float(type->t) ? afreg : aireg) >= 8)
|
if (regcount + (is_float(type->t) ? afreg : aireg) >= 8)
|
||||||
goto from_stack;
|
goto from_stack;
|
||||||
loc -= regcount * 8;
|
loc -= regcount * 8; // XXX could reserve only 'size' bytes
|
||||||
param_addr = loc;
|
param_addr = loc;
|
||||||
for (i = 0; i < regcount; i++) {
|
for (i = 0; i < regcount; i++) {
|
||||||
if (is_float(type->t)) {
|
if (is_float(type->t)) {
|
||||||
tcc_error("unimp: float args");
|
assert(type->t == VT_FLOAT || type->t == VT_DOUBLE);
|
||||||
|
ES(0x27, size == 4 ? 2 : 3, 8, 10 + afreg, loc + i*8); // fs[wd] FAi, loc(s0)
|
||||||
|
afreg++;
|
||||||
} else {
|
} else {
|
||||||
ES(0x23, 3, 8, 10 + aireg, loc + i*8); // sd aX, loc(s0) // XXX
|
ES(0x23, 3, 8, 10 + aireg, loc + i*8); // sd aX, loc(s0) // XXX
|
||||||
aireg++;
|
aireg++;
|
||||||
|
|
Loading…
Reference in a new issue