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

[NFC] target/riscv: refactor init_registers() #1022

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

en-sc
Copy link
Collaborator

@en-sc en-sc commented Feb 29, 2024

The logic in init_registers() was quite convoluted. Initialization of each struct reg field is separated into function gdb_regno_<field_name>().
IMHO, this makes it much easier to reason about the code.

Change-Id: Id7faa1464ce026cc5025585d0a6a95a01fb39cee

@en-sc en-sc self-assigned this Feb 29, 2024
@en-sc en-sc force-pushed the en-sc/upstream-refactor-reg-acc branch 4 times, most recently from 0e20005 to e936d33 Compare March 7, 2024 09:49
@en-sc
Copy link
Collaborator Author

en-sc commented Mar 7, 2024

Changed the PR to incorporate 33573cd

MarekVCodasip
MarekVCodasip previously approved these changes Mar 19, 2024
Copy link
Collaborator

@MarekVCodasip MarekVCodasip left a comment

Choose a reason for hiding this comment

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

Looks good, thank you, this improves the readability a lot.

Quickly discussed with @JanMatCodasip too, who is in favor as well.

The logic in `init_registers()` was quite convoluted.
Initialization of each `struct reg` field is separated into function
`gdb_regno_<field_name>()`.
IMHO, this makes it much easier to reason about the code.

Change-Id: Id7faa1464ce026cc5025585d0a6a95a01fb39cee
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
@en-sc
Copy link
Collaborator Author

en-sc commented Mar 21, 2024

@MarekVCodasip, there was a merge conflict with 33573cd, please, take a look. The resolution was to use the version from this commit, as planned (see a previous comment on the matter).

Copy link
Collaborator

@MarekVCodasip MarekVCodasip left a comment

Choose a reason for hiding this comment

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

Took a look, LGTM

@en-sc en-sc merged commit 722cef1 into riscv-collab:riscv Mar 27, 2024
4 checks passed
@en-sc en-sc deleted the en-sc/upstream-refactor-reg-acc branch August 14, 2024 18:38
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