-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
asm test: Ensure predicate cache is reset when control flow leaves block
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
%ifdef CONFIG | ||
{ | ||
"RegData": { | ||
"RBX": "0x8000000000000000", | ||
"RCX": "0x3fff" | ||
} | ||
} | ||
%endif | ||
|
||
; Related to #4274 - ensures that if cpuid clobbers the predicate register, | ||
; we reset the predicate cache. | ||
|
||
section .data | ||
align 8 | ||
|
||
data: | ||
dt 1.0 | ||
|
||
section .bss | ||
align 8 | ||
|
||
data2: | ||
resb 10 | ||
|
||
section .text | ||
lea r8, [rel data] | ||
fld tword [r8] | ||
|
||
mov rax, 0x0 | ||
cpuid ; Will this instruction clobber the predicate register? | ||
|
||
fstp tword [rel data2] | ||
|
||
mov rbx, [rel data2] | ||
mov rcx, [rel data2+8] | ||
hlt |