mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-08 19:00: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.
|
||||
.code64
|
||||
long: push $GDT_LONG_DATA
|
||||
pop %rax
|
||||
long: xor %eax,%eax
|
||||
mov $GDT_LONG_DATA,%al
|
||||
mov %eax,%ds
|
||||
mov %eax,%ss
|
||||
mov %eax,%es
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue