PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Unterschiede zwischen IA32e und AMD64 !


pippo
2004-02-29, 22:21:42
Wie Aceshardware aufgrund einer Nachricht von Jun Nakajima berichtet gibt es folgende Unterschiede:

[quote]
Fast system calls:
Syscall/sysret is supported only in 64-bit mode (not in compatibility mode). Sysenter/Sysexit is supported in both 64-bit and compatible mode.

Fast-FXSAVE/FXRSTOR:
IA-32e always saves all of the FP state on FXSAVE/FXRSTOR. Does not support FXSAVE/FXRSTOR with reduced FP state.

NX (No-Execute) bit:
Initial implementation will not support the NX bit.

BSF/BSR when source is 0 & operand size is 32:
In 64-bit mode, the processor sets ZF, and the upper 32 bits of the destination are undefined. Should always check the ZF or do not use 32-bit operand size.

Near branch with 66H prefix:
As documented in PRM the behavior is implementation specific and should avoid using 66H prefix on near branches.


Ich versteh zwar nicht, warum Intel auf das NX-bit verzichtet, aber mir solls recht sein
Weiß vielleicht jemand was der Rest zu bedeuten hat und ob es wichtig ist?

CrazyIvan
2004-02-29, 22:46:48
Der Rest sagt mir zwar auch nix, aber zum NX-Bit fällt mir ein, dass Pat Gelsinger das doch selbst noch auf dem IDF angekündigt hatte. Kann mir net vorstellen, dass die das jetzt wieder rausschmeißen. Druckfehler? Hat Gelsi keine Ahnung?

pippo
2004-02-29, 22:51:16
Mist, war schonwieder zu blöd zum quoten :)

Ich dachte auch, gehört zu haben, dass Intel das NX-bit unterstützen will. Hab eigentlich schon fest damit gerechnet, dass Intel da groß Werbung macht und als eine bahnbrechende Erfindung von ihnen hinstellt.

BlackBirdSR
2004-02-29, 22:56:54
Original geschrieben von CrazyIvan
Der Rest sagt mir zwar auch nix, aber zum NX-Bit fällt mir ein, dass Pat Gelsinger das doch selbst noch auf dem IDF angekündigt hatte. Kann mir net vorstellen, dass die das jetzt wieder rausschmeißen. Druckfehler? Hat Gelsi keine Ahnung?
wird doch demnächst nachgeliefert ;)

zeckensack
2004-02-29, 23:20:13
Original geschrieben von pippo
Weiß vielleicht jemand was der Rest zu bedeuten hat und ob es wichtig ist?
<...>
Fast system calls:
Syscall/sysret is supported only in 64-bit mode (not in compatibility mode). Sysenter/Sysexit is supported in both 64-bit and compatible mode.Schlecht ;)
Syscall/sysret ist gedacht für schnelle Ring-Wechsel, "call gates". Im Kompatibilitätsmodus wäre das IMO besonders wichtig (schnelle Kommunikation 32 Bit App <=> 64 Bit Treiber), aber dort ist es eben auch besonders schwer implementierbar.
Fast-FXSAVE/FXRSTOR:
IA-32e always saves all of the FP state on FXSAVE/FXRSTOR. Does not support FXSAVE/FXRSTOR with reduced FP state.Intel hat keinen Bock, die x87-FPU sterben zu lassen. Finde ich gut :)

BSF/BSR when source is 0 & operand size is 32:
In 64-bit mode, the processor sets ZF, and the upper 32 bits of the destination are undefined. Should always check the ZF or do not use 32-bit operand size.BSF/BSR sind bit scan forward, bzw bit scan reverse.
Dabei wird abgezählt, welches der Bits des Quell-Operanden das erste gesetzte Bit ist. Beispiel:

MOV EAX,160 ;binär 1010000
;Bit-Positionen: 6543210
BSF EBX,EAX ;EBX:=4

Die Intel-Implementierung setzt im Spezialfall Quelle==0 (=> Ergebnis=0 + Flag) die hohen Bits des Ergebnisses nicht. Das kann zu interessanten Effekten führen, wenn das Ergebnis zB für eine Adressberechnung benutzt wird. Workaround:

BSF EBX,EAX
MOVZX RBX,EBX
AMD setzt btw bei allen 32 Bit-Operationen die (ungenutzten) oberen 32 Bits des Ergebnisses auf Null (oder war's sign extend? vergessen ...).
Near branch with 66H prefix:
As documented in PRM the behavior is implementation specific and should avoid using 66H prefix on near branches.66h ist das "operand size override prefix", damit wählt man die Breite der Instruktion. Ohne alles sind die Operationen 32 bittig, mit Präfix 16 bittig (für 64 Bit und 8 Bit gibt's nochmal extra Präfixe).

Auf near branches hat das IMO funktional keinen Einfluss, allerdings kann der Decoder durch "unerwartete" Kombinationen von Präfix und Operation aus dem Tritt kommen.
Das ist insbesondere deshalb pikant, weil AMD für den K8 Serien von 66h mit abschliessendem NOP (90h) für Code-Padding empfiehlt.