static inline uint __builtin_riscv_lane_id() { uint laneId; __asm("vid.v %0" : "=v"(laneId) : :); return laneId; } 上面的内联汇编会报错 <img width="1524" height="1218" alt="Image" src="https://github.com/user-attachments/assets/74524c6f-0284-4b77-9e84-f1e4130929c9" /> <img width="1158" height="480" alt="Image" src="https://github.com/user-attachments/assets/353fc188-8f6a-4890-af59-e2bb19c38f1e" /> 或者这个可以内联吗,去掉函数调用开销 加上 -flto 启用链接时优化会报错
static inline uint __builtin_riscv_lane_id() {
uint laneId;
__asm("vid.v %0" : "=v"(laneId) : :);
return laneId;
}
上面的内联汇编会报错
或者这个可以内联吗,去掉函数调用开销
加上 -flto 启用链接时优化会报错