[all-commits] [llvm/llvm-project] 6564a7: [OpenMP][libomp] Fix register constraint for tpaus...

Jonathan Peyton via All-commits all-commits at lists.llvm.org
Mon Mar 7 12:56:22 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6564a70415df1eb1504bb271d0d958b456e22c64
      https://github.com/llvm/llvm-project/commit/6564a70415df1eb1504bb271d0d958b456e22c64
  Author: Jonathan Peyton <jonathan.l.peyton at intel.com>
  Date:   2022-03-07 (Mon, 07 Mar 2022)

  Changed paths:
    M openmp/runtime/src/kmp.h

  Log Message:
  -----------
  [OpenMP][libomp] Fix register constraint for tpause and umwait

Register constraint switched to "=q" which means very specifically (from
https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html#Machine-Constraints)

> Any register accessible as rl. In 32-bit mode, a, b, c, and d; in 64-bit
mode, any integer register.

Older gcc versions (8.x and below) were trying to use esi or edi for the
8 bit flag variable, but it wound up displaying this error in the end:

kmp_lock.cpp: In function ‘void __kmp_spin_backoff(kmp_backoff_t*)’:
kmp_lock.cpp:2684:1: error: unsupported size for integer register
Hence the correct restriction is "=q" instead of "=r".

Fixes: https://github.com/llvm/llvm-project/issues/53309
Differential Revision: https://reviews.llvm.org/D120519




More information about the All-commits mailing list