lpereira opened PR #8637 from lpereira:disasm-with-symbol-names
to bytecodealliance:main
:
Another one in the series to improve the debuggability quality of life: display the symbol name in the "compile -D" command, as well as change the byte dump at the beginning with a crude hexdump.
No tests seems to expect anything with the string "Disassembly of {num} bytes", so no tests have been updated.
lpereira requested elliottt for a review on PR #8637.
lpereira requested wasmtime-compiler-reviewers for a review on PR #8637.
lpereira edited PR #8637:
Another one in the series to improve the debuggability quality of life: display the symbol name in the "compile -D" command, as well as change the byte dump at the beginning with a crude hexdump.
No tests seems to expect anything with the string "Disassembly of {num} bytes", so no tests have been updated.
Here's an output sample (excerpt from
compile -D cranelift/filetests/filetests/wasm/f64-arith.clif
):Hex dump of 44 bytes <%f64_copysign>: 55 48 89 e5 48 b9 00 00 00 00 00 00 00 80 66 48 UH··H·········fH 0f 6e f9 66 0f 6f d0 66 0f 6f c7 66 0f 55 c2 66 ·n·f·o·f·o·f·U·f 0f 54 f9 66 0f 56 c7 48 89 ec 5d c3 ·T·f·V·H··]· Disassembly of 44 bytes <%f64_copysign>: 0: 55 pushq %rbp 1: 48 89 e5 movq %rsp, %rbp 4: 48 b9 00 00 00 00 00 00 00 80 movabsq $9223372036854775808, %rcx e: 66 48 0f 6e f9 movq %rcx, %xmm7 13: 66 0f 6f d0 movdqa %xmm0, %xmm2 17: 66 0f 6f c7 movdqa %xmm7, %xmm0 1b: 66 0f 55 c2 andnpd %xmm2, %xmm0 1f: 66 0f 54 f9 andpd %xmm1, %xmm7 23: 66 0f 56 c7 orpd %xmm7, %xmm0 27: 48 89 ec movq %rbp, %rsp 2a: 5d popq %rbp 2b: c3 retq
lpereira updated PR #8637.
lpereira edited PR #8637:
Another one in the series to improve the debuggability quality of life: display the symbol name in the "compile -D" command, as well as change the byte dump at the beginning with a crude hexdump.
No tests seems to expect anything with the string "Disassembly of {num} bytes", so no tests have been updated.
Here's an output sample (excerpt from
compile -D cranelift/filetests/filetests/wasm/f64-arith.clif
):Hex dump of 44 bytes <%f64_copysign>: 55 48 89 e5 48 b9 00 00 00 00 00 00 00 80 66 48 UH··H·········fH 0f 6e f9 66 0f 6f d0 66 0f 6f c7 66 0f 55 c2 66 ·n·f·o·f·o·f·U·f 0f 54 f9 66 0f 56 c7 48 89 ec 5d c3 ·T·f·V·H··]· Byte dump of 44 bytes <%f64_copysign>: .byte 85, 72, 137, 229, 72, 185, 0, 0, 0, 0, 0, 0, 0, 128, 102, 72, 15, 110, 249, 102, 15, 111, 208, 102, 15, 111, 199, 102, 15, 85, 194, 102, 15, 84, 249, 102, 15, 86, 199, 72, 137, 236, 93, 195 Disassembly of 44 bytes <%f64_copysign>: 0: 55 pushq %rbp 1: 48 89 e5 movq %rsp, %rbp 4: 48 b9 00 00 00 00 00 00 00 80 movabsq $9223372036854775808, %rcx e: 66 48 0f 6e f9 movq %rcx, %xmm7 13: 66 0f 6f d0 movdqa %xmm0, %xmm2 17: 66 0f 6f c7 movdqa %xmm7, %xmm0 1b: 66 0f 55 c2 andnpd %xmm2, %xmm0 1f: 66 0f 54 f9 andpd %xmm1, %xmm7 23: 66 0f 56 c7 orpd %xmm7, %xmm0 27: 48 89 ec movq %rbp, %rsp 2a: 5d popq %rbp 2b: c3 retq
lpereira updated PR #8637.
lpereira edited PR #8637:
Another one in the series to improve the debuggability quality of life: display the symbol name in the "compile -D" command, as well as change the byte dump at the beginning with a crude hexdump.
No tests seems to expect anything with the string "Disassembly of {num} bytes", so no tests have been updated.
Here's an output sample (excerpt from
compile -D cranelift/filetests/filetests/wasm/f64-arith.clif
):Hex dump of 44 bytes <%f64_copysign>: 55 48 89 e5 48 b9 00 00 00 00 00 00 00 80 66 48 UH··H·········fH 0f 6e f9 66 0f 6f d0 66 0f 6f c7 66 0f 55 c2 66 ·n·f·o·f·o·f·U·f 0f 54 f9 66 0f 56 c7 48 89 ec 5d c3 ·T·f·V·H··]· Byte dump of 44 bytes <%f64_copysign>: .byte 55, 48, 89, e5, 48, b9, 00, 00, 00, 00, 00, 00, 00, 80, 66, 48 .byte 0f, 6e, f9, 66, 0f, 6f, d0, 66, 0f, 6f, c7, 66, 0f, 55, c2, 66 .byte 0f, 54, f9, 66, 0f, 56, c7, 48, 89, ec, 5d, c3 Disassembly of 44 bytes <%f64_copysign>: 0: 55 pushq %rbp 1: 48 89 e5 movq %rsp, %rbp 4: 48 b9 00 00 00 00 00 00 00 80 movabsq $9223372036854775808, %rcx e: 66 48 0f 6e f9 movq %rcx, %xmm7 13: 66 0f 6f d0 movdqa %xmm0, %xmm2 17: 66 0f 6f c7 movdqa %xmm7, %xmm0 1b: 66 0f 55 c2 andnpd %xmm2, %xmm0 1f: 66 0f 54 f9 andpd %xmm1, %xmm7 23: 66 0f 56 c7 orpd %xmm7, %xmm0 27: 48 89 ec movq %rbp, %rsp 2a: 5d popq %rbp 2b: c3 retq
lpereira updated PR #8637.
lpereira edited PR #8637:
Another one in the series to improve the debuggability quality of life: display the symbol name in the "compile -D" command, as well as change the byte dump at the beginning with a crude hexdump.
No tests seems to expect anything with the string "Disassembly of {num} bytes", so no tests have been updated.
Here's an output sample (excerpt from
compile -D cranelift/filetests/filetests/wasm/f64-arith.clif
):Hex dump of 44 bytes <%f64_copysign>: 55 48 89 e5 48 b9 00 00 00 00 00 00 00 80 66 48 UH··H·········fH 0f 6e f9 66 0f 6f d0 66 0f 6f c7 66 0f 55 c2 66 ·n·f·o·f·o·f·U·f 0f 54 f9 66 0f 56 c7 48 89 ec 5d c3 ·T·f·V·H··]· Byte dump of 44 bytes <%f64_copysign>: .byte 0x55, 0x48, 0x89, 0xe5, 0x48, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x66, 0x48 .byte 0x0f, 0x6e, 0xf9, 0x66, 0x0f, 0x6f, 0xd0, 0x66, 0x0f, 0x6f, 0xc7, 0x66, 0x0f, 0x55, 0xc2, 0x66 .byte 0x0f, 0x54, 0xf9, 0x66, 0x0f, 0x56, 0xc7, 0x48, 0x89, 0xec, 0x5d, 0xc3 Disassembly of 44 bytes <%f64_copysign>: 0: 55 pushq %rbp 1: 48 89 e5 movq %rsp, %rbp 4: 48 b9 00 00 00 00 00 00 00 80 movabsq $9223372036854775808, %rcx e: 66 48 0f 6e f9 movq %rcx, %xmm7 13: 66 0f 6f d0 movdqa %xmm0, %xmm2 17: 66 0f 6f c7 movdqa %xmm7, %xmm0 1b: 66 0f 55 c2 andnpd %xmm2, %xmm0 1f: 66 0f 54 f9 andpd %xmm1, %xmm7 23: 66 0f 56 c7 orpd %xmm7, %xmm0 27: 48 89 ec movq %rbp, %rsp 2a: 5d popq %rbp 2b: c3 retq
lpereira updated PR #8637.
elliottt commented on PR #8637:
Adding the name seems like a really nice improvement, but I'm not sure about the additional hex and byte dumps, given that Capstone is already printing out the hex bytes of the instructions. Was there a specific case that you had in mind where they were improving debugging?
lpereira updated PR #8637.
Last updated: Nov 22 2024 at 16:03 UTC