flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
baldr 19 Jun 2010, 15:50
ouadji,
This is a small logical glitch in jcxz / loop handling code. It appears in case of forward reference (obviously). On pass 0 forward-referenced glop symbol has no predicted value, thus FASM let it go. On pass 1 glop symbol is predicted to be 128 or 129 (while it should be predicted as 130 / 131: instruction takes 2 bytes), reachable by jecxz from 0+2; later on this pass glop is defined as 130 / 131 due to compiled jecxz instruction… and the story begins again (on the next pass destination is unreachable, glop is defined as 128 / 129 and so on). ![]() The patch is simple: Code: make_loop_jump: call check_for_short_jump jc conditional_jump_short ;+++ X86_64.INC [3292]: correct occasional "code cannot be generated" on marginal forward jcxz/loop stos word [edi] ;=== jmp jump_out_of_range loop_counter_size: |
|||
![]() |
|
ouadji 19 Jun 2010, 18:35
ok ![]() Code: X86_64.INC [3292] stos word [edi] ; +++ Thank you very much for your explanations. Thank you also for the "patch". It works very well. With this additional line of code, there is no problem. This makes fasm's operations more logical. It also simplifies my code to display the number of bytes exceeded. It's amazing ... your knowledge of how FASM works, and your knowledge of its internal code. Have you taken part in the development of FASM ?? again, thank you baldr. ![]() it would be nice to include this fix in the next version |
|||
![]() |
|
LocoDelAssembly 19 Jun 2010, 18:50
Quote:
For that reason don't mark your thread as "(solved)" because you will make Tomasz unstick it without looking at it. ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.