i#2626 AArch64: Mark mrs rndr[rs] instructions as writing to NZCV #6838
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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