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: reg cache entry is initialized before access #1101

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

en-sc
Copy link
Collaborator

@en-sc en-sc commented Jul 4, 2024

  • Register file examination is separated.
  • Allow to access registers through cache as early as possible to re-use general register access interface and propely track state of the register.
  • Reduces the number of operations: S0 and S1 are saved/restored only when needed (targets without abstract CSR access).

Change-Id: I2e205ae4e88733a5c792f8a35cf30325c68d96b2

@en-sc en-sc requested a review from JanMatCodasip July 4, 2024 18:27
@en-sc en-sc self-assigned this Jul 4, 2024
@en-sc en-sc force-pushed the en-sc/ref-reg-examine branch 2 times, most recently from ac2cf7c to 51ac745 Compare July 4, 2024 18:40
Copy link
Collaborator

@JanMatCodasip JanMatCodasip left a comment

Choose a reason for hiding this comment

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

Just two remarks, otherwise it looks good.

src/target/riscv/riscv-013_reg.c Outdated Show resolved Hide resolved
src/target/riscv/riscv-013_reg.c Show resolved Hide resolved
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.

Thanks for the patch, I like the improvements.

I have found a few details concerning extra lines for clarity, please, take a look.

src/target/riscv/riscv-013_reg.c Outdated Show resolved Hide resolved
src/target/riscv/riscv-013_reg.c Outdated Show resolved Hide resolved
src/target/riscv/riscv-013_reg.c Outdated Show resolved Hide resolved
src/target/riscv/riscv-013_reg.c Outdated Show resolved Hide resolved
src/target/riscv/riscv-013_reg.c Outdated Show resolved Hide resolved
@en-sc en-sc force-pushed the en-sc/ref-reg-examine branch 2 times, most recently from 628683c to 357eafa Compare August 5, 2024 13:50
@en-sc en-sc force-pushed the en-sc/ref-reg-examine branch 4 times, most recently from 9994318 to f7e415f Compare August 9, 2024 12:15
JanMatCodasip
JanMatCodasip previously approved these changes Aug 14, 2024
@JanMatCodasip
Copy link
Collaborator

JanMatCodasip commented Aug 14, 2024

@MarekVCodasip Please, don't forget to close your review threads if you are fine with the resolution - thanks. ;-)

* Register file examination is separated.
* Allow to access registers through cache as early as possible to re-use
  general register access interface and propely track state of the
  register.
* Reduces the number of operations: S0 and S1 are saved/restored only
  when needed (targets without abstract CSR access).

Change-Id: I2e205ae4e88733a5c792f8a35cf30325c68d96b2
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
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.

LGTM

@en-sc en-sc merged commit e4d6885 into riscv-collab:riscv Aug 16, 2024
4 checks passed
@en-sc en-sc deleted the en-sc/ref-reg-examine branch August 16, 2024 14:05
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.

4 participants