int statusWord = VM_Magic.prepareInt(o, STATUS_OFFSET); if ((statusWord & HASH_CODE_MASK) != 0) return (statusWord & HASH_CODE_MASK) >> HASH_CODE_SHIFT; if (VM_Magic.attemptInt(o, STATUS_OFFSET, statusWord, statusWord | hashCode)) return hashCode >> HASH_CODE_SHIFT;
VM_Word statusWord = VM_Magic.prepareWord(o, STATUS_OFFSET); if (!(statusWord.and(HASH_CODE_MASK).isZero())) return statusWord.and(HASH_CODE_MASK).rshl(HASH_CODE_SHIFT).toInt(); if (VM_Magic.attemptWord(o, STATUS_OFFSET, statusWord, statusWord.or(hashCode))) return hashCode.rshl(HASH_CODE_SHIFT).toInt();
  private static int installHashCode(Object o) throws VM_PragmaNoInline {    int hashCode;    do {      hashCodeGenerator += (1 << HASH_CODE_SHIFT);      hashCode = hashCodeGenerator & HASH_CODE_MASK;    } while (hashCode == 0);    while (true) {      int statusWord = VM_Magic.prepareInt(o, STATUS_OFFSET);      if ((statusWord & HASH_CODE_MASK) != 0) // some other thread installed a hashcode        return (statusWord & HASH_CODE_MASK) >> HASH_CODE_SHIFT;      if (VM_Magic.attemptInt(o, STATUS_OFFSET, statusWord, statusWord | hashCode))        return hashCode >> HASH_CODE_SHIFT;  // we installed the hash code    }  }