fix: Rectangle.Intersect - #751
Merged
Merged
Conversation
Contributor
Author
|
link #680 |
Contributor
Author
|
For ensure all is inline .NET 8.0.30 (8.0.30, 8.0.3026.36720), X64 RyuJIT x86-64-v3 (Job: DefaultJob); Microsoft.Xna.Framework.Rectangle.Intersect1(Microsoft.Xna.Framework.Rectangle ByRef, Microsoft.Xna.Framework.Rectangle ByRef, Microsoft.Xna.Framework.Rectangle ByRef)
push rsi
push rbx
vzeroupper
mov eax,[rcx]
mov r10d,eax
add r10d,[rcx+8]
mov r9d,[rdx]
mov r11d,r9d
add r11d,[rdx+8]
cmp r10d,r11d
cmovg r10d,r11d
mov r11d,[rcx+4]
mov ebx,r11d
add ebx,[rcx+0C]
mov ecx,[rdx+4]
mov esi,ecx
add esi,[rdx+0C]
cmp ebx,esi
cmovg ebx,esi
cmp eax,r9d
cmovl eax,r9d
cmp r11d,ecx
cmovl r11d,ecx
cmp eax,r10d
jge short M01_L00
cmp r11d,ebx
jge short M01_L00
sub r10d,eax
sub ebx,r11d
mov [r8],eax
mov [r8+4],r11d
mov [r8+8],r10d
mov [r8+0C],ebx
pop rbx
pop rsi
ret
M01_L00:
vxorps xmm0,xmm0,xmm0
vmovdqu xmmword ptr [r8],xmm0
pop rbx
pop rsi
ret
; Total bytes of code 114 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Case:
XNA output:
FNA output: