1: / fp2 -- floating point simulation 2: 3: i.ldx: 4: mov (r3)+,(r2)+ 5: mov (r3)+,(r2)+ 6: bit $m.ext,fpsr 7: beq 1f 8: mov (r3)+,(r2)+ 9: mov (r3)+,(r2)+ 10: rts pc 11: 1: 12: clr (r2)+ 13: clr (r2)+ 14: rts pc 15: 16: i.stx: 17: mov (r2)+,(r3)+ 18: mov (r2)+,(r3)+ 19: bit $m.ext,fpsr 20: beq 1f 21: mov (r2)+,(r3)+ 22: mov (r2)+,(r3)+ 23: 1: 24: jmp ret / does not set cc's 25: 26: i.clrx: 27: clr (r3)+ 28: clr (r3)+ 29: bit $m.ext,fpsr 30: beq 1f 31: clr (r3)+ 32: clr (r3)+ 33: 1: 34: rts pc 35: 36: i.negx: 37: tst (r3) 38: beq 1f 39: add $100000,(r3) 40: 1: 41: rts pc 42: 43: i.absx: 44: bic $!77777,(r3) 45: rts pc 46: 47: i.tstx: 48: rts pc 49: 50: i.cmpx: 51: mov $areg,r5 52: tst (r2) 53: bge 1f 54: tst (r3) 55: bge 1f 56: cmp (r2),(r3) 57: bgt 4f 58: blt 3f 59: 1: 60: cmp (r2)+,(r3)+ 61: bgt 3f 62: blt 4f 63: cmp (r2)+,(r3)+ 64: bne 1f 65: bit $m.ext,fpsr 66: beq 2f 67: cmp (r2)+,(r3)+ 68: bne 1f 69: cmp (r2)+,(r3)+ 70: beq 2f 71: 1: 72: bhi 3f 73: 4: 74: movb $1,1(r5) 75: rts pc 76: 3: 77: mov $-1,(r5) 78: rts pc 79: 2: 80: clr (r5) 81: rts pc 82: 83: i.ldcyx: 84: mov (r3)+,(r2)+ 85: mov (r3)+,(r2)+ 86: bit $m.ext,fpsr 87: bne 1f 88: mov (r3)+,(r2)+ 89: mov (r3)+,(r2)+ 90: rts pc 91: 1: 92: clr (r2)+ 93: clr (r2)+ 94: rts pc 95: 96: i.stcxy: 97: mov (r2)+,(r3)+ 98: mov (r2)+,(r3)+ 99: bit $m.ext,fpsr 100: bne 1f 101: clr (r3)+ 102: clr (r3)+ 103: 1: 104: rts pc 105: 106: i.ldcjx: 107: mov $asign,r0 108: mov $1,(r0)+ 109: mov (r3)+,(r0)+ 110: bit $m.lngi,fpsr 111: beq 1f 112: mov (r3)+,(r0)+ 113: clr (r0)+ 114: clr (r0)+ 115: mov $32.-8,(r0)+ 116: jmp saret 117: 1: 118: clr (r0)+ 119: clr (r0)+ 120: clr (r0)+ 121: mov $16.-8,(r0) 122: jmp saret 123: 124: i.stcxj: 125: mov r3,r5 126: mov $asign,r0 127: jsr pc,seta 128: clr r4 129: mov $areg,r0 130: mov (r0)+,r1 131: mov (r0)+,r2 132: mov (r0)+,r3 133: mov aexp,r0 134: 1: 135: cmp r0,$48.-8 136: bge 1f 137: clc 138: ror r1 139: ror r2 140: ror r3 141: inc r0 142: br 1b 143: 1: 144: bgt 7f 145: tst r1 146: beq 1f 147: 7: 148: bis $1,r4 / C-bit 149: 1: 150: bit $m.lngi,fpsr 151: beq 1f 152: tst asign 153: bge 2f 154: neg r3 155: adc r2 156: bcs 2f 157: neg r2 158: bis $10,r4 / N-bit 159: 2: 160: mov r2,(r5) 161: mov r3,2(r5) 162: bis r2,r3 163: br 8f 164: 1: 165: tst r2 166: beq 1f 167: bis $1,r4 / C-bit 168: 1: 169: tst asign 170: bge 2f 171: neg r3 172: bis $10,r4 / N-bit 173: 2: 174: mov r3,(r5) 175: 8: 176: bne 1f 177: bis $4,r4 / Z-bit 178: 1: 179: bic $17,sps 180: bic $17,fpsr 181: bis r4,sps 182: bis r4,fpsr 183: jmp ret 184: 185: xoflo: 186: bis $1,fpsr / set fixed overflow (carry) 187: jmp ret 188: 189: i.ldexp: 190: mov $asign,r0 191: jsr pc,seta 192: mov (r3),aexp 193: jsr pc,reta 194: jmp sret 195: 196: i.stexp: 197: mov $asign,r0 198: jsr pc,seta 199: mov aexp,(r3) 200: mov r3,r5 201: bic $17,sps 202: tst (r3) 203: bmi 1f 204: bne 2f 205: bis $4,sps / Z-bit 206: br 2f 207: 1: 208: bis $10,sps / N-bit 209: 2: 210: jmp sret 211: 212: i.ldfps: 213: mov (r3),fpsr 214: jmp ret 215: 216: i.stfps: 217: mov fpsr,(r3) 218: jmp ret