Comment 16 for bug 1847806

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

All fails I had were on sysdeps/powerpc/fpu/get-rounding-mode.h:30 which is:

 27 static inline int
 28 get_rounding_mode (void)
 29 {
 30 return _FPU_GET_RC ();
 31 }

And that in turn is defined as:
 83 # ifdef _ARCH_PWR9
 84 # define _FPU_GET_RC() _FPU_GET_RC_ISA300()
 85 # elif defined __BUILTIN_CPU_SUPPORTS__
 86 # define _FPU_GET_RC()»»···»···»···»···»···»···\
 87 ({fpu_control_t __rc;»»···»···»···»···»···»···\
 88 __rc = __glibc_likely (__builtin_cpu_supports ("arch_3_00"))»···\
 89 ? _FPU_GET_RC_ISA300 ()»··»···»···»···»···»···\
 90 : _FPU_GETCW (__rc) & _FPU_MASK_RC;»··»···»···»···\
 91 __rc;»··»···»···»···»···»···»···»···\
 92 })
 93 # else
 94 # define _FPU_GET_RC()»»···»···»···»···»···\
 95 ({fpu_control_t __rc = _FPU_GETCW (__rc) & _FPU_MASK_RC;»·\
 96 __rc;»··»···»···»···»···»···»···\
 97 })
 98 # endif

In assembly layout that is on

  beq 0x...
> mffsl 0
  mfvsrd r8,vs0

That seems like this code:
 75 # define _FPU_GET_RC_ISA300()»··»···»···»···»···»···\
 76 ({union { double __d; unsigned long long __ll; } __u;»»···»···\
 77 __asm__ __volatile__(»··»···»···»···»···»···\
 78 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" »\
 79 : "=f" (__u.__d));»···»···»···»···»···»···\
 80 (fpu_control_t) (__u.__ll & _FPU_MASK_RC);»·»···»···»···\
 81 })