flat assembler
Message board for the users of flat assembler.
Index
> Main > Problem with large immediate constants in x64 mode |
Author |
|
revolution 03 Nov 2011, 18:20
You can't define a large constant like '\CLSID' with mov m64,imm.
See the Intel manual for operand bounds. The largest is this: Intel manual wrote: MOV r/m64,imm32 |
|||
03 Nov 2011, 18:20 |
|
murder 04 Nov 2011, 13:56
Quote: Intel manual wrote: ok, thanks. I didnt know about this restriction. Sorry. |
|||
04 Nov 2011, 13:56 |
|
Madis731 07 Nov 2011, 18:35
CPUs limit instruction lengths to 15 bytes.
If 64-bit architecture would allow full 64-bit immediates then MOV m64,imm64 could be inflated to 20 bytes by only using Code: mov qword[rax+rax*8+123456789ABCDEF0h],123456789ABCDEF0h I did a simple calculation from the following line that takes 12 bytes Code: mov qword[rax+rax*8+12345678h],12345678h Thx revolution! Last edited by Madis731 on 07 Nov 2011, 19:23; edited 1 time in total |
|||
07 Nov 2011, 18:35 |
|
revolution 07 Nov 2011, 19:09
Madis731 wrote: CPUs limit instruction lengths to 16 bytes. |
|||
07 Nov 2011, 19:09 |
|
revolution 07 Nov 2011, 19:13
Madis731 wrote: If 64-bit architecture would allow full 64-bit immediates then Code: mov qword[rax+rax*8+123456789ABCDEF0h],123456789ABCDEF0h |
|||
07 Nov 2011, 19:13 |
|
Madis731 07 Nov 2011, 19:25
Sorry, wasn't thinking straight. I was not referencing any documents like I should've done and like I usually do. Fixed!
|
|||
07 Nov 2011, 19:25 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.