[vm, compiler] Don't clobber R18 during CCallInstr on Fuchsia ARM64.

Cf. 5380fa5d40.

TEST=local
Bug: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=105336
Change-Id: Id025e40e6153570ee88f2daa47be6f12ff9b5822
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255548
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak 2022-08-18 20:28:26 +00:00 committed by Commit Bot
parent 1f3ff13d98
commit 4a621f5c48

View file

@ -1582,7 +1582,8 @@ void NativeEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
LocationSummary* CCallInstr::MakeLocationSummary(Zone* zone, LocationSummary* CCallInstr::MakeLocationSummary(Zone* zone,
bool is_optimizing) const { bool is_optimizing) const {
constexpr Register saved_csp = kAbiFirstPreservedCpuReg; // Compare FfiCallInstr's use of kFfiAnyNonAbiRegister.
constexpr Register saved_csp = CallingConventions::kFfiAnyNonAbiRegister;
ASSERT(IsAbiPreservedRegister(saved_csp)); ASSERT(IsAbiPreservedRegister(saved_csp));
return MakeLocationSummaryInternal(zone, (R(saved_csp))); return MakeLocationSummaryInternal(zone, (R(saved_csp)));
} }