flat assembler
Message board for the users of flat assembler.

Index > Main > RDMSR/WRMSR in 64-bit mode

Author
Thread Post new topic Reply to topic
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter 14 Jul 2006, 11:55
Hello!
Does FASM allow to use 64-bit RDMSR/WRMSR (operates RDX:RAX and RCX registers) without explicit REX prefix (by any special mnemocode, e.g.)? Or I must write REX prefix explicitly? (and the same for SYSEXIT, SYSRET, XLATB).
Post 14 Jul 2006, 11:55
View user's profile Send private message Reply with quote
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter 17 Jul 2006, 08:01
Ok, for XLATB the following code may be used:
xlat [ebx]
xlat [rbx]

and for other instructions prefix O64 would be very useful. Smile
Post 17 Jul 2006, 08:01
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 17 Jul 2006, 09:22
Strange, Intel doesn't specify any syntax settings to differ the two forms of those instructions. But perhaps RDMSRQ/WRMSRQ should be OK, as fasm already doest it with RETQ etc.
Post 17 Jul 2006, 09:22
View user's profile Send private message Visit poster's website Reply with quote
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter 17 Jul 2006, 15:38
And SYSEXITQ, SYSRETQ ? Wink
Post 17 Jul 2006, 15:38
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen 24 Jul 2006, 08:08
Just curious, is there real need for 64-bit RDMSR/WRMSR? I mean, is there actually any MSR with number greater than 2^32-1, which doesn't fit into ECX?
Post 24 Jul 2006, 08:08
View user's profile Send private message Visit poster's website Reply with quote
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter 24 Jul 2006, 09:08
Tomasz, thank you very much for adding WRMSRQ/RDMSRQ/SYSEXITQ to 1.67.6 Smile. And what about SYSRETQ and Intel multi-bytes NOPs? Wink
Post 24 Jul 2006, 09:08
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 24 Jul 2006, 09:25
In my Intel manuals the SYSRET doesn't use such setting (there's no REX.W-prefixed variant mentioned).
Maybe that's just that I have old manuals, since multi-byte NOP are also not mention... *sigh* Perhaps a time for update...
Post 24 Jul 2006, 09:25
View user's profile Send private message Visit poster's website Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen 24 Jul 2006, 09:32
In my revision (19), it is said that SYSRET depends only on operand-size prefix.

edit: sorry, I confused it


Last edited by MazeGen on 24 Jul 2006, 09:53; edited 1 time in total
Post 24 Jul 2006, 09:32
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 24 Jul 2006, 09:48
OK, you're right, the SYSRET is also affected with REX.W - when it has 32-bit operand size it goes into compatibility mode, while with 64-bit operand size it goes into long mode.
Is the SYSRETQ a good mnemonic here? Per analogy pehaps it's acceptable...
Post 24 Jul 2006, 09:48
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.