Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make fence.tso a separate inst, fix fence bug #460

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

dhower-qc
Copy link
Collaborator

fixes #428

arch/inst/I/fence.tso.yaml Outdated Show resolved Hide resolved
arch/inst/I/fence.tso.yaml Outdated Show resolved Hide resolved
kind: instruction
name: fence
long_name: Memory ordering fence
description: |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to use > here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so; the line spacing has syntactic meaning for asciidoc, so we don't want to fold anything.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My understanding of the folding rules is that the text below this would be folded to (hopefully this renders well enough here):

Orders memory operations.

fence.tso orders all load operations in its predecessor set before all memory operations in its successor set, and all store operations in its predecessor set before all store operations in its successor set. This leaves non-AMO store operations in the 'fence.tso's predecessor set unordered with non-AMO loads in its successor set.

The rs1 and rd fields are unused and ignored.

In modes other than M-mode, fence.tso is further affected by menvcfg.FIOM, senvcfg.FIOM<% if ext?(:H) %>, and/or henvcfg.FIOM<% end %>.

Is that not preferred?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it actually renders as:

Orders memory operations.
fence.tso orders all load operations in its predecessor set before all memory operations in its successor set, and all store operations in its predecessor set before all store operations in its successor set. This leaves non-AMO store operations in the 'fence.tso's predecessor set unordered with non-AMO loads in its successor set.
The rs1 and rd fields are unused and ignored.
In modes other than M-mode, fence.tso is further affected by menvcfg.FIOM, senvcfg.FIOM<% if ext?(:H) %>, and/or henvcfg.FIOM<% end %>.

image

Which in asciidoc will make all the text show up in a single paragraph.

arch/inst/I/fence.tso.yaml Outdated Show resolved Hide resolved
arch/inst/I/fence.tso.yaml Outdated Show resolved Hide resolved
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.

Fence.tso is not pseudo for Fence
3 participants