Skip to content

Add LDAR/STLR and LDAPR instructions#36

Open
febyeji wants to merge 1 commit into
mainfrom
feat/acq-rel
Open

Add LDAR/STLR and LDAPR instructions#36
febyeji wants to merge 1 commit into
mainfrom
feat/acq-rel

Conversation

@febyeji
Copy link
Copy Markdown
Collaborator

@febyeji febyeji commented May 19, 2026

  • Refresh Coq snapshots for the updated acquire/release instruction support.

@febyeji febyeji changed the title feat(instrs): support acquire release loads stores feat(instrs): support acquire release operations May 19, 2026
@febyeji febyeji changed the title feat(instrs): support acquire release operations feat(instrs): support acq/rel operations May 19, 2026
@febyeji febyeji requested a review from tperami May 19, 2026 06:08
@febyeji
Copy link
Copy Markdown
Collaborator Author

febyeji commented May 19, 2026

What do you think about inlining decode functions like decodeLoadStoreRegister and decodeLoadStoreImmediate?

- Add LDAR/STLR and LDAPR decode and execution.
- Carry acquire/release/RCpc flags directly through the existing Load and Store AST variants.
- Refresh Coq snapshots for the updated acquire/release instruction support.
- Use the AccessDescriptor constructors to map those flags into acqsc/acqpc/relsc.
@febyeji febyeji changed the title feat(instrs): support acq/rel operations Add LDAR/STLR and LDAPR instructions May 27, 2026
@tperami
Copy link
Copy Markdown
Collaborator

tperami commented May 27, 2026

Just to point it out: At this moment, I don't think there is a point to refreshing the snapshots, none of our processes use them

Copy link
Copy Markdown
Collaborator

@tperami tperami left a comment

Choose a reason for hiding this comment

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

Only comment about access descriptor creation and whitespace. The actual instructions are great!

Comment thread interface.sail
}

function create_writeAccessDescriptor() -> AccessDescriptor = {
function create_gprAccessDescriptor(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think this function is useful and any functions with a long list of boolean parameter is generally a bad idea. Calling the function with a long list of true,false,false,true is not helpful to the reader. As I guideline, I think more than 3 boolean in a row is a terrible idea.

Comment thread interface.sail
function create_writeAccessDescriptor(
release : bool,
exclusive : bool,
atomicop : bool
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think you need that one? RMW are going to call another function to make an accessor that is both read and write.

Comment thread interface.sail
acquire : bool,
rcpc : bool,
exclusive : bool,
atomicop : bool
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same for this one

Comment thread instrs-user.sail
wMem(2^size, addr, X(t)[(8*2^size-1)..0], accdesc)
}


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The goal was to maintain 2-line spacing between different instruction class. Any reason for this change?

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.

2 participants