54 55 /** 56 * Gets the calling convention describing how arguments are passed. 57 * 58 * @param type the type of calling convention being requested 59 * @param returnType the return type (can be null for methods returning {@code void}) 60 * @param parameterTypes the types of the arguments of the call 61 * @param valueKindFactory the factory to create custom {@link ValueKind ValueKinds} 62 */ 63 CallingConvention getCallingConvention(Type type, JavaType returnType, JavaType[] parameterTypes, ValueKindFactory<?> valueKindFactory); 64 65 /** 66 * Gets the ordered set of registers that are can be used to pass parameters according to a 67 * given calling convention. 68 * 69 * @param type the type of calling convention 70 * @param kind specifies what kind of registers is being requested 71 * @return the ordered set of registers that may be used to pass parameters in a call conforming 72 * to {@code type} 73 */ 74 Register[] getCallingConventionRegisters(Type type, JavaKind kind); 75 76 /** 77 * Gets the set of all registers that might be used by the register allocator. 78 * 79 * To get the set of registers the register allocator is allowed to use see 80 * {@link RegisterAllocationConfig#getAllocatableRegisters()} 81 */ 82 @SuppressWarnings("javadoc") 83 Register[] getAllocatableRegisters(); 84 85 /** 86 * Filters a set of registers and returns only those that can be used by the register allocator 87 * for a value of a particular kind. 88 */ 89 Register[] filterAllocatableRegisters(PlatformKind kind, Register[] registers); 90 91 /** 92 * Gets the registers whose values must be preserved by a method across any call it makes. 93 */ 94 Register[] getCallerSaveRegisters(); 95 96 /** 97 * Gets the registers whose values must be preserved by the callee. 98 */ 99 Register[] getCalleeSaveRegisters(); 100 101 /** 102 * Gets a map from register {@linkplain Register#number numbers} to register 103 * {@linkplain RegisterAttributes attributes} for this register configuration. 104 * 105 * @return an array where an element at index i holds the attributes of the register whose 106 * number is i 107 */ 108 RegisterAttributes[] getAttributesMap(); 109 110 /** 111 * Determines if all {@link #getAllocatableRegisters() allocatable} registers are 112 * {@link #getCallerSaveRegisters() caller saved}. 113 */ 114 boolean areAllAllocatableRegistersCallerSaved(); 115 } | 54 55 /** 56 * Gets the calling convention describing how arguments are passed. 57 * 58 * @param type the type of calling convention being requested 59 * @param returnType the return type (can be null for methods returning {@code void}) 60 * @param parameterTypes the types of the arguments of the call 61 * @param valueKindFactory the factory to create custom {@link ValueKind ValueKinds} 62 */ 63 CallingConvention getCallingConvention(Type type, JavaType returnType, JavaType[] parameterTypes, ValueKindFactory<?> valueKindFactory); 64 65 /** 66 * Gets the ordered set of registers that are can be used to pass parameters according to a 67 * given calling convention. 68 * 69 * @param type the type of calling convention 70 * @param kind specifies what kind of registers is being requested 71 * @return the ordered set of registers that may be used to pass parameters in a call conforming 72 * to {@code type} 73 */ 74 RegisterArray getCallingConventionRegisters(Type type, JavaKind kind); 75 76 /** 77 * Gets the set of all registers that might be used by the register allocator. 78 * 79 * To get the set of registers the register allocator is allowed to use see 80 * {@link RegisterAllocationConfig#getAllocatableRegisters()} 81 */ 82 @SuppressWarnings("javadoc") 83 RegisterArray getAllocatableRegisters(); 84 85 /** 86 * Filters a set of registers and returns only those that can be used by the register allocator 87 * for a value of a particular kind. 88 */ 89 RegisterArray filterAllocatableRegisters(PlatformKind kind, RegisterArray registers); 90 91 /** 92 * Gets the registers whose values must be preserved by a method across any call it makes. 93 */ 94 RegisterArray getCallerSaveRegisters(); 95 96 /** 97 * Gets the registers whose values must be preserved by the callee. 98 */ 99 RegisterArray getCalleeSaveRegisters(); 100 101 /** 102 * Gets a map from register {@linkplain Register#number numbers} to register 103 * {@linkplain RegisterAttributes attributes} for this register configuration. 104 * 105 * @return an array where an element at index i holds the attributes of the register whose 106 * number is i 107 */ 108 RegisterAttributes[] getAttributesMap(); 109 110 /** 111 * Determines if all {@link #getAllocatableRegisters() allocatable} registers are 112 * {@link #getCallerSaveRegisters() caller saved}. 113 */ 114 boolean areAllAllocatableRegistersCallerSaved(); 115 } |