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: separate register cache stuff into files #1084

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

en-sc
Copy link
Collaborator

@en-sc en-sc commented Jun 5, 2024

This commit creates file structure for register cache related functions.
Specifically:

  • riscv_reg.h -- general interface to registers. Safe to use after register cache initialization is successful.
  • riscv_reg_impl.h -- helper functions to use while implementing register cache initialization.
  • riscv_reg.c -- definitions of functions from riscv_reg.h and riscv_reg_impl.h.
  • riscv-011_reg.h -- register cache interface specific to 0.11 targets.
  • riscv-013_reg.h -- register cache interface specific to 0.13+ targets.
  • riscv-011/0.13.h -- version-specific methods used to access registers. Will be extended as needed once other functionality (not related to register access) is separated (e.g. DM/DTM specific stuff).

@en-sc en-sc self-assigned this Jun 5, 2024
@en-sc en-sc requested review from JanMatCodasip, MarekVCodasip and aap-sc and removed request for JanMatCodasip June 5, 2024 18:30
@en-sc
Copy link
Collaborator Author

en-sc commented Jun 5, 2024

Please, disregard the failure of Checkpatch. It is due to missing or SPDX-License-Identifier tags.

@en-sc
Copy link
Collaborator Author

en-sc commented Jun 5, 2024

Please, disregard the failure of Checkpatch. It is due to missing or SPDX-License-Identifier tags.

Can be fixed by #1085.

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.

I have done a superficial review and am sending suggestions that I have so far.

I will have to return to this PR in the next week.

src/target/riscv/riscv-011.h Show resolved Hide resolved
src/target/riscv/riscv-011_reg.c Show resolved Hide resolved
src/target/riscv/riscv-011_reg.c Outdated Show resolved Hide resolved
src/target/riscv/riscv-011_reg.h 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.h Show resolved Hide resolved
src/target/riscv/riscv_reg_impl.h Show resolved Hide resolved
src/target/riscv/riscv-013.h Outdated Show resolved Hide resolved
src/target/riscv/riscv_reg_impl.h Show resolved Hide resolved
This commit creates file structure for register cache related
functions.
Specifically:

* `riscv_reg.h` -- general interface to registers. Safe to use after
  register cache initialization is successful.
* `riscv_reg_impl.h` -- helper functions to use while implementing
  register cache initialization.
* `riscv_reg.c` -- definitions of functions from `riscv_reg.h` and
  `riscv_reg_impl.h`.
* `riscv-011_reg.h` -- register cache interface specific to 0.11
  targets.
* `riscv-013_reg.h` -- register cache interface specific to 0.13+
  targets.
* `riscv-011/0.13.h` -- version-specific methods used to access
  registers. Will be extended as needed once other functionality (not
  related to register access) is separated (e.g. DM/DTM specific stuff).

Change-Id: I7918f78d0d79b97188c5703efd0296660e529f2a
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
@en-sc en-sc merged commit e9eca80 into riscv-collab:riscv Jul 3, 2024
4 checks passed
@en-sc en-sc deleted the en-sc/ref-reg-files branch July 3, 2024 07:52
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