Skip to content

Commit

Permalink
Fix GC vars dump at call sites for arm/arm64 (#46056)
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceForstall authored Dec 15, 2020
1 parent 264af40 commit 35fbaef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/coreclr/jit/emitarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6404,6 +6404,14 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp)

emitUpdateLiveGCvars(GCvars, *dp);

#ifdef DEBUG
// Output any delta in GC variable info, corresponding to the before-call GC var updates done above.
if (EMIT_GC_VERBOSE || emitComp->opts.disasmWithGC)
{
emitDispGCVarDelta();
}
#endif // DEBUG

// If the method returns a GC ref, mark R0 appropriately.
if (id->idGCref() == GCT_GCREF)
gcrefRegs |= RBM_R0;
Expand Down
8 changes: 8 additions & 0 deletions src/coreclr/jit/emitarm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10158,6 +10158,14 @@ unsigned emitter::emitOutputCall(insGroup* ig, BYTE* dst, instrDesc* id, code_t

emitUpdateLiveGCvars(GCvars, dst);

#ifdef DEBUG
// Output any delta in GC variable info, corresponding to the before-call GC var updates done above.
if (EMIT_GC_VERBOSE || emitComp->opts.disasmWithGC)
{
emitDispGCVarDelta();
}
#endif // DEBUG

// Now output the call instruction and update the 'dst' pointer
//
unsigned outputInstrSize = emitOutput_Instr(dst, code);
Expand Down

0 comments on commit 35fbaef

Please sign in to comment.