Skip to content

OPAL_PATCHER_BEGIN/OPAL_PATCHER_END is broken in some cases #13014

Closed
@pinskia

Description

@pinskia

Forwarded from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95692 :

# define OPAL_PATCHER_BEGIN \

The inline-asm needs to clobber memory to avoid moving the END before a different restore the r2.

That is BEGIN should be:

asm volatile ("std 2, %0" : "=m" (toc_save) :: "memory");
asm volatile ("nop; nop; nop; nop; nop" ::: "memory");;

While END should be:

asm volatile ("ld  2, %0" : : "m" (toc_save) : "memory");;

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions