flat assembler
Message board for the users of flat assembler.

Index > Main > jmp and call in the 64-bit mode

Author
Thread Post new topic Reply to topic
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter
I guess that it's bug for 64-bit mode, since these 16-bit combinations are described as N.E. (not encodable) in Intel manuals:
jmp near word [rax]
call near word [rax]
jmp ax
call ax
but these instructions don't cause error (FASM generates error only for 32-bit variant of these instructions, e.g. call near dword [rax], call eax).
Post 05 Jul 2006, 16:13
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7797
Location: Kraków, Poland
Tomasz Grysztar
When implementing it in fasm, I consulted the AMD manuals in the places where they say (I refer to my hardcopy version - well, it may be a bit outdated, though):

AMD64 Manual, Volume 2, section 2.5.6:
Quote:
The operand size for near branches can be overridden to 16 bits in 64-bit mode.


AMD64 Manual, Volume 3, JMP instruction reference
Quote:
No prefix is available to encode a 32-bit operand size in 64-bit mode
Post 05 Jul 2006, 18:52
View user's profile Send private message Visit poster's website Reply with quote
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter
Yes, I've seen AMD manuals and found this quote there. I think it's a difference between AMD and Intel manuals Smile. Maybe, these instructions have a different behaviour on AMD and Intel processors, but I havn't tested it.
Post 06 Jul 2006, 13:06
View user's profile Send private message Reply with quote
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter
Hi Tomasz! Does AMD send out hardcopy version of manuals as Intel, or you've printed them by yourself? Smile
Post 10 Jul 2006, 08:39
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7797
Location: Kraków, Poland
Tomasz Grysztar
It does, however only to recipients within the United States. I had to use the "middle man" in US to get them for me.
Post 10 Jul 2006, 22:14
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.