Skip to content

Add exclusive loads and stores#37

Open
febyeji wants to merge 1 commit into
feat/acq-relfrom
feat/exclusive-load-store
Open

Add exclusive loads and stores#37
febyeji wants to merge 1 commit into
feat/acq-relfrom
feat/exclusive-load-store

Conversation

@febyeji
Copy link
Copy Markdown
Collaborator

@febyeji febyeji commented May 19, 2026

Store-exclusive is modeled as a nondeterministic branch in the Sail model. I expect ArchSem to discard the execution branch that is not valid.

@febyeji febyeji requested a review from tperami May 19, 2026 06:15
@febyeji febyeji force-pushed the feat/exclusive-load-store branch from 6e92a80 to d4af4e6 Compare May 19, 2026 13:03
- Add LDXR/LDXRB/LDXRH and LDAXR/LDAXRB/LDAXRH decode and execution.
- Add STXR/STXRB/STXRH and STLXR/STLXRB/STLXRH decode and execution.
- Refresh Coq snapshots for the exclusive load/store AST and execution paths.
@febyeji febyeji force-pushed the feat/exclusive-load-store branch from d4af4e6 to 8c3c878 Compare May 27, 2026 11:51
@febyeji febyeji changed the title feat(instrs): support exclusive loads and stores Add exclusive loads and stores May 27, 2026
Comment thread instrs-user.sail
union clause ast = Store : (
/* size:*/ range(0,3), reg_index, reg_index, operand,
/* release */ bool
/* release */ bool, /* Rs */ option(reg_index)
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.

Suggested change
/* release */ bool, /* Rs */ option(reg_index)
/* release */ bool, /* if exclusive, the target Rs */ option(reg_index)

Comment thread instrs-user.sail
wMem_Addr(addr);
_PC = _PC + 4;
wMem(2^size, addr, X(t)[(8*2^size-1)..0], accdesc);
X(s) = sail_zero_extend(0b0, 64);
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'm pretty sure we want the X(s) write to happen before the write to memory, we might want it to be even earlier, but we'll wait test results for that

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