diff options
author | Luite Stegeman <stegeman@gmail.com> | 2021-01-22 00:09:17 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-20 07:49:15 -0400 |
commit | 1f94e0f7601f8e22fdd81a47f130650265a44196 (patch) | |
tree | d06d02317049b56763b2f1da27f71f3663efa5a0 /rts/Disassembler.c | |
parent | 7de3532f0317032f75b76150c5d3a6f76178be04 (diff) | |
download | haskell-1f94e0f7601f8e22fdd81a47f130650265a44196.tar.gz |
Generate GHCi bytecode from STG instead of Core and support unboxed
tuples and sums.
fixes #1257
Diffstat (limited to 'rts/Disassembler.c')
-rw-r--r-- | rts/Disassembler.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/rts/Disassembler.c b/rts/Disassembler.c index 67a451e7e6..451521d57e 100644 --- a/rts/Disassembler.c +++ b/rts/Disassembler.c @@ -148,6 +148,13 @@ disInstr ( StgBCO *bco, int pc ) debugBelch("PUSH_ALTS_V " ); printPtr( ptrs[instrs[pc]] ); debugBelch("\n"); pc += 1; break; + case bci_PUSH_ALTS_T: + debugBelch("PUSH_ALTS_T "); + printPtr( ptrs[instrs[pc]] ); + debugBelch(" 0x%" FMT_HexWord " ", literals[instrs[pc+1]] ); + printPtr( ptrs[instrs[pc+2]] ); + debugBelch("\n"); + pc += 3; break; case bci_PUSH_PAD8: debugBelch("PUSH_PAD8\n"); pc += 1; break; @@ -310,6 +317,9 @@ disInstr ( StgBCO *bco, int pc ) case bci_RETURN_V: debugBelch("RETURN_V\n" ); break; + case bci_RETURN_T: + debugBelch("RETURN_T\n "); + break; default: barf("disInstr: unknown opcode %u", (unsigned int) instr); @@ -317,12 +327,6 @@ disInstr ( StgBCO *bco, int pc ) return pc; } - -/* Something of a kludge .. how do we know where the end of the insn - array is, since it isn't recorded anywhere? Answer: the first - short is the number of bytecodes which follow it. - See GHC.CoreToByteCode.linkBCO.insns_arr for construction ... -*/ void disassemble( StgBCO *bco ) { uint32_t i, j; |