|
|
1.1 ! root 1: # ! 2: # reserved instructions event test ! 3: # includes unimplemented instructions ! 4: # ! 5: # R7 = PC that failed ! 6: # R0 = error code ! 7: # 1 - expected reserved inst. fault didnot happen ! 8: # R1 = opcode that should cause fault ! 9: # 2 - Error in PC pushed on the stack ! 10: # R1 = actual, R2 = expected ! 11: # 3 - PSL is not pushed on the stack ! 12: # 4 - Too many parameters pushed on the stack ! 13: ! 14: .globl _rsv_evt ! 15: _rsv_evt: ! 16: .word 0x1fff ! 17: mtpr $31,$IPL /* Set IPL to HIGH */ ! 18: movab (sp),_savvec0 /* Save current SP */ ! 19: mtpr _savvec0,$ISP /* Set ISP to current SP */ ! 20: movl _scb+PINSTVEC,_savvec2 /* Save priv. inst fault vector */ ! 21: movab vecvec5,_scb+PINSTVEC /* Set new vector */ ! 22: movl $-1,-(sp) /* Push marker on stack */ ! 23: movab _pcb0,r1 ! 24: mtpr r1,$PCBB /* Set PCBB to PCB_U0 */ ! 25: subl3 $24,_savvec0,_pcb0 /* Set PCB_KSP a few lwords below ISP */ ! 26: movab rtable,r5 /* R5 = addr reserved operand table */ ! 27: movb (r5),resinstr /* Store reserved opcode */ ! 28: mtpr $0xff,$PACC /* Purge all code cache */ ! 29: movab resinstr,r7 /* R7 = PC that failed */ ! 30: ! 31: resinstr: ! 32: .byte 0xff /* This where reserved opcode is stored & executed */ ! 33: movl $1,r0 ! 34: movb resinstr,r1 /*r1 = reserved opcode */ ! 35: andl2 $0xff,r1 ! 36: jmp *badrtn /* Error - no reserved opcode fault */ ! 37: # ! 38: # *************************************** ! 39: # Event handler for privilege inst. fault ! 40: # *************************************** ! 41: # ! 42: .align 2 ! 43: vecvec5: ! 44: movl (sp)+,r1 /* R1 = actual PC pop from stack */ ! 45: movab resinstr,r2 /* R2 = expected PC */ ! 46: cmpl r1,r2 ! 47: beql 1f ! 48: movl $2,r0 /* Error : wrong PC on stack */ ! 49: jmp *badrtn /* R1 = actual & R2 = expected */ ! 50: # ! 51: 1: ! 52: movl (sp)+,r1 /* R1 = actual PSL pop from stack */ ! 53: cmpl $-1,r1 /* If -1, then it is not psl */ ! 54: bneq 1f ! 55: movl $3,r0 /* Error : PSL is not pushed on stack */ ! 56: jmp *badrtn ! 57: # ! 58: 1: ! 59: cmpl $-1,(sp) /* SP should point at the marker */ ! 60: beql 1f ! 61: movl $4,r0 /* Too many parameters pushed on SP */ ! 62: jmp *badrtn ! 63: # ! 64: 1: ! 65: incb r5 /* Get next reserved opcode */ ! 66: movb (r5),resinstr /* Store it there to be executed */ ! 67: cmpb $0,resinstr /* Is this the last opcode ? */ ! 68: beql 1f ! 69: mtpr $0xff,$23 /* Purge all code cache */ ! 70: brw resinstr /* Branch back and do again */ ! 71: 1: ! 72: ret ! 73: # ! 74: # ! 75: # WARNING : If reserved opcodes change, so do the following table ! 76: .align 2 ! 77: rtable: ! 78: # .byte 0x01 /* Now is EHALT : 5/13/83 */ ! 79: .byte 0x02 ! 80: .byte 0x03 ! 81: .byte 0x04 ! 82: # .byte 0x05 /* Now is SINF : 20/Feb/85 */ ! 83: # .byte 0x06 /* Now is LDF : 20/Feb/85 */ ! 84: # .byte 0x07 /* Now is LDD : 20/Feb/85 */ ! 85: .byte 0x12 ! 86: .byte 0x14 ! 87: # .byte 0x15 /* Now is COSF : 20/Feb/85 */ ! 88: # .byte 0x16 /* Now is LNF : 20/Feb/85 */ ! 89: # .byte 0x17 /* Now is LND : 20/Feb/85 */ ! 90: .byte 0x22 ! 91: .byte 0x24 ! 92: # .byte 0x25 /* Now is ATANF : 20/Feb/85 */ ! 93: # .byte 0x26 /* Now is STF : 20/Feb/85 */ ! 94: # .byte 0x27 /* Now is STD : 20/Feb/85 */ ! 95: .byte 0x32 ! 96: .byte 0x34 ! 97: # .byte 0x35 /* Now is LOGF : 20/Feb/85 */ ! 98: # .byte 0x36 /* Now is CMPF : 20/Feb/85 */ ! 99: # .byte 0x37 /* Now is CMPD : 20/Feb/85 */ ! 100: .byte 0x42 ! 101: .byte 0x43 ! 102: .byte 0x44 ! 103: # .byte 0x45 /* Now is SQRTF : 20/Feb/85 */ ! 104: # .byte 0x46 /* Now is CMPF2 : 20/Feb/85 */ ! 105: # .byte 0x47 /* Now is CMPD2 : 20/Feb/85 */ ! 106: .byte 0x4f ! 107: .byte 0x52 ! 108: .byte 0x53 ! 109: .byte 0x54 ! 110: # .byte 0x55 /* Now is EXPF : 20/Feb/85 */ ! 111: # .byte 0x56 /* Now is TSTF : 20/Feb/85 */ ! 112: # .byte 0x57 /* Now is TSTD : 20/Feb/85 */ ! 113: .byte 0x62 ! 114: .byte 0x63 ! 115: .byte 0x64 ! 116: .byte 0x65 ! 117: .byte 0x66 ! 118: # .byte 0x67 /* Now is PUSHD : 20/Feb/85 */ ! 119: .byte 0x72 ! 120: .byte 0x73 ! 121: .byte 0x74 ! 122: .byte 0x75 ! 123: # .byte 0x76 /* Now is CVLF : 20/Feb/85 */ ! 124: # .byte 0x77 /* Now is CVLD : 20/Feb/85 */ ! 125: .byte 0x83 ! 126: .byte 0x84 ! 127: .byte 0x85 ! 128: # .byte 0x86 /* Now is CVFL : 20/Feb/85 */ ! 129: # .byte 0x87 /* Now is CVDL : 20/Feb/85 */ ! 130: .byte 0x8f ! 131: .byte 0x93 ! 132: .byte 0x94 ! 133: .byte 0x95 ! 134: .byte 0x96 ! 135: # .byte 0x97 /* Now is LDFD : 20/Feb/85 */ ! 136: .byte 0x9f ! 137: .byte 0xa2 ! 138: .byte 0xa3 ! 139: .byte 0xa4 ! 140: .byte 0xa5 ! 141: # .byte 0xa6 /* Now is CVDF : 20/Feb/85 */ ! 142: .byte 0xa7 ! 143: .byte 0xaf ! 144: .byte 0xb2 ! 145: .byte 0xb3 ! 146: .byte 0xb4 ! 147: .byte 0xb5 ! 148: # .byte 0xb6 /* Now is NEGF : 20/Feb/85 */ ! 149: # .byte 0xb7 /* Now is NEGD : 20/Feb/85 */ ! 150: .byte 0xc4 ! 151: .byte 0xc5 ! 152: # .byte 0xc6 /* Now is ADDF : 20/Feb/85 */ ! 153: # .byte 0xc7 /* Now is ADDD : 20/Feb/85 */ ! 154: # .byte 0xcb /* Now is MOVOW : 6/14/83 */ ! 155: .byte 0xd3 ! 156: .byte 0xd4 ! 157: .byte 0xd5 ! 158: # .byte 0xd6 /* Now is SUBF : 20/Feb/85 */ ! 159: # .byte 0xd7 /* Now is SUBD : 20/Feb/85 */ ! 160: .byte 0xde ! 161: .byte 0xdf ! 162: .byte 0xe2 ! 163: .byte 0xe3 ! 164: .byte 0xe4 ! 165: .byte 0xe5 ! 166: # .byte 0xe6 /* Now is MULF : 20/Feb/85 */ ! 167: # .byte 0xe7 /* Now is MULD : 20/Feb/85 */ ! 168: .byte 0xef ! 169: .byte 0xf2 ! 170: .byte 0xf3 ! 171: .byte 0xf4 ! 172: .byte 0xf5 ! 173: # .byte 0xf6 /* Now is DIVF : 20/Feb/85 */ ! 174: # .byte 0xf7 /* Now is DIVD : 20/Feb/85 */ ! 175: .byte 0xfa ! 176: .byte 0xff ! 177: .byte 0x61 /* 8/23 */ ! 178: .byte 0x0f /* 8/23 */ ! 179: # .byte 0x6e /* 12/7 divl2u */ ! 180: # .byte 0x7e /* 12/7 divl3u */ ! 181: # .byte 0x68 /* 12/7 Modl2 */ ! 182: # .byte 0x6a /* 12/7 Modl2u */ ! 183: # .byte 0x78 /* 12/7 Modl3 */ ! 184: # .byte 0x7a /* 12/7 Modl3u */ ! 185: .byte 0x00
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.