Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with building "Error: illegal operands `addi sp,sp,-20*(1<<2)-20*FPREGBYTES'" #26

Open
Dranzey opened this issue Sep 16, 2020 · 1 comment

Comments

@Dranzey
Copy link

Dranzey commented Sep 16, 2020

Hello everyone! Firstly i hope this is right place to post my problem. If it's not please redirect me to another section. I'm trying to build a Cmake based project on target: Sipeed Longan Nano, which is GD32VF103CBT6 MCU with RISC-V 32-bit core of GigaDevice. During configuration process i faced a problem with "entry.S" file, which was connected to the toolchain. I thinks it's some startup code. This are Assembler messages:

Error: illegal operands addi sp,sp,-20*(1<<2)-20FPREGBYTES' Error: unrecognized opcode fpstore f0,(20(1<<2)+0FPREGBYTES)(sp)'
Error: unrecognized opcode fpstore f1,(20*(1<<2)+1FPREGBYTES)(sp)' Error: unrecognized opcode fpstore f2,(20(1<<2)+2FPREGBYTES)(sp)'
Error: unrecognized opcode fpload f0,(20
(1<<2)+0FPREGBYTES)(sp)' Error: unrecognized opcode fpload f1,(20(1<<2)+1FPREGBYTES)(sp)'

@GPSBabelDeveloper
Copy link

GD32V is an RV32IMAC core. It has integer the integer core (that's the I) and multiply and divide (that's the M) plus Atomics and Compressed. It doesn't have floating point. I would not expect fpload and fpstore to be valid opcodes.

I suspect that startup code that you don't understand doesn't understand this family of chips. I'm pretty sure that Longan Nano just doesn't have floating point. Maybe your configuration process needs a tweak to Not Do That, but if your mystery program really needs FP, you should brace yourself for floating point emulation libraries which can be terribly slow. So a lot depends on how badly your app really assumes the presence of FP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants