Skip to content

Commit b01b32a

Browse files
authored
fixes (VSadov#58)
1 parent ef97fab commit b01b32a

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/coreclr/nativeaot/Runtime/amd64/WriteBarriers.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,12 +518,12 @@ ALTERNATE_ENTRY RhpAssignRefAVLocation
518518
// also save xmm0, in case it is used for stack clearing, as JIT_ByRefWriteBarrier should not trash xmm0
519519
// Hopefully EscapeFn cannot corrupt other xmm regs, since there is no float math or vectorizable code in there.
520520
sub rsp, 16
521-
movdqu [rsp], xmm0
521+
movdqa [rsp], xmm0
522522

523523
// void SatoriRegion::EscapeFn(SatoriObject** dst, SatoriObject* src, SatoriRegion* region)
524524
call qword ptr [rdx + 8]
525525

526-
movdqu xmm0, [rsp]
526+
movdqa xmm0, [rsp]
527527
add rsp, 16
528528

529529
pop r10

src/coreclr/nativeaot/Runtime/amd64/WriteBarriers.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ ALTERNATE_ENTRY RhpAssignRefAVLocation
517517
; also save xmm0, in case it is used for stack clearing, as JIT_ByRefWriteBarrier should not trash xmm0
518518
; Hopefully EscapeFn cannot corrupt other xmm regs, since there is no float math or vectorizable code in there.
519519
sub rsp, 16
520-
movdqu [rsp], xmm0
520+
movdqa [rsp], xmm0
521521

522522
; shadow space
523523
sub rsp, 20h
@@ -527,7 +527,7 @@ ALTERNATE_ENTRY RhpAssignRefAVLocation
527527

528528
add rsp, 20h
529529

530-
movdqu xmm0, [rsp]
530+
movdqa xmm0, [rsp]
531531
add rsp, 16
532532

533533
pop r8

src/coreclr/vm/amd64/patchedcode.S

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,12 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT
446446
// also save xmm0, in case it is used for stack clearing, as JIT_ByRefWriteBarrier should not trash xmm0
447447
// Hopefully EscapeFn cannot corrupt other xmm regs, since there is no float math or vectorizable code in there.
448448
sub rsp, 16
449-
movdqu [rsp], xmm0
449+
movdqa [rsp], xmm0
450450

451451
// void SatoriRegion::EscapeFn(SatoriObject** dst, SatoriObject* src, SatoriRegion* region)
452452
call qword ptr [rdx + 8]
453453

454-
movdqu xmm0, [rsp]
454+
movdqa xmm0, [rsp]
455455
add rsp, 16
456456

457457
pop r10
@@ -475,6 +475,7 @@ LEAF_END_MARKED JIT_WriteBarrier, _TEXT
475475
LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
476476
// See if dst is in GCHeap
477477
PREPARE_EXTERNAL_VAR g_card_bundle_table, rax // fetch the page byte map
478+
mov rax, [rax]
478479
mov rcx, rdi
479480
shr rcx, 30 // dst page index
480481
cmp byte ptr [rax + rcx], 0

src/coreclr/vm/amd64/patchedcode.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ endif
385385
; also save xmm0, in case it is used for stack clearing, as JIT_ByRefWriteBarrier should not trash xmm0
386386
; Hopefully EscapeFn cannot corrupt other xmm regs, since there is no float math or vectorizable code in there.
387387
sub rsp, 16
388-
movdqu [rsp], xmm0
388+
movdqa [rsp], xmm0
389389

390390
; shadow space
391391
sub rsp, 20h
@@ -395,7 +395,7 @@ endif
395395

396396
add rsp, 20h
397397

398-
movdqu xmm0, [rsp]
398+
movdqa xmm0, [rsp]
399399
add rsp, 16
400400

401401
pop r8

0 commit comments

Comments
 (0)