From 9c0e1a9216a3ab2080c7385039d7d0d79946d1dd Mon Sep 17 00:00:00 2001 From: "Steve MacLean, Qualcomm Datacenter Technologies, Inc" Date: Wed, 26 Apr 2017 22:39:03 +0000 Subject: [PATCH] [Arm64] Update emitOutputInstr to support GC refs in ldp forms Commit migrated from https://github.com/dotnet/coreclr/commit/47261a0e9b82b735d1efcbd8c0ca0a2a3a75b8c9 --- src/coreclr/src/jit/emitarm64.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/jit/emitarm64.cpp b/src/coreclr/src/jit/emitarm64.cpp index 0328cb6..1a56e86 100644 --- a/src/coreclr/src/jit/emitarm64.cpp +++ b/src/coreclr/src/jit/emitarm64.cpp @@ -9331,8 +9331,17 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp) { // INS_ldp etc... // We assume that "idReg1" and "idReg2" are the destination register for all instructions - emitGCregDeadUpd(id->idReg1(), dst); - emitGCregDeadUpd(id->idReg2(), dst); + // TODO-ARM64-CQ: Current limitations only allows using ldp/stp when both of the GC types match + if (id->idGCref() != GCT_NONE) + { + emitGCregLiveUpd(id->idGCref(), id->idReg1(), dst); + emitGCregLiveUpd(id->idGCref(), id->idReg2(), dst); + } + else + { + emitGCregDeadUpd(id->idReg1(), dst); + emitGCregDeadUpd(id->idReg2(), dst); + } } else { -- 2.7.4