Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions opal/mca/patcher/patcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
* Reference: "64-bit PowerPC ELF Application Binary Interface Supplement 1.9" */
# define OPAL_PATCHER_BEGIN \
unsigned long toc_save; \
asm volatile("std 2, %0" : "=m"(toc_save)); \
asm volatile("nop; nop; nop; nop; nop");
# define OPAL_PATCHER_END asm volatile("ld 2, %0" : : "m"(toc_save));
asm volatile("std 2, %0" : "=m"(toc_save) :: "memory"); \
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a reference to the GCC ticket to remember why we globber the memory here? Just in case someone looks at this in 3 years from now and tries to save some cycles...

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

dang, I wanted to add this link to the commit. Sorry.

asm volatile("nop; nop; nop; nop; nop"::: "memory");
# define OPAL_PATCHER_END asm volatile("ld 2, %0" : : "m"(toc_save) : "memory");

#else /* !__PPC64__ */

Expand Down
Loading