From 18173559a23e28055640b152e623d9f0d40ecca8 Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Fri, 21 Aug 2015 14:39:01 -0500 Subject: powerpc: Fix tabort usage in syscalls Fix usage of tabort in generated syscalls. r0 has special meaning when used with this instruction, thus it will not generate persistent errors, nor return an error code. This mitigates poor CPU usage when performing elided critical sections. Additionally, transactions should be aborted when entering a user invoked syscall. Otherwise the results of the transaction may be undefined. 2015-08-25 Paul E. Murphy * sysdeps/powerpc/powerpc32/sysdep.h (ABORT_TRANSACTION): Use register other than r0 for tabort, it has special meaning. * sysdeps/powerpc/powerpc64/sysdep.h (ABORT_TRANSACTION): Likewise * sysdeps/unix.sysv/linux/powerpc/syscall.S (syscall): Abort transaction before starting syscall. --- sysdeps/unix/sysv/linux/powerpc/syscall.S | 1 + 1 file changed, 1 insertion(+) (limited to 'sysdeps/unix/sysv/linux/powerpc') diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S index 157e3e3296..44773038bc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/syscall.S +++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S @@ -18,6 +18,7 @@ #include ENTRY (syscall) + ABORT_TRANSACTION mr r0,r3 mr r3,r4 mr r4,r5 -- cgit 1.4.1