As a follow-up to #5780, disassemble the regions identified by bb_starts, falling back on disassembling the whole buffer. This ensures that instructions like br_table that introduce a lot of constants don't throw off capstone for the remainder of the function. --------- Co-authored-by: Jamey Sharp <jamey@minilop.net>
31 lines
481 B
Plaintext
31 lines
481 B
Plaintext
test compile precise-output
|
|
target x86_64
|
|
|
|
function %f(i32, i32) -> i32 {
|
|
block0(v0: i32, v1: i32):
|
|
v2 = iadd v0, v1
|
|
return v2
|
|
}
|
|
|
|
; VCode:
|
|
; pushq %rbp
|
|
; movq %rsp, %rbp
|
|
; block0:
|
|
; movq %rdi, %rax
|
|
; addl %eax, %esi, %eax
|
|
; movq %rbp, %rsp
|
|
; popq %rbp
|
|
; ret
|
|
;
|
|
; Disassembled:
|
|
; block0: ; offset 0x0
|
|
; pushq %rbp
|
|
; movq %rsp, %rbp
|
|
; block1: ; offset 0x4
|
|
; movq %rdi, %rax
|
|
; addl %esi, %eax
|
|
; movq %rbp, %rsp
|
|
; popq %rbp
|
|
; retq
|
|
|