Closed jeremybennett closed 1 year ago
Hi, I tried to use this compiler to compile a piece of c code and generate the asm codes using the hardware loop of cv32e40p. However, no matter how I tried, the compiled asm codes does not utilize the cv.count/start/end instructions, but original bne instruction. In cv32e40p manual, it says the compiler will generate instructions trying to use the hardware loop without needing of asm codes. Is this the right compiler that I'm looking for? Thank you in advance.
The patch https://github.com/openhwgroup/corev-binutils-gdb/commit/ee3f41b4fbcf57bc8985d84cd57ce0171a540faa fixes this issue by moving overflow checking to the linker. A couple of tests have been added too.
Hi, I tried to use this compiler to compile a piece of c code and generate the asm codes using the hardware loop of cv32e40p. However, no matter how I tried, the compiled asm codes does not utilize the cv.count/start/end instructions, but original bne instruction. In cv32e40p manual, it says the compiler will generate instructions trying to use the hardware loop without needing of asm codes. Is this the right compiler that I'm looking for? Thank you in advance.
Currently, CORE-V's GCC cannot yet generate hardware loops. The documentation describes what the compiler will be able to do. We plan to start work on this in a couple of months.
@jeremybennett This issue can now be closed.
Consider the following:
Compile and link
Note no errors, but objdump shows the second of these, the branch has overflowed: