flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > RDTSCP instruction missing (and 64 bit problems) |
Author |
|
Tomasz Grysztar 05 Sep 2005, 09:16
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.
|
|||
05 Sep 2005, 09:16 |
|
revolution 05 Sep 2005, 09:36
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: |
|||
05 Sep 2005, 09:36 |
|
Tomasz Grysztar 05 Sep 2005, 09:57
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. |
|||
05 Sep 2005, 09:57 |
|
revolution 06 Sep 2005, 02:26
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 |
|||
06 Sep 2005, 02:26 |
|
Tomasz Grysztar 06 Sep 2005, 08:47
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. |
|||
06 Sep 2005, 08:47 |
|
tom tobias 06 Sep 2005, 18:00
Tomasz Grysztar wrote: Sorry, I have not much time for assembly now .... |
|||
06 Sep 2005, 18:00 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.