X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FDisassembler.c;h=19c121f2f1ad8c97da89fd1e8cf037da7512f526;hp=00f700fe167be3ba7500fa150113263ca737221b;hb=b19ba85c6ec3504a66b33243cfb43599d8c298a7;hpb=b6c66a92f80e50e80ba44c8faa1450abfb5edd46 diff --git a/rts/Disassembler.c b/rts/Disassembler.c index 00f700f..19c121f 100644 --- a/rts/Disassembler.c +++ b/rts/Disassembler.c @@ -31,6 +31,7 @@ int disInstr ( StgBCO *bco, int pc ) { int i; + StgWord16 instr; StgWord16* instrs = (StgWord16*)(bco->instrs->payload); @@ -40,10 +41,13 @@ disInstr ( StgBCO *bco, int pc ) StgMutArrPtrs* ptrs_arr = bco->ptrs; StgPtr* ptrs = (StgPtr*)(&ptrs_arr->payload[0]); - StgArrWords* itbls_arr = bco->itbls; - StgInfoTable** itbls = (StgInfoTable**)(&itbls_arr->payload[0]); - - switch (instrs[pc++]) { + instr = instrs[pc++]; + switch (instr) { + case bci_BRK_FUN: + debugBelch ("BRK_FUN " ); printPtr( ptrs[instrs[pc]] ); + debugBelch (" %d ", instrs[pc+1]); printPtr( ptrs[instrs[pc+2]] ); debugBelch("\n" ); + pc += 3; + break; case bci_SWIZZLE: debugBelch("SWIZZLE stkoff %d by %d\n", instrs[pc], (signed int)instrs[pc+1]); @@ -144,20 +148,27 @@ disInstr ( StgBCO *bco, int pc ) case bci_ALLOC_AP: debugBelch("ALLOC_AP %d words\n", instrs[pc] ); pc += 1; break; + case bci_ALLOC_AP_NOUPD: + debugBelch("ALLOC_AP_NOUPD %d words\n", instrs[pc] ); + pc += 1; break; case bci_ALLOC_PAP: - debugBelch("ALLOC_PAP %d words, %d arity\n", + debugBelch("ALLOC_PAP %d arity, %d words\n", instrs[pc], instrs[pc+1] ); pc += 2; break; case bci_MKAP: debugBelch("MKAP %d words, %d stkoff\n", instrs[pc+1], instrs[pc] ); pc += 2; break; + case bci_MKPAP: + debugBelch("MKPAP %d words, %d stkoff\n", instrs[pc+1], + instrs[pc] ); + pc += 2; break; case bci_UNPACK: debugBelch("UNPACK %d\n", instrs[pc] ); pc += 1; break; case bci_PACK: debugBelch("PACK %d words with itbl ", instrs[pc+1] ); - printPtr( (StgPtr)itbls[instrs[pc]] ); + printPtr( (StgPtr)literals[instrs[pc]] ); debugBelch("\n"); pc += 2; break; @@ -230,7 +241,7 @@ disInstr ( StgBCO *bco, int pc ) break; default: - barf("disInstr: unknown opcode"); + barf("disInstr: unknown opcode %u", (unsigned int) instr); } return pc; }