Skip to content
Snippets Groups Projects
Commit 596cdc57 authored by wlott's avatar wlott
Browse files

Support for new pseudo-atomic.

parent 719d6ca7
No related branches found
No related tags found
No related merge requests found
......@@ -133,6 +133,23 @@ static void sigemt_handler(signal, code, context)
/* Extract the parts of the inst. */
subtract = badinst & (1<<19);
rs1 = (badinst>>14) & 0x1f;
/* If the first arg is $ALLOC then it is really a signal-pending note */
/* for the pseudo-atomic noise. */
if (rs1 == ALLOC) {
/* Perform the op anyway. */
op2 = badinst & 0x1fff;
if (op2 & (1<<12))
op2 |= -1<<13;
if (subtract)
result = op1 - op2;
else
result = op1 + op2;
context->sc_regs[ALLOC] = result;
interrupt_handle_pending(signal, code, context);
return;
}
op1 = context->sc_regs[rs1];
if ((op1 & 3) != 0) {
/* The first arg wan't a fixnum. */
......
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