< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java

Print this page

        

*** 35,54 **** * Invalid register. */ public static final Register None = new Register(-1, -1, "noreg", SPECIAL); /** - * Frame pointer of the current method. All spill slots and outgoing stack-based arguments are - * addressed relative to this register. - */ - public static final Register Frame = new Register(-2, -2, "framereg", SPECIAL); - - public static final Register CallerFrame = new Register(-3, -3, "callerframereg", SPECIAL); - - /** * The identifier for this register that is unique across all the registers in a ! * {@link Architecture}. A valid register has {@code number > 0}. */ public final int number; /** * The mnemonic of this register. --- 35,46 ---- * Invalid register. */ public static final Register None = new Register(-1, -1, "noreg", SPECIAL); /** * The identifier for this register that is unique across all the registers in a ! * {@link Architecture}. A valid register has {@code number >= 0}. */ public final int number; /** * The mnemonic of this register.
*** 163,204 **** */ public boolean isValid() { return number >= 0; } - /** - * Gets the maximum register {@linkplain #number number} in a given set of registers. - * - * @param registers the set of registers to process - * @return the maximum register number for any register in {@code registers} - */ - public static int maxRegisterNumber(Register[] registers) { - int max = Integer.MIN_VALUE; - for (Register r : registers) { - if (r.number > max) { - max = r.number; - } - } - return max; - } - - /** - * Gets the maximum register {@linkplain #encoding encoding} in a given set of registers. - * - * @param registers the set of registers to process - * @return the maximum register encoding for any register in {@code registers} - */ - public static int maxRegisterEncoding(Register[] registers) { - int max = Integer.MIN_VALUE; - for (Register r : registers) { - if (r.encoding > max) { - max = r.encoding; - } - } - return max; - } - @Override public String toString() { return name; } --- 155,164 ----
< prev index next >