You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use rv8 to run codes that are compiled by 32bits compiler. My 32bits compiler is built using --with-arch=rv32gc and --with-abi=ilp32d. And the version of my compiler is 7.2.0. I find the output of rv8/src/test/test-fpu-printf.c is not correct.
The content of test-fpu-printf.c:
#include <stdio.h>
int main()
{
float f1 = 1.0f;
float f2 = 3.0f;
float f3 = f1 / f2;
printf("%.9ef ÷ %.9ef = %.9ef\n", f1, f2, f3);
}
I set RISCV as the path of the 32bits compiler, and run make test-build-rv32 to compile codes.
I also use objdump to see the generated assembly instructions:
I'm trying to use rv8 to run codes that are compiled by 32bits compiler. My 32bits compiler is built using --with-arch=rv32gc and --with-abi=ilp32d. And the version of my compiler is 7.2.0. I find the output of rv8/src/test/test-fpu-printf.c is not correct.
The content of test-fpu-printf.c:
I set
RISCV
as the path of the 32bits compiler, and runmake test-build-rv32
to compile codes.I also use
objdump
to see the generated assembly instructions:But the otuput is:

Besides, I don't know why the compiler emits
fld
andfsd
instructions. Since the variables f1 and f2 are float, the compiler should useflw
andfsw
.The text was updated successfully, but these errors were encountered: