flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar
I haven't included CR9-CR15, because I haven't found their existence documented, but I will include them for completness, OK. RDTSCP is perhaps something from the latest documentation updates? My old printed manuals don't mention it. As for the segment prefixes optimizations, I considered them while designing x86-64 support, however I decided they shouldn't be there - making assembler remove the ES: setting for you might make you think that it is the same as DS:, while the ES prefix is simply ignored, no matter what descriptor it points to. So I decided to leave it to programmer. The other solution might be to make usage of those prefixes illegal in long mode, but in such case I shouldn't also add the CR9-CR15 registers for example, since those opcodes are also illegal.
|
|||
![]() |
|
revolution
The AMD manual "AMD64 Architecture Programmer’s Manual Volume 3: General-Purpose and System Instructions" 24594 Rev. 3.10 February 2005 page 406 Table A-14 show all the CRx and DRx listed completely up to number 15.
Quote: making assembler remove the ES: setting for you might make you think that it is the same as DS: |
|||
![]() |
|
Tomasz Grysztar
ES prefix is ignored so you end up using standard addressing space. But the selectors and descriptors pointed to by DS and ES can be different (even though ignored), thus I felt it's better to leave it to programmer to realize what is he doing - he just shouldn't use any such segment overrides in long mode.
As for the manuals - yes, there have been some updates to the printed ones I have, including RDTSCP instruction, I had to download the new PDF version. |
|||
![]() |
|
revolution
I downloaded the latest version of 1.64 (5 September 2005). I'm having a problem with programming CR8. The REX prefix is missing from the generated code.
Code: use64 mov cr8,rax ; <-- Missing REX prefix mov cr9,rax ; <-- Missing REX prefix mov cr10,rax ; <-- Missing REX prefix mov cr11,rax ; <-- Missing REX prefix mov cr12,rax ; <-- Missing REX prefix mov cr13,rax ; <-- Missing REX prefix mov cr14,rax ; <-- Missing REX prefix mov cr15,rax ; <-- Missing REX prefix mov dr8,rax ; <-- Missing REX prefix mov dr9,rax ; <-- Missing REX prefix mov dr10,rax ; <-- Missing REX prefix mov dr11,rax ; <-- Missing REX prefix mov dr12,rax ; <-- Missing REX prefix mov dr13,rax ; <-- Missing REX prefix mov dr14,rax ; <-- Missing REX prefix mov dr15,rax ; <-- Missing REX prefix Quote: he just shouldn't use any such segment overrides in long mode |
|||
![]() |
|
Tomasz Grysztar
Sorry, I have not much time for assembly now and the updates were a bit in a hurry.
The code generation just retains the consistency of the compatibility modes (classic ones, note the SS:BP etc.), to keep it as much compatible and predictable as possible. The ignoring of some of the segment prefixes in long mode I treat more like an execution specifics of long mode rather than instruction encoding specifics - like the division by zero or something like that. |
|||
![]() |
|
tom tobias
Tomasz Grysztar wrote: Sorry, I have not much time for assembly now .... ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.