I need to check stuck bit error (To be done by Checker board algorithm) of General purpose registers in MPC5746R,
- Need to store the present value before checking the fault
- Need to test R0-R31
Do you have any sample code in assembly .?
I am not sure if I understood you correctly.
You need to write to R0-R31 ?
And then compare it with some value?
Checker board algorithm comparing some values with R0 to R31 registers,I need to implement that in assembly,before that comparison i have to store the current data into some other(stack or SPR) location.
1. Storing to SPR is done by instruction mtspr. I have used GHS compiler.
e_li r31,0x1000 - load value 0x1000 to r31
mtspr sprg0,r0, r31 - move r31 value to SPRG0
2. working with R0
For details about assembly instructions refer to:
Thanks for your reply,
I need to check 32 registers from R0 to R31 while run time,Is there is any way without using SPR..?.Because storing data into SPR may affect some other process.
You can use cmpl instruction to compare GPRx.
refer to document in link I have posted before.
Retrieving data ...