Skip to content

Conversation

@Icenowy
Copy link
Member

@Icenowy Icenowy commented Nov 27, 2025

GCC 15 introduces a new compiler flag, -m{,no-}fence-tso, to control the usage of fence.tso instruction (which is not supported on some old T-Head cores, such as the ones used on TH1520/SG2042). When it's disabled, more strong fence rw,rw is emitted and correctness is then not affected.

Disable emitting this instruction now, because all buildbots of riscv64 are currently SG2042, and no CPU cores are known to benefit from fence.tso yet.

==================

cc @RevySR

@Icenowy Icenowy changed the base branch from master to core-13 November 27, 2025 10:16
GCC 15 introduces a new compiler flag, `-m{,no-}fence-tso`, to control
the usage of `fence.tso` instruction (which is not supported on some old
T-Head cores, such as the ones used on TH1520/SG2042). When it's
disabled, more strong `fence rw,rw` is emitted and correctness is
then not affected.

Disable emitting this instruction now, because all buildbots of riscv64
are currently SG2042, and no CPU cores are known to benefit from
`fence.tso` yet.

Signed-off-by: Icenowy Zheng <[email protected]>
Copy link
Member

@MingcongBai MingcongBai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@MingcongBai MingcongBai merged commit 41276f7 into core-13 Nov 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants