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

i#2626 AArch64: Mark mrs rndr[rs] instructions as writing to NZCV #6838

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

jackgallagher-arm
Copy link
Collaborator

The instructions

MRS , RNDR
MRS , RNDRRS

read a random number into the register Xt and set the value of NZCV to indicate whether the instruction was able to return a genuine random number.

Previously the codec did not set the correct eflags value to indicate that this instruction writes to NZCV.

Also previously there wasn't an IR test for the MRS instructions so I have added one and included a check for the eflags value in the test.

All the existing v8.0 IR tests in ir_aarch64.c which predates the TEST_LOOP* macros that we now use for instruction tests, and ir_aarch64.c has its slightly different own version of the test_instr_encoding() function so I couldn't include ir_aarch64.h in ir_aarch64.c without updating the >1000 tests already there which use it. Instead I created a new file ir_aarch64_v80.c so that new v8.0 instruction tests can be created using the TEST_LOOP* macros without interfering with existing tests.

Issue: #2626

The instructions

MRS <Xt>, RNDR
MRS <Xt>, RNDRRS

read a random number into the register Xt and set the value of NZCV to
indicate whether the instruction was able to return a genuine random
number.

Previously the codec did not set the correct eflags value to indicate
that this instruction writes to NZCV.

Also previously there wasn't an IR test for the MRS instructions so I
have added one and included a check for the eflags value in the test.

All the existing v8.0 IR tests in ir_aarch64.c which predates the
TEST_LOOP* macros that we now use for instruction tests, and
ir_aarch64.c has its slightly different own version of the
test_instr_encoding() function so I couldn't include ir_aarch64.h in
ir_aarch64.c without updating the >1000 tests already there which use
it. Instead I created a new file ir_aarch64_v80.c so that new v8.0
instruction tests can be created using the TEST_LOOP* macros without
interfering with existing tests.

Issue: #2626
@jackgallagher-arm jackgallagher-arm merged commit d7955d5 into master Jun 6, 2024
17 checks passed
@jackgallagher-arm jackgallagher-arm deleted the i2626-aarch64-mrs-rndr branch June 6, 2024 12:58
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