• How to store FPSCR register in a variable

    From swarooponline2001@gmail.com@21:1/5 to All on Mon Aug 30 02:00:43 2021
    Hi,

    I am performing Floating Point Divide By Zero operation. I am able to create this exception occur. It prints the below info on the vxWorks console.

    divide_by_zero
    0x25ac5f0 (sigactionTest):
    sigactionTestdvdzero : MSR b932 , vxFpscrGet f8
    0x25ac5f0 (sigactionTest): task 0x25ac5f0 has had a failure and has been stopped.
    0x25ac5f0 (sigactionTest): fatal kernel task-level exception!

    Floating point divide by zero
    Exception current instruction address: 0x0032845c
    Machine Status Register: 0x0010b932
    Condition Register: 0x22000244
    Fp Control and Status Register: 0xc40000f8
    Task: 0x25ac5f0 "sigactionTest"
    0x25a8850 (tShell0):
    divide_by_zero bExceptionFlag = 1, status = value = 0
    0 = 0x0


    I want to store the below register's info in a variable -- how to do so using C code.

    Fp Control and Status Register: 0xc40000f8
    Machine Status Register: 0x0010b932
    Condition Register: 0x22000244

    Please provide suitable explanation if this can be achieved or not.
    Regards,
    Swaroop

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Suleman Khalid@21:1/5 to Suleman Khalid on Sat Dec 18 18:11:52 2021
    On Sunday, December 19, 2021 at 7:04:55 AM UTC+5, Suleman Khalid wrote:
    On Monday, August 30, 2021 at 2:00:45 PM UTC+5, swaroopo...@gmail.com wrote:
    Hi,

    I am performing Floating Point Divide By Zero operation. I am able to create this exception occur. It prints the below info on the vxWorks console.

    divide_by_zero
    0x25ac5f0 (sigactionTest):
    sigactionTestdvdzero : MSR b932 , vxFpscrGet f8
    0x25ac5f0 (sigactionTest): task 0x25ac5f0 has had a failure and has been stopped.
    0x25ac5f0 (sigactionTest): fatal kernel task-level exception!

    Floating point divide by zero
    Exception current instruction address: 0x0032845c
    Machine Status Register: 0x0010b932
    Condition Register: 0x22000244
    Fp Control and Status Register: 0xc40000f8
    Task: 0x25ac5f0 "sigactionTest"
    0x25a8850 (tShell0):
    divide_by_zero bExceptionFlag = 1, status = value = 0
    0 = 0x0


    I want to store the below register's info in a variable -- how to do so using C code.

    Fp Control and Status Register: 0xc40000f8
    Machine Status Register: 0x0010b932
    Condition Register: 0x22000244

    Please provide suitable explanation if this can be achieved or not. Regards,
    Swaroop
    Could you mention which processor architecture are you using?

    If this is ARM FPSCR register, thislink may help:

    https://thinkingeek.com/2013/05/12/arm-assembler-raspberry-pi-chapter-13/#:~:text=The%20special%20register%20fpscr%2C%20where%20len%20and%20stride,stored%20in%20bits%2016%20to%2018%20of%20fpscr.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Suleman Khalid@21:1/5 to swaroopo...@gmail.com on Sat Dec 18 18:04:53 2021
    On Monday, August 30, 2021 at 2:00:45 PM UTC+5, swaroopo...@gmail.com wrote:
    Hi,

    I am performing Floating Point Divide By Zero operation. I am able to create this exception occur. It prints the below info on the vxWorks console.

    divide_by_zero
    0x25ac5f0 (sigactionTest):
    sigactionTestdvdzero : MSR b932 , vxFpscrGet f8
    0x25ac5f0 (sigactionTest): task 0x25ac5f0 has had a failure and has been stopped.
    0x25ac5f0 (sigactionTest): fatal kernel task-level exception!

    Floating point divide by zero
    Exception current instruction address: 0x0032845c
    Machine Status Register: 0x0010b932
    Condition Register: 0x22000244
    Fp Control and Status Register: 0xc40000f8
    Task: 0x25ac5f0 "sigactionTest"
    0x25a8850 (tShell0):
    divide_by_zero bExceptionFlag = 1, status = value = 0
    0 = 0x0


    I want to store the below register's info in a variable -- how to do so using C code.

    Fp Control and Status Register: 0xc40000f8
    Machine Status Register: 0x0010b932
    Condition Register: 0x22000244

    Please provide suitable explanation if this can be achieved or not.
    Regards,
    Swaroop

    Could you mention which processor architecture are you using?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)