Hi Maciej, > Can you add a diagnostic consistency check to the context restoration > code, i.e. all the macros called from RESTORE_ALL (in <asm/stackframe.h>), > such as a `break 12' (BRK_BUG) instruction if a register value is not > correctly sign-extended? Hmm... I think some details need to be sorted out for this. The LW instruction used to restore registers sign-extends to register length by definition (p. A-70 in the TX79 manual), so I assume that isn't what we are going to check unless we suspect a grave hardware error with LW? (Do we need to check the register values immediately prior to LW?) Another possibility would be to check that saved registers in SAVE_ALL will be restored properly. That is, immediately after SW check that LW (to a temporary register such as k1) will restore to the same value by 64-bit comparison and trap if unequal (TNE). I thought that made sense. Something like for example sw $17, PT_R17(sp) lw k1, PT_R17(sp) tne k1, $17, 12 as a replacement for LONG_S $17, PT_R17(sp) in SAVE_STATIC? A question is whether registers are clobbered within the kernel itself (via interrupts or some such) or for user programs. Fredrik