Closed zejiang0jason closed 6 years ago
Hi,
indeed there is a limitation of the toolchain which only supports both floats and doubles but not only floats. Until this is fixed, there are 2 work-arounds:
Either make sure that you have no double in your code by always using floats constants (e.g. 1.20f), calling float functions (e.g. cosf) and using only float type.
Or use this option to map doubles to floats: -mfpdouble=float . There is also this option available to have constants being floats: - -fsingle-precision-constant
Best,
Germain
On 24.08.2017 10:17, zejiangfish wrote:
Hi,
I found double float instruction "fmv.d" in my image then the core ran to illegal instruction error. I guess this is because of the 'D' flag in toolchain build option "-march=IMFDXpulpv2". But when I changed to "-march=IMFXpulpv2", I got such build error
cc1: error: -march=IMFXpulpv2: single-precision-only is not yet supported
How can I configure the toolchain to remove the double float instructions? Thanks.
B.R. Zejiang
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pulp-platform/ri5cy_gnu_toolchain/issues/9, or mute the thread https://github.com/notifications/unsubscribe-auth/AOcRKD7xjHzXZKHuTEE7pkni826QUBIPks5sbTGYgaJpZM4PBCoy.
Hi Germain,
Thanks a lot for your answer.
The work-around are workable but not so convenient, the code must be updated and not sure whether the functionality will be impacted.
Is there toolchain update plan for this?
Thanks again.
Yes indeed this is just a temporary work-around, this is planned to get rid of this issue but I cannot tell yet when this is done.
Germain
On 24.08.2017 15:47, zejiangfish wrote:
Hi Germain,
Thanks a lot for your answer.
The work-around are workable but not so convenient, the code must be updated and not sure whether the functionality will be impacted.
Is there toolchain update plan for this?
Thanks again.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pulp-platform/ri5cy_gnu_toolchain/issues/9#issuecomment-324640098, or mute the thread https://github.com/notifications/unsubscribe-auth/AOcRKLywX8HO5cYE__AsGb-Y5-cWN9IMks5sbX76gaJpZM4PBCoy.
Hi Germain,
OK, thanks.
Hi,
When I tried the FPU, I found double float instruction "fmv.d" in my image then the core ran to illegal instruction error. I guess this is because of the 'D' flag in toolchain build option "-march=IMFDXpulpv2". But when I changed to "-march=IMFXpulpv2", I got such build error
How can I configure the toolchain to remove the double float instructions? Thanks.
B.R. Zejiang