Skip to content

Commit

Permalink
[IGC vISA] Minor code change in getFPSPGRF().
Browse files Browse the repository at this point in the history
Minor code change in getFPSPGRF().
  • Loading branch information
fangliu2020 authored and igcbot committed Sep 12, 2023
1 parent 7a295ef commit be078e2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions visa/G4_Kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,12 +861,17 @@ uint32_t StackCallABI::numReservedABIGRF() const {
}

uint32_t StackCallABI::getFPSPGRF() const {
// For ABI V1 return r125.
// For ABI V2, V3 return r127.
if (version == StackCallABIVersion::VER_1)
// For ABI V1, return (numRegTotal - 3), i.e. 125.
// For ABI V2, return (numRegTotal - 1), i.e. 127, 255.
// For ABI V3, return (numRegTotal - 1), i.e. 127, 255.

if (version == StackCallABIVersion::VER_1) {
return getStackCallStartReg() + FPSPGRF;
else
} else if (version == StackCallABIVersion::VER_2) {
return (kernel->getNumRegTotal() - 1) - FPSPGRF;
} else {
return (kernel->getNumRegTotal() - 1) - FPSPGRF;
}
}

uint32_t StackCallABI::getSpillHeaderGRF() const {
Expand Down

0 comments on commit be078e2

Please sign in to comment.