Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Conversation

dsimcha
Copy link
Contributor

@dsimcha dsimcha commented Aug 27, 2011

The issue here was that floating point values were getting returned in integer registers, not the floating point stack. I found a really obvious-in-hindsight way to fix this one: Just pun the reference to a float/double to a pointer to int/long respectively, call atomicLoad on the int/long ptr, then pun it back and return it. Everything gets returned in the proper registers and no extra platform-specific code needs to be written.

complexmath added a commit that referenced this pull request Aug 29, 2011
Bug 4782:  core.atomic.atomicLoad broken for floating point
@complexmath complexmath merged commit 045482b into dlang:master Aug 29, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants