Package ghidra.program.model.data
Enum GenericCallingConvention
- java.lang.Object
-
- java.lang.Enum<GenericCallingConvention>
-
- ghidra.program.model.data.GenericCallingConvention
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<GenericCallingConvention>
public enum GenericCallingConvention extends java.lang.Enum<GenericCallingConvention>
GenericCallingConvention
identifies the generic calling convention associated with a specific function definition. This can be used to help identify the appropriate compiler-specific function prototype (i.e., calling convention).
-
-
Enum Constant Summary
Enum Constants Enum Constant Description cdecl
The standard/default calling convention applies in which the stack is used to pass parametersfastcall
A standard/default calling convention applies in which only registers are used to pass parametersstdcall
A MS Windows specific calling convention applies in which the called-function is responsible for purging the stack.thiscall
A C++ instance method calling convention appliesunknown
The calling convention has not been identifiedvectorcall
Similar to fastcall but extended vector registers are used
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GenericCallingConvention
get(int ordinal)
Returns the GenericCallingConvention corresponding to the specified ordinal.java.lang.String
getDeclarationName()
static GenericCallingConvention
getGenericCallingConvention(java.lang.String callingConvention)
Returns the GenericCallingConvention corresponding to the specified type string or unknown.static GenericCallingConvention
guessFromName(java.lang.String callingConvention)
Returns the GenericCallingConvention which is likely to correspond with the specified prototype name.java.lang.String
toString()
static GenericCallingConvention
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static GenericCallingConvention[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
unknown
public static final GenericCallingConvention unknown
The calling convention has not been identified
-
stdcall
public static final GenericCallingConvention stdcall
A MS Windows specific calling convention applies in which the called-function is responsible for purging the stack.
-
cdecl
public static final GenericCallingConvention cdecl
The standard/default calling convention applies in which the stack is used to pass parameters
-
fastcall
public static final GenericCallingConvention fastcall
A standard/default calling convention applies in which only registers are used to pass parameters
-
thiscall
public static final GenericCallingConvention thiscall
A C++ instance method calling convention applies
-
vectorcall
public static final GenericCallingConvention vectorcall
Similar to fastcall but extended vector registers are used
-
-
Method Detail
-
values
public static GenericCallingConvention[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GenericCallingConvention c : GenericCallingConvention.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GenericCallingConvention valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getDeclarationName
public java.lang.String getDeclarationName()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<GenericCallingConvention>
-
getGenericCallingConvention
public static GenericCallingConvention getGenericCallingConvention(java.lang.String callingConvention)
Returns the GenericCallingConvention corresponding to the specified type string or unknown. Case and underscore prefix is ignored.- Parameters:
callingConvention
- calling convention name- Returns:
- GenericCallingConvention
-
guessFromName
public static GenericCallingConvention guessFromName(java.lang.String callingConvention)
Returns the GenericCallingConvention which is likely to correspond with the specified prototype name.- Parameters:
name
- compiler specific calling convention name- Returns:
- GenericCallingConvention
-
get
public static GenericCallingConvention get(int ordinal)
Returns the GenericCallingConvention corresponding to the specified ordinal.- Parameters:
ordinal
- generic calling convention ordinal- Returns:
- GenericCallingConvention
-
-