Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-10

fpc assember does not generate short jumps.

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Саша Иваненко

I have an assembler procedure of about a 1500 lines of code. The problem is the jumps are generated with absolute addresses only, even if I explicitly specify "short" postfix. Why is it? The code size is critical for me. I am using lazarus with fpc 2.2.2. Example code:

sub eax,dword ptr [esp]
add esp,04h
cmp eax,0FFFh
jbe short @not_traced // JBE 0xABSOLUTE_ADDRESS GENERATED - WHY???!!! popad
popad
retn
@not_traced:

Any suggestions? Thank you.

Reply by email

Jonas Maebe
to Саша Иваненко
Саша Иваненко wrote 10 lines
I have an assembler procedure of about a 1500 lines of code. The problem is the jumps are generated with absolute addresses only, even if I explicitly specify "short" postfix. Why is it? The code size is critical for me. I am using lazarus with fpc 2.2.2. Example code: sub eax,dword ptr [esp] add esp,04h cmp eax,0FFFh jbe short @not_traced // JBE 0xABSOLUTE_ADDRESS GENERATED - WHY???!!!

It's not an absolute address, but a 32 bit relative address.

Show quoted text 6 lines
popad popad retn @not_traced: Any suggestions? Thank you.

You can try using the external assembler (-Aas). And file a bug report against the internal one (although I thought there was already a bug report about this, I can't find it immediately)

Jonas

Reply by email