Skip to content

Conversation

@Sonicadvance1
Copy link
Member

@Sonicadvance1 Sonicadvance1 commented Nov 24, 2024

These tests ensure that FEX's x87 80-bit loadstores don't read/write past the end of the page.

Noticed we were missing testing this edge case a few days ago.

@Sonicadvance1
Copy link
Member Author

Nice, this immediately uncovered a bug in our implementation on the load side. Which is typically a non-problem since long double alignment is 16-byte, but the instructions for loads themselves don't care about alignment.

Ensures reads don't go past the end of the page boundary.
SVE masked loads can make this more effective but `VLoadVectorMasked`
isn't setup to be efficient for this case yet.
These tests ensure that FEX's x87 80-bit loadstores don't read/write
past the end of the page.
@pmatos
Copy link
Collaborator

pmatos commented Nov 25, 2024

LGTM. That's an interesting patch - so afaiu the problem was loading 128bit at page boundary. Well, splitting the 128bit into 64+16 bit loads creates a stronger case for
#4166 . Thanks.

@Sonicadvance1 Sonicadvance1 changed the title unittests/ASM: Adds x87 loadstore tests for edge of pages unittests/ASM: Fixes x87 80-bit loads on the edge of page boundaries. Nov 29, 2024
@Sonicadvance1
Copy link
Member Author

@lioncash lioncash merged commit 2e7fc60 into FEX-Emu:main Nov 30, 2024
12 checks passed
@Sonicadvance1 Sonicadvance1 deleted the x87_loadstore_tests branch November 30, 2024 15:44
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