-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unittests: Add a test for constprop size bugs
fails on main, fixed by this PR.
- Loading branch information
1 parent
29405f2
commit 766fbe3
Showing
1 changed file
with
26 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,26 @@ | ||
%ifdef CONFIG | ||
{ | ||
"RegData": { | ||
"RAX": "0x000000000f0f0f0f", | ||
"RBX": "0x000000000f0f0f0f", | ||
"RCX": "0x000000000f0f0f0f", | ||
"RDX": "0x00000000ffffffff", | ||
"R9": "0x000000000f0f0f0f" | ||
} | ||
} | ||
%endif | ||
|
||
; FEX had several bugs in its constprop pass where 32->64 bit truncation behaviour wasn't accounted for leading | ||
; to incorrectly inserting instead. | ||
|
||
mov rax, 0x0f0f0f0f0f0f0f0f | ||
mov rbx, 0x0f0f0f0f0f0f0f0f | ||
mov rcx, 0x0f0f0f0f0f0f0f0f | ||
mov rdx, 1 | ||
mov r9, 0x0f0f0f0f0f0f0f0f | ||
xor eax, 0 | ||
and ebx, ebx | ||
shr ecx, 0 | ||
neg edx | ||
shl r9d, 0 | ||
hlt |