Skip to content
Snippets Groups Projects
Commit 83932b8b authored by wlott's avatar wlott
Browse files

Fixed the pending interrupt trap handler to correctly decode the immediate

field of the trapping add instruction, in order to correctly turn off
pseudo-atomic mode.
parent 0ae96f65
No related branches found
No related tags found
No related merge requests found
......@@ -214,7 +214,9 @@ static void sigfpe_handler(int signal, int code, struct sigcontext *scp)
/* add stripping off the pseudo-atomic-interrupted bit, and then */
/* tell the machine-independent code to process the pseudo- */
/* atomic. */
int immed = ((int)(badinst<<21))>>21;
int immed = (badinst>>1)&0xf;
if (badinst & 1)
immed |= -1<<4;
SC_REG(scp,reg_ALLOC) += (immed-1);
arch_skip_instruction(scp);
interrupt_handle_pending(scp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment