flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Push more than 4 Bytes

Author
Thread Post new topic Reply to topic
SilverOne



Joined: 28 Nov 2011
Posts: 1
SilverOne
fasm version is 1.69.35

Code:
    ; This works:
    push 'abcd'           ; 4 Bytes
    mov rax,'abcdefgh'
    push rax              ; 8 Bytes over rax

    ; This does not work:
    push 'abcdefgh'       ; Error: value out of range
    


Shouldn't push allow 8 Byte immediate values in 64bit mode?

_________________
Assemble the elements that comprise the whole. Combine them, allowing reactions to occur.
Observe the reactions and identify the elements that perform counter to the intended result.
Once identified they can be dealt with, cast out, eliminated...
Post 28 Nov 2011, 14:34
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17271
Location: In your JS exploiting you and your system
revolution
SilverOne wrote:
Shouldn't push allow 8 Byte immediate values in 64bit mode?
Perhaps it should, but the CPU hardware does not support it. fasm properly generates an error since, with the current instruction set, it is impossible to encode a full sized 64-bit push.

If you want this to be changed then I suggest you write to Intel/AMD and ask for them to update the CPU instruction set. Wink
Post 28 Nov 2011, 14:39
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.

Powered by rwasa.