[PowerPC] Fix feholdexcept() on powerpc referencing the wrong struct member
In r355656, endianness handling of the floating point environment was fixed in the PowerPC code to work as intended. However, one bit got missed, causing feholdexcept() to mis-save the fenv. Submitted by: Renato Riolino <renato.riolino@eldorado.org.br> Differential Revision: https://reviews.freebsd.org/D23382
This commit is contained in:
@@ -217,7 +217,7 @@ feholdexcept(fenv_t *__envp)
|
||||
union __fpscr __r;
|
||||
|
||||
__mffs(&__r);
|
||||
*__envp = __r.__d;
|
||||
*__envp = __r.__bits.__reg;
|
||||
__r.__bits.__reg &= ~(FE_ALL_EXCEPT | _ENABLE_MASK);
|
||||
__mtfsf(__r);
|
||||
return (0);
|
||||
|
||||
Reference in New Issue
Block a user