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

Cherry-pick of a few bugfixes made since dec-2023 #92

Merged
merged 6 commits into from
Sep 25, 2024

Conversation

quic-mathbern
Copy link

This includes only the patches that are easier to backport without requiring huge changes.

SidManning and others added 6 commits September 25, 2024 10:51
The guest error is sufficient.  A debugger could read this and kill the
emulation.

Signed-off-by: Sid Manning <[email protected]>
`frameket = r0` before:
0x000070e0:  0x6220c011 {       C17/pmucnt1 = R0 }

And after:
0x000070e0:  0x6220c011 {       C17/framekey = R0 }

Signed-off-by: Matheus Tavares Bernardino <[email protected]>
The comment above the fCHECK_PCALIGN macro mentions the need to
implement this check at all the COF instructions, but it is also a bit
outdated since the macro is not in use anymore. Remove it and properly
implement the check at gen_write_new_pc_addr(). Also add a test.

Signed-off-by: Matheus Tavares Bernardino <[email protected]>
The implementation for these instructions is handling -0 as an invalid
float point value, whereas the Hexagon hardware considers it the same as
+0 (which is valid). Let's fix that and add a regression test.

Signed-off-by: Matheus Tavares Bernardino <[email protected]>
The added test shows a scenario in which multiple writes are performed
to the same register but qemu fails to detect that and throw the
appropriated exception. This happens because we are not cleaning
hex_slot_cancelled as frequently as we should, so an old state is used
and the packet that should raise an exception is considered as cancelled
by the code that would detect the multiple writes issue. Let's fix that
by cleaning hex_slot_canceled on all conditional instructions instead,
which should cover all cases where the variable is used to detect
multiple writes.

Signed-off-by: Matheus Tavares Bernardino <[email protected]>
QEMU should throw an HEX_CAUSE_STACK_LIMIT exception (0x27) if
allocframe would move sp beyond the framelimit.

Also modernize test file and add more test cases for different scenarios
(user/monitor mode, overflow/no-overflow).

This was tested with and without idef-parser.

Signed-off-by: Matheus Tavares Bernardino <[email protected]>
@androm3da androm3da merged commit 4feedc4 into hexagon_sysemu_20_dec_2023 Sep 25, 2024
1 check passed
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.

3 participants