Thanks, speculation barrier is not needed for loongarch.
I have removed the warning.
在 2022/2/25 上午3:32, Xi Ruoyao 写道:
On Sat, 2022-02-12 at 11:11 +0800, xucheng...@loongson.cn wrote:
From: chenglulu <chengl...@loongson.cn>
2022-02-12 Chenghua Xu <xucheng...@loongson.cn>
Lulu Cheng <chengl...@loongson.cn>
gcc/testsuite/
spec-barrier tests fail with:
./testsuite/c-c++-common/spec-barrier-1.c:21:3: warning: this target
does not define a speculation barrier; your program will still execute
correctly, but incorrect speculation may not be restricted
I'd seen some news saying your uarch has in-silicon defense for
speculation related vulnerabilities. If this is true you can just make
__builtin_speculation_safe_value a nop. Quote from gcc internal doc:
If this pattern is not defined then the default expansion of
'__builtin_speculation_safe_value' will emit a warning. You can
suppress this warning by defining this pattern with a final
condition of '0' (zero), which tells the compiler that a
speculation barrier is not needed for this target.