|
|
1.1 ! root 1: #include "../machine/alignment.h" ! 2: adwc(infop) process_info *infop; ! 3: /* ! 4: /* Add with carry. ! 5: /* Note : the play with 'tmp' just before the 'asm' line makes ! 6: /* sure that when the adwc opcode is executed, the current ! 7: /* carry in psl is the same as the 'offending' process'. ! 8: /* Don't change unless you know exactly what you're doing. ! 9: /* ! 10: /*****************************/ ! 11: { ! 12: register long Register_12; /* Has to be first reg ! */ ! 13: register long Register_11; ! 14: register long Register_10; ! 15: register long tmp; ! 16: ! 17: Register_12 = operand(infop,0)->data; ! 18: Register_11 = operand(infop,1)->data; ! 19: if (carry) /* If process' carry set */ ! 20: tmp = -1; ! 21: else tmp = 0; ! 22: tmp++; /* 0 => carry set. 1 => carry clear */ ! 23: ! 24: Register_10=psl; ! 25: Set_psl(r10); /* restore the user psl */ ! 26: asm(" adwc r11,r12"); ! 27: asm(" movpsl r11"); ! 28: New_cc (Register_11); ! 29: ! 30: write_back(infop, Register_12, operand(infop,1) ); ! 31: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.