# Class: com.pnfsoftware.jeb.core.units.code.asm.type.CallingConventionUtil

Utility routines for calling convention objects.

## Static Method: getInputRegisters
- parameter: `cc`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention`
- parameter: `endian`, type: `com.pnfsoftware.jeb.util.io.Endianness`
- return type: `java.util.Set<java.lang.Long>`

Description: Get input registers used by a calling convention.
parameter: cc: calling convention
parameter: endian: endianness used for endian\-dependent register pairs
return: a set of native register ids

## Static Method: getOrderedSingleInputRegisters
- parameter: `cc`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention`
- parameter: `endian`, type: `com.pnfsoftware.jeb.util.io.Endianness`
- return type: `java.util.Collection<java.lang.Long>`

Description: Get single\-register input slots in declaration order.
parameter: cc: calling convention
parameter: endian: endianness used for endian\-dependent storage entries
return: ordered native register identifiers

## Static Method: getOrderedSingleOutputRegisters
- parameter: `cc`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention`
- parameter: `endian`, type: `com.pnfsoftware.jeb.util.io.Endianness`
- return type: `java.util.Collection<java.lang.Long>`

Description: Get single\-register output slots in declaration order.
parameter: cc: calling convention
parameter: endian: endianness used for endian\-dependent storage entries
return: ordered native register identifiers

## Static Method: getOutputRegisters
- parameter: `cc`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention`
- parameter: `endian`, type: `com.pnfsoftware.jeb.util.io.Endianness`
- return type: `java.util.Set<java.lang.Long>`

Description: Get output registers used by a calling convention.
parameter: cc: calling convention
parameter: endian: endianness used for endian\-dependent register pairs
return: a set of native register ids

## Static Method: getParameterIndexByArgumentStackOffset
- parameter: `cc`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention`
- parameter: `proto`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IPrototypeItem`
- parameter: `stackOffset`, type: `int`
- parameter: `stackSlotSize`, type: `int`
- return type: `int`

Description: Given a calling convention and a stack offset, determine a method's parameter index \(if the parameter is on the stack on of course\).
parameter: cc: calling convention
parameter: proto: prototype whose parameters are examined
parameter: stackOffset: argument stack offset
parameter: stackSlotSize: size of one stack slot, in bytes
return: \-1 if undetermined

## Static Method: getParameterRegisters
- parameter: `ccManager`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConventionManager`
- parameter: `endian`, type: `com.pnfsoftware.jeb.util.io.Endianness`
- return type: `java.util.Set<java.lang.Long>`

Description: Collect parameter registers from all defined calling conventions in the given manager.
parameter: ccManager: calling convention manager
parameter: endian: endianness used for endian\-dependent register pairs
return: ids of the registers used as parameter in the known calling conventions

## Static Method: getSpoiledRegisters
- parameter: `ccManager`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConventionManager`
- return type: `java.util.Set<java.lang.Long>`

Description: Collect spoiled registers from all defined calling conventions in the given manager.
parameter: ccManager: calling convention manager
return: ids of the registers used as parameter in the known calling conventions

## Static Method: isValidForProcessor
- parameter: `cc`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention`
- parameter: `candidateProcessors`, type: `java.util.List<com.pnfsoftware.jeb.core.units.codeobject.ProcessorType>`
- return type: `boolean`

Description: Determine whether a calling convention is compatible with one of the candidate processors.
parameter: cc: calling convention
parameter: candidateProcessors: candidate processor types
return: true if the convention has no processor restriction or matches a candidate processor

## Static Method: parse
- parameter: `data`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.CallingConventionBuilder`

Description: Parse and create a new calling convention object.
parameter: data: definition of a calling convention, formatted as yaml data \(see doc\)
return: a calling convention object \(the method throws [IllegalArgumentException](IllegalArgumentException) on         error\)

## Static Method: parseAndBuild
- parameter: `data`, type: `java.lang.String`
- parameter: `build`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention`

Description: Parse a calling convention definition and optionally build it.
parameter: data: calling convention definition, formatted as YAML data
parameter: build: true to build the convention object
return: parsed calling convention

