Skip to content

Jump distance is ignored if the jump location is same #242

@tomsons26

Description

@tomsons26

I have a asm written function where there's alignment in between jumps

Image

extracted relevant asm code

.686P
.mmx
.model	flat, C

		.code;


; no idea how to get this to appear so fake it
_align MACRO count
	REPT (count / 8)
		;lea esp, [esp+0] but zero is optimized to a byte..
		db 08Dh, 0A4h, 024h, 00h, 00h, 00h, 00h
	ENDM
ENDM

_aligna MACRO reg
	add reg,0
ENDM

_alignl MACRO reg
	lea reg,[reg]
ENDM

_alignm MACRO reg
	mov reg,reg
ENDM

Adjust_Color_1 proc C uses ebx ecx edx esi edi

    punpckhwd mm2, mm1
    punpckhwd mm2, mm2
    jmp     ??mmx_loop

    _align 32
    _align 16

??mmx_loop:
    add     edi, 2
Adjust_Color_1 endp

Adjust_Color_2 proc C uses ebx ecx edx esi edi

    punpckhwd mm2, mm1
    punpckhwd mm2, mm2
    jmp     ??mmx_loop

    _align 32
    _align 8
    db 08Dh, 064h, 024h, 00h

??mmx_loop:
    add     edi, 2
Adjust_Color_2 endp

end

This should still be flagged as something

assembled obj
objdiffjmpissue.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions