Fix disassembly of CMP[PS][SD] instructions on x86-64
authorPaul Khuong <pvk@pvk.ca>
Mon, 1 Aug 2011 18:06:28 +0000 (14:06 -0400)
committerPaul Khuong <pvk@pvk.ca>
Mon, 1 Aug 2011 18:06:28 +0000 (14:06 -0400)
commit95009657265e2af674bdfa9ce7dc75d819976e5b
tree99d852adc7b020be461e9f418940296d7bfa3636
parente7b2c507c364da9395ad1f9591210dac44f24afd
Fix disassembly of CMP[PS][SD] instructions on x86-64

The relevant instruction formats wrongly defined a fixed position for
the immediate byte which broke disassembly when a memory argument was
used.

Fix this by using a prefilter to read the immediate like most other
instructions do.

Refactor for more OAOO-ness: Drop the instruction formats that were
used only for these comparison instructions; instead use others that
are nearly identical. This forces more copy-and-paste in the printer
definitions, so instead abstract the generation of printer lists for
SSE instructions into a separate function and use that here.

Add tests.

Fixes lp#814702.

Patch by Lutz Euler.
NEWS
src/compiler/x86-64/insts.lisp
tests/interface.pure.lisp