Make some disassembler parameters effectual.
authorLutz Euler <lutz.euler@freenet.de>
Wed, 14 Dec 2011 17:11:53 +0000 (18:11 +0100)
committerLutz Euler <lutz.euler@freenet.de>
Wed, 14 Dec 2011 17:11:53 +0000 (18:11 +0100)
commit4d7a5bc91750cf24fe0002c5210891846f53351a
treebe4faf0e99c66a689f485a0f9cf198b154b032dd
parenteb53f2bf913aa34aee83b35eb2b709a2e0d40366
Make some disassembler parameters effectual.

In the context of changing the treatment of prefix instructions in the
disassembler I came across somewhat broken code to parametrize it.
This might as well be repaired, so:

Correct the calculation of the DSTATE's ARGUMENT-COLUMN which is
intended to set a minimal field width for the opcode column. It needs
to take *DISASSEM-INST-COLUMN-WIDTH* and a few more column separators
into account. So as not to confuse users, restore the previous behaviour
by setting *DISASSEM-OPCODE-COLUMN-WIDTH* to 0.

Don't emit instruction bytes when *DISASSEM-INST-COLUMN-WIDTH* is 0.

Whitespace correction in ALIGNMENT-HOOK.

Playing with these two parameters allows to select different disassembly
formats (example from x86-64):

Current:

;      E11: L7:   4881FB17001020   CMP RBX, 537919511
;      E18:       0F8480000000     JEQ L13

(setf SB-DISASSEM::*DISASSEM-INST-COLUMN-WIDTH* 0)

;      E11: L7:   CMP RBX, 537919511
;      E18:       JEQ L13

(setf SB-DISASSEM:*DISASSEM-OPCODE-COLUMN-WIDTH* 8)

;      E11: L7:   CMP     RBX, 537919511
;      E18:       JEQ     L13
src/compiler/disassem.lisp
src/compiler/target-disassem.lisp