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

Custom implementations of readVolatileShort(Object, offset), writeVolatileShort(Object, offset) and readVolatileInt(Object, offset) for ARMMemory. #417

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

maxim-ponomarev
Copy link
Contributor

@maxim-ponomarev maxim-ponomarev commented Jun 20, 2022

Fixes #416.
Fixes UnsafeMemoryIntTest and UnsafeMemoryShortTest on Apple Silicon (M1).

…teVolatileShort(Object, offset) and readVolatileInt(Object, offset) for ARMMemory. Fix #416
@Override
public int readVolatileInt(Object object, long offset) {
assert SKIP_ASSERTIONS || assertIfEnabled(Longs.nonNegative(), offset);
if (safeAlignedInt(offset))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the object is guaranteed to be int-aligned.

@minborg
Copy link
Contributor

minborg commented Jun 21, 2022

Are the "long" variants already covered?

@maxim-ponomarev
Copy link
Contributor Author

Are the "long" variants already covered?

Yes, but looks like "float" and "double" are missing and not covered in tests. See #419.

Copy link
Contributor

@JerryShea JerryShea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@maxim-ponomarev maxim-ponomarev merged commit 9a2d852 into develop Jun 22, 2022
@peter-lawrey peter-lawrey deleted the fix-arm-memory-416 branch July 20, 2022 09:49
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