Closed allencho1222 closed 6 years ago
Dup of #202, #190
Current status riscv/riscv-binutils-gdb#104
Hello, @sorear I guess it's not a duplicate issue. @allencho1222 was talking about Spike. All previous solutions were valid under the C++ hardware emulator. But in spike the problem occurs even if you set XS MSTATUS bits and add the dummy_rocc extension.
@allencho1222 did you find a solution?
Related issue: https://github.com/riscv/riscv-isa-sim/issues/214 https://github.com/seldridge/rocket-rocc-examples/issues/7
Best regards, Noureddine.
Upstream binutils now has .insn support which you can use for assembling non-standard instructions.
If spike is failing, that isn't a riscv-gnu-toolchain problem. Try reporting it against spike.
I am still having the same issue. I am not sure how did you fixed the problem. I am under riscv-isa-sim/dummy_rocc and when I run: riscv64-unknown-elf-gcc dummy_rocc_test.c
it gives me:
dummy_rocc_test.c: Assembler messages:
dummy_rocc_test.c:14: Error: unrecognized opcode custom0 x0,a5,2,0' dummy_rocc_test.c:17: Error: unrecognized opcode
custom0 a5,x0,2,1'
dummy_rocc_test.c:20: Error: unrecognized opcode custom0 x0,a5,2,3' dummy_rocc_test.c:22: Error: unrecognized opcode
custom0 a5,x0,2,1'
dummy_rocc_test.c:25: Error: unrecognized opcode custom0 x0,a5,2,2' dummy_rocc_test.c:26: Error: unrecognized opcode
custom0 x0,a5,2,3'
dummy_rocc_test.c:27: Error: unrecognized opcode `custom0 a5,x0,2,1'
I would appreciate if somebody can help! Thanks!
The rocc support was never upstreamed, and I've never seen it. Rocc is not a part of the ISA spec, and binutils only supports the instructions in the standard ISA. So either you find a toolchain with rocc support, somewhere, I don't know where. Or you change the rocc code to use the supported .insn feature. Or you stop trying to use the rocc extension. https://sourceware.org/binutils/docs-2.32/as/RISC_002dV_002dFormats.html#RISC_002dV_002dFormats
The only RoCC support that ever existed in the toolchain was basically a restricted form of the .insn feature, so using .insn would be my recommendation as well.
On Thu, Aug 15, 2019 at 1:47 PM Jim Wilson notifications@github.com wrote:
The rocc support was never upstreamed, and I've never seen it. Rocc is not a part of the ISA spec, and binutils only supports the instructions in the standard ISA. So either you find a toolchain with rocc support, somewhere, I don't know where. Or you change the rocc code to use the supported .insn feature. Or you stop trying to use the rocc extension.
https://sourceware.org/binutils/docs-2.32/as/RISC_002dV_002dFormats.html#RISC_002dV_002dFormats
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/riscv/riscv-gnu-toolchain/issues/315?email_source=notifications&email_token=AAH3XQXKQ4GCXHXYLTZIEGDQEW6GFA5CNFSM4EKFFPF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4M6QXY#issuecomment-521791583, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH3XQSUNHJCN7KWDTIKP7LQEW6GFANCNFSM4EKFFPFQ .
I am using master version of riscv-gnu-toolchain, and, finally, have followed that riscv tools no longer support its Xcustom instruction, which is used for interacting with accelerators (such as _dummyrocc).
If so, what should I use to enable _dummyrocc to be activated?
p.s: I could compile _dummy_rocctest.c with the help of #190. But they shows following outputs when running over spike:
spike --extension=dummy_rocc pk dummy_rocc_test.rv
what can I do to use accelerators?