I used the same .ll file.
Here is the assembly file generated with the latest llc.
.text
.attribute 4, 16
.attribute 5, "rv64i2p1_f2p2_d2p2_zicsr2p0"
.file "LLVMDialectModule"
.globl main # -- Begin function main
.p2align 2
.type main,@function
Here is the llc I used before.
.text
.attribute 4, 16
.attribute 5, "rv64i2p0_f2p0_d2p0"
.file "LLVMDialectModule"
.globl main # -- Begin function main
.p2align 2
.type main,@function
A problem arises here.Here are the problems I encountered when linking.The version of riscv64-unknown-linux-gnu-gcc is 9.2,but I didnât want to change it.
riscv64-unknown-linux-gnu/bin/ld: -march=rv64i2p1_f2p2_zicsr2p0: unsupported ISA subset `z'
In addition to this, there is an interesting point.To solve this problem.This is how I use llc. (Iâm running the program on spike, I have to make -float-abi=hard and use the D extension),I want to remove the Z extension manually.
$: buddy-llc main.ll -filetype=asm -mtriple=riscv64 \
-mattr=+D,-zicsr -float-abi=hard \
-o main.s
But when I looked at main.s, I found that the D extension was not actually enabled and that -float-abi=hard didnât work either.I wonder if there is some bug here?Itâs worth saying that the old version of llc had no problems.
text
.attribute 4, 16
.attribute 5, "rv64i2p1" // you can look there.
.file "LLVMDialectModule"
.globl main # -- Begin function main
.p2align 2
.type main,@function
If anyone can help me, I would appreciate it.