001 /*
002 * This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 * This file is licensed to You under the Common Public License (CPL);
005 * You may not use this file except in compliance with the License. You
006 * may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/cpl1.0.php
009 *
010 * See the COPYRIGHT.txt file distributed with this work for information
011 * regarding copyright ownership.
012 */
013 package org.vmmagic.unboxed;
014
015 /* machine-generated DO NOT EDIT */
016
017 import org.jikesrvm.VM;
018 import org.vmmagic.pragma.Interruptible;
019 import org.vmmagic.pragma.Uninterruptible;
020 import org.vmmagic.pragma.RawStorage;
021
022 @RawStorage(lengthInWords = true, length = 1)
023 @Uninterruptible
024 abstract class ArchitecturalWord {
025
026 protected final int value;
027 //protected final long value;
028
029 ArchitecturalWord() {
030 this.value = 0;
031 }
032 ArchitecturalWord(int value, boolean zeroExtend) {
033 this.value = value;
034 //this.value = (zeroExtend) ? ((long)value) & 0x00000000ffffffffL : value;
035 }
036
037 ArchitecturalWord(long value) {
038 VM._assert(VM.NOT_REACHED);
039 this.value = (int)value;
040 //this.value = value;
041 }
042
043 @Interruptible
044 public String toString() {
045 return ""+value;
046 }
047
048 public int hashCode() {
049 return (int)value;
050 }
051
052 public boolean equals(Object that) {
053 if (that instanceof ArchitecturalWord) {
054 return value == ((ArchitecturalWord)that).value;
055 } else {
056 return false;
057 }
058 }
059 }