Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/ffi/platforms/arm64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ extern "C" bool node_ffi_create_fast_trampoline(
if (IsFloatType(args[i])) {
fp_count++;
} else {
// The buffer helper call clobbers target registers already loaded for
// earlier arguments, so only a leading buffer argument is supported.
if (IsPointerValueType(args[i]) && gp_count != 0) {
return false;
}
gp_count++;
has_buffer_args = has_buffer_args || IsPointerValueType(args[i]);
}
Expand Down
5 changes: 5 additions & 0 deletions src/ffi/platforms/x64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ extern "C" bool node_ffi_create_fast_trampoline(
if (IsFloatType(args[i])) {
fp_count++;
} else {
// The buffer helper call clobbers target registers already loaded for
// earlier arguments, so only a leading buffer argument is supported.
if (IsPointerValueType(args[i]) && gp_count != 0) {
return false;
}
gp_count++;
has_buffer_args = has_buffer_args || IsPointerValueType(args[i]);
}
Expand Down
Loading