Skip to content

Commit

Permalink
GP-5216 Correct BSim signature apply bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ghidra1 committed Dec 21, 2024
1 parent d3e34f9 commit dacc9b2
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,16 +381,17 @@ private static String determineCallingConventionName(Function destinationFunctio
return sourceConv;
}
boolean applyConventionName = sameLanguageAndCompilerSpec;
if (applyConventionName) {
String callingConvention = sourceFunction.getCallingConventionName();
if (applyConventionName &&
!CompilerSpec.CALLING_CONVENTION_default.equals(callingConvention)) {
DataTypeManager dtMgr = destinationFunction.getProgram().getDataTypeManager();
String name = destinationFunction.getCallingConventionName();
if (GenericCallingConvention
.getGenericCallingConvention(name) == GenericCallingConvention.unknown &&
!dtMgr.getKnownCallingConventionNames().contains(name)) {
if (GenericCallingConvention.getGenericCallingConvention(
callingConvention) == GenericCallingConvention.unknown &&
!dtMgr.getKnownCallingConventionNames().contains(callingConvention)) {
applyConventionName = false;
}
}
return applyConventionName ? sourceFunction.getCallingConventionName()
return applyConventionName ? callingConvention
: destinationFunction.getCallingConventionName();
}

Expand Down

0 comments on commit dacc9b2

Please sign in to comment.