diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/import/chips/p9/procedures/ppe/pk/ppe42/math.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/import/chips/p9/procedures/ppe/pk/ppe42/math.c b/src/import/chips/p9/procedures/ppe/pk/ppe42/math.c index ba3b9ae3..7324da7a 100644 --- a/src/import/chips/p9/procedures/ppe/pk/ppe42/math.c +++ b/src/import/chips/p9/procedures/ppe/pk/ppe42/math.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -23,6 +23,8 @@ /* */ /* IBM_PROLOG_END_TAG */ #include "ppe42math.h" +#include "ppe42_msr.h" +#include <stdint.h> #ifdef __cplusplus extern "C" @@ -71,6 +73,8 @@ unsigned long udivmodsi4(unsigned long long _a, unsigned long _mod) { + uint32_t ctx = mfmsr(); + wrteei(0); out64(OCB_DERP, _a); do @@ -79,6 +83,8 @@ unsigned long udivmodsi4(unsigned long long _a, } while((~_a) == 0); + mtmsr(ctx); + if(_mod) { return (unsigned long)_a; |