diff options
author | Ian Lynagh <igloo@earth.li> | 2006-10-09 23:05:39 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2006-10-09 23:05:39 +0000 |
commit | 94abbcb6d1d3d28d0b2de965e1357ac7b8f8c40a (patch) | |
tree | 349047d8c025667d5bb1dcb248d99419a135d2aa /rts/Disassembler.c | |
parent | e4137764fddd9003f1d2a234de7b2fc076be335d (diff) | |
download | haskell-94abbcb6d1d3d28d0b2de965e1357ac7b8f8c40a.tar.gz |
Tweaks and missing case in disassembler
Diffstat (limited to 'rts/Disassembler.c')
-rw-r--r-- | rts/Disassembler.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/rts/Disassembler.c b/rts/Disassembler.c index 00f700fe16..f29cce2daa 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); @@ -43,7 +44,8 @@ disInstr ( StgBCO *bco, int pc ) StgArrWords* itbls_arr = bco->itbls; StgInfoTable** itbls = (StgInfoTable**)(&itbls_arr->payload[0]); - switch (instrs[pc++]) { + instr = instrs[pc++]; + switch (instr) { case bci_SWIZZLE: debugBelch("SWIZZLE stkoff %d by %d\n", instrs[pc], (signed int)instrs[pc+1]); @@ -145,13 +147,17 @@ disInstr ( StgBCO *bco, int pc ) debugBelch("ALLOC_AP %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; @@ -230,7 +236,7 @@ disInstr ( StgBCO *bco, int pc ) break; default: - barf("disInstr: unknown opcode"); + barf("disInstr: unknown opcode %u", (unsigned int) instr); } return pc; } |