mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-09 03:10:27 +00:00
Bare metal: do not use push/pop in long mode until stack set up
This patch fixes a random problem with text segment corruption that would crop up occasionally.
This commit is contained in:
parent
b5cb71ab84
commit
1c6aea2b05
1 changed files with 2 additions and 2 deletions
|
@ -1425,8 +1425,8 @@ golong: cli
|
||||||
|
|
||||||
// Long mode is long.
|
// Long mode is long.
|
||||||
.code64
|
.code64
|
||||||
long: push $GDT_LONG_DATA
|
long: xor %eax,%eax
|
||||||
pop %rax
|
mov $GDT_LONG_DATA,%al
|
||||||
mov %eax,%ds
|
mov %eax,%ds
|
||||||
mov %eax,%ss
|
mov %eax,%ss
|
||||||
mov %eax,%es
|
mov %eax,%es
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue