Skip to content
New issue

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

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

Already on GitHub? # to your account

riscv64imac-unknown-none-elf cross compiler got "error: instruction requires the following: 'M' (Integer Multiplication and Division)" #30

Open
elliott10 opened this issue Mar 24, 2022 · 1 comment

Comments

@elliott10
Copy link

When I cross-compile RISCV assembly instructions in file.asm with "rustc 1.60.0-nightly (5e57faa78 2022-01-19) riscv64imac-unknown-none-elf" toolchain.
I got the following error:

error: instruction requires the following: 'M' (Integer Multiplication and Division)
        mul t0, t0, a0
        ^

Please help, How should I avoid this error ?

@sslime336
Copy link

Try adding this to your asm file(hope this would work):

.attribute arch, "rv64gc"

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

No branches or pull requests

2 participants