Skip to content

Conversation

@ggouaillardet
Copy link
Contributor

Solaris Studio compilers issue (tons of) warnings because one arguments of several asm volatile section is not needed

@ggouaillardet
Copy link
Contributor Author

without this patch, Solaris Studio compiler issues tons of warnings

"../../../../src/ompi-master/opal/include/opal/sys/amd64/atomic.h", line 163: warning: parameter in inline asm statement unused: %3
"../../../../src/ompi-master/opal/include/opal/sys/amd64/atomic.h", line 209: warning: parameter in inline asm statement unused: %2
"../../../../src/ompi-master/opal/include/opal/sys/amd64/atomic.h", line 230: warning: parameter in inline asm statement unused: %2
"../../../../src/ompi-master/opal/include/opal/sys/amd64/atomic.h", line 251: warning: parameter in inline asm statement unused: %2
"../../../../src/ompi-master/opal/include/opal/sys/amd64/atomic.h", line 272: warning: parameter in inline asm statement unused: %2

@hjelmn
Copy link
Member

hjelmn commented May 10, 2016

I think you will need to additionally change "=m" to "+m" to indicate that the pointer is both read and written by the atomic. I think that must have been the intent of the "m" (*v) lines.

@hjelmn
Copy link
Member

hjelmn commented May 10, 2016

From the inline asm manual:

Output constraints must begin with either ‘=’ (a variable overwriting an existing value) or ‘+’ (when reading and writing). When using ‘=’, do not assume the location contains the existing value on entry to the asm, except when the operand is tied to an input; see Input Operands.

@ggouaillardet
Copy link
Contributor Author

got it, thanks !
I will update the PR tomorrow

Solaris Studio compilers issue (tons of) warnings because one arguments of several __asm__ __volatile__ section is not needed
@ggouaillardet
Copy link
Contributor Author

@hjelmn I updated the PR, can you please review it again ?

@ibm-ompi
Copy link

Test passed.

@hjelmn
Copy link
Member

hjelmn commented Jun 2, 2016

Looks good to me. Retesting then merging.

:bot:retest:

@hjelmn hjelmn merged commit 5aab4b2 into open-mpi:master Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants