Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
142 user(s) are online (122 user(s) are browsing Forums)

Members: 0
Guests: 142

more...

Support us!

Headlines

 
  Register To Post  

floating-point exception mode register
Amigans Defender
Amigans Defender


See User information
I need to get (and set) the floating-point exception mode.
I’ve seen that in exec/interrupts.h there are:

float64 fpr[32];  /* Floating point registers */
    
uint64  fpscr;    /* Floating point control and status register */


That should be get and set via ReadTaskContext/WriteTaskContext. Now my question is. Is the only way to get that register? Is it the correct way? Is there a #define to get only the bit I need?

Thanks

i'm really tired...
Go to top
Re: floating-point exception mode register
Just can't stay away
Just can't stay away


See User information
@afxgroup
You could use assembler, or asm inline(), code using the mffs/mtfsf instructions instead if you only need it for the current task, but using OS functions like (Read|Write)TaskContext() instead is better.

Go to top
Re: floating-point exception mode register
Amigans Defender
Amigans Defender


See User information
Thanks joerg

i'm really tired...
Go to top
Re: floating-point exception mode register
Just popping in
Just popping in


See User information
@afxgroup

To enable/disable jave/ieee mode for altivec I used following code, for fpu exception you could write something similiar.


#ifdef __ALTIVEC__
#include <altivec.h>
#endif

#ifdef __ALTIVEC__
/*java/ieee mode off*/
const vector unsigned int VOne = vec_splat_u32 (1);
vec_mtvscr (VOne); */
#endif /* __ALTIVEC__ */

Edit:
Your can give a look here, Apple is stil one of best sources in the web to get PowerPC infos

https://dev.os9.ca/techpubs/mac/PPCNumerics/PPCNumerics-154.html


Edited by flash on 2023/7/31 5:09:55
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project