question about opensip assembly #264
Replies: 2 comments
-
oacc-riscv uses the LLVM RISC-V backend so it should generate same assembly instructions as using the same version of the upstream LLVM toolchain. As to programming directly with assembly, it should work out of the box if you just pass oacc-riscv a file with .s or .S extension, which transforms the assembly file to object code and links it with the start routines. |
Beta Was this translation helpful? Give feedback.
-
If I understood then what is generated by the oacc-riscv command is nothing more than LLVM's "byte code" and to get the assembly I would have to modify the script found in the oacc-riscv file to generate the *.S object, it would be that ? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to convert the binary generated by the oacc-riscv command to assembly instructions but the assembly instructions seem to be different than those standardized by Sifive Risc-V.
for example:
int main() {
int a = 1;
int b = 2;
int c = a + b;
}
How can I write this algorithm in C in assembly and have it executed by the processor or disassemble the binary generated by the oacc-riscv command?
Beta Was this translation helpful? Give feedback.
All reactions