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

Assembler warnings #60

Open
chacon01 opened this issue Dec 12, 2019 · 2 comments
Open

Assembler warnings #60

chacon01 opened this issue Dec 12, 2019 · 2 comments

Comments

@chacon01
Copy link
Contributor

I'm getting some warnings from GCC9 when compiling lh_cas_event_mutex for AArch64

/tmp/cc76Umqe.s: Assembler messages:
/tmp/cc76Umqe.s:2064: Warning: unpredictable: identical transfer and status registers --`stxr w0,x1,[x0]'
/tmp/cc76Umqe.s:2589: Warning: unpredictable: identical transfer and status registers --`stxr w0,x1,[x0]'
/tmp/cc76Umqe.s:3971: Warning: unpredictable: identical transfer and status registers --`stxr w3,x3,[x0]'

These sorts of warnings usually come from one or more missing early-clobber specifiers somewhere in the inline assembly.

@lucasclucasdo
Copy link
Contributor

I think this was actually the result of pulling in a bug in the originating code which--as I recall--was devised as an LL/SC-only stopgap optimization to MySQL's event mutex. I'm not sure cas_event_mutex ever was (or should be) upstreamed so maybe the right thing to do here is just remove the test since it depends on its own (incorrectly) hand-coded atomics and doesn't relate to anything meaningful in real code.

@chacon01
Copy link
Contributor Author

I'll leave it up to the maintainers whether they want to keep the test. I have a fix for the assembler warning (which I'll post shortly); if the test gets removed instead, that's fine too.

chacon01 added a commit to chacon01/synchronization-benchmarks that referenced this issue Dec 12, 2019
The AArch64 inline assembly in cas_event_mutex.h is missing an
early-clobber specifier for the status register, resulting in warnings
from GCC

  Warning: unpredictable: identical transfer and status registers
  --`stxr w0,x1,[x0]'

Fixes ARM-software#60

Signed-off-by: Chase Conklin <[email protected]>
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 a pull request may close this issue.

2 participants