@@ -139,7 +139,7 @@ namespace {
139
139
#endif
140
140
} // namespace
141
141
142
- #ifdef V8_TARGET_OS_WIN
142
+ #if defined( V8_TARGET_OS_WIN) && defined(V8_TARGET_ARCH_X64)
143
143
// As defined in
144
144
// https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=vs-2019#parameter-passing,
145
145
// Windows calling convention doesn't differentiate between GP and FP params
@@ -176,11 +176,12 @@ void BuildParameterLocations(const MachineSignature* msig,
176
176
}
177
177
}
178
178
}
179
- #else // V8_TARGET_OS_WIN
179
+ #else // defined( V8_TARGET_OS_WIN) && defined(V8_TARGET_ARCH_X64)
180
180
// As defined in https://www.agner.org/optimize/calling_conventions.pdf,
181
181
// Section 7, Linux and Mac place parameters in consecutive registers,
182
182
// differentiating between GP and FP params. That's why we maintain two
183
- // separate counters here.
183
+ // separate counters here. This also applies to Arm systems following
184
+ // the AAPCS and Windows on Arm.
184
185
void BuildParameterLocations (const MachineSignature* msig,
185
186
size_t kFPParamRegisterCount ,
186
187
size_t kParamRegisterCount ,
@@ -216,7 +217,7 @@ void BuildParameterLocations(const MachineSignature* msig,
216
217
}
217
218
}
218
219
}
219
- #endif // V8_TARGET_OS_WIN
220
+ #endif // defined( V8_TARGET_OS_WIN) && defined(V8_TARGET_ARCH_X64)
220
221
221
222
// General code uses the above configuration data.
222
223
CallDescriptor* Linkage::GetSimplifiedCDescriptor (Zone* zone,
0 commit comments