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

target/riscv: merged read/write functions to one access function #1194

Open
wants to merge 1 commit into
base: riscv
Choose a base branch
from

Conversation

fk-sc
Copy link
Contributor

@fk-sc fk-sc commented Dec 25, 2024

Commit merges read/write functions to access function. It allows to decrease amount of code duplication

@fk-sc
Copy link
Contributor Author

fk-sc commented Dec 25, 2024

@JanMatCodasip, @MarekVCodasip could you please take a look?

Copy link
Collaborator

@en-sc en-sc left a comment

Choose a reason for hiding this comment

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

LGTM (reviewed internally).

One minor note in regard to merge order.

Comment on lines 4377 to 4379
if (mstatus != mstatus_old && register_write_direct(target,
GDB_REGNO_MSTATUS, mstatus_old) != ERROR_OK)
return MEM_ACCESS_SKIPPED_REG_WRITE_FAILED;
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a conflict with #1190
I believe it will be easier to merge #1190 first and then adjust this one.

@fk-sc fk-sc force-pushed the fk-sc/merge-read-write branch 2 times, most recently from 02d8718 to a1686db Compare December 27, 2024 09:01
src/target/riscv/riscv-013.c Outdated Show resolved Hide resolved
@fk-sc fk-sc force-pushed the fk-sc/merge-read-write branch from a1686db to 25e187e Compare December 27, 2024 20:50
src/target/riscv/riscv-013.c Outdated Show resolved Hide resolved
src/target/riscv/riscv-013.c Outdated Show resolved Hide resolved
src/target/riscv/riscv-013.c Outdated Show resolved Hide resolved
Commit merges read/write functions to access function.
It allows to decrease amount of code duplication.

Signed-off-by: Farid Khaydari <[email protected]>
@fk-sc fk-sc force-pushed the fk-sc/merge-read-write branch from 25e187e to fd6fd98 Compare December 28, 2024 14:59
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