flat assembler
Message board for the users of flat assembler.

Index > Windows > 64 bit cmp big immediate size error ?!

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
Fasm 1.73
cmp work with dword in 64 bits ?
Post 13 May 2020, 15:32
View user's profile Send private message Reply with quote
pabloreda



Joined: 24 Jan 2007
Posts: 104
Location: Argentina
pabloreda
I guess, you need a register, mov is the only instruction for load a 64 bits literal.
Post 13 May 2020, 15:38
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
Like this:

cmp qword [rsi],rax
Post 13 May 2020, 15:58
View user's profile Send private message Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 316
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan
possible is negative value
Code:
cmp qword [rsi],0xFFFFFFFFF2345678    

_________________
smaller is better
Post 13 May 2020, 17:22
View user's profile Send private message Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 365
Ali.Z
that because intel architecture is not fully 64-bit, i believe last year or last two years intel expanded their bus from 48-bits to 54-bits.

_________________
Asm For Wise Humans
Post 13 May 2020, 20:40
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7782
Location: Kraków, Poland
Tomasz Grysztar
Ali.Z wrote:
that because intel architecture is not fully 64-bit, i believe last year or last two years intel expanded their bus from 48-bits to 54-bits.
The x86-64 architecture instructions were designed by AMD, though.
Post 13 May 2020, 21:06
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3025
Location: vpcmipstrm
bitRAKE
ALU is 64-bit, address space is canonical to the implemented bus lines.
https://stackoverflow.com/questions/25852367/x86-64-canonical-address

_________________
¯\(°_o)/¯ unlicense.org
Post 13 May 2020, 21:29
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 365
Ali.Z

_________________
Asm For Wise Humans
Post 13 May 2020, 22:04
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17636
Location: In your JS exploiting you and your system
revolution
Internally the x86-64 architecture is fully 64-bit.

But the instruction encoding doesn't have allowance for 64-bit constants except for MOV REG,IMM64.

The external address bus is not related to the internal bitness in any way. The address bus can be narrower or wider than the internal bitness. 32-bit CPUs have had a 24-bit, 32-bit, 36-bit or 40-bit external address bus.

Also the external data bus doesn't necessarily match the internal bitness either. 32-bit CPUs have had 16-bit, 32-bit or 64-bit external data buses. And 16-bit CPUs have had 8-bit or 16-bit data buses. The latest batch of 64-bit CPUs can have narrower or wider data buses also.

Note the the existence of XMM, YMM, etc. with the wide registers doesn't mean the CPU is 128-bit or 256-bit etc. It is still a 64-bit architecture.
Post 14 May 2020, 03:27
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3025
Location: vpcmipstrm
bitRAKE
It turns out that I have a 128-bit compare macro in my support algorithms. Not that it's difficult to code - just being complete in response to the thread. Using a similar method one can create a macro to perform all kinds of extended operations with immediate data. fasmg makes this incredibly easy.

I like the graphic in the wiki article.
Post 15 May 2020, 08:13
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.