long value = addr.toLong();
long value = 0L; if (addr instanceof VM_Address) { value = ((VM_Address)addr).toLong(); } else if (addr instanceof VM_Word) { value = ((VM_Word)addr).toLong(); } else if (addr instanceof VM_Extent) { value = ((VM_Extent)addr).toLong(); } else if (addr instanceof VM_Offset) { value = ((VM_Offset)addr).toLong(); } else { VM.sysWriteln("Unhandled supposed address value: " +addr); VM.sysFail("incomplete boot image support"); }
  private static long getAddressValue(VM_Address addr, String msg, boolean warn) {    if (addr == null) return 0L;    long value = addr.toLong();    if (warn) check((int) value, msg);    return value;  }