src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File open Sdiff src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java

Print this page


   1 /*
   2  * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */


 174         return barriers & ~implicitMemoryBarriers;
 175     }
 176 
 177     /**
 178      * Determine whether a kind can be stored in a register of a given category.
 179      *
 180      * @param category the category of the register
 181      * @param kind the kind that should be stored in the register
 182      */
 183     public abstract boolean canStoreValue(RegisterCategory category, PlatformKind kind);
 184 
 185     /**
 186      * Return the largest kind that can be stored in a register of a given category.
 187      *
 188      * @param category the category of the register
 189      * @return the largest kind that can be stored in a register {@code category}
 190      */
 191     public abstract PlatformKind getLargestStorableKind(RegisterCategory category);
 192 
 193     /**
 194      * Return the {@link PlatformKind} that is used to store values of a given {@link JavaKind}.


 195      */
 196     public abstract PlatformKind getPlatformKind(JavaKind javaKind);
 197 
 198     @Override
 199     public final boolean equals(Object obj) {
 200         if (obj == this) {
 201             return true;
 202         }
 203         if (obj instanceof Architecture) {
 204             Architecture that = (Architecture) obj;
 205             if (this.name.equals(that.name)) {
 206                 assert this.byteOrder.equals(that.byteOrder);
 207                 assert this.implicitMemoryBarriers == that.implicitMemoryBarriers;
 208                 assert this.machineCodeCallDisplacementOffset == that.machineCodeCallDisplacementOffset;
 209                 assert this.registers.equals(that.registers);
 210                 assert this.returnAddressSize == that.returnAddressSize;
 211                 assert this.unalignedMemoryAccess == that.unalignedMemoryAccess;
 212                 assert this.wordKind == that.wordKind;
 213                 return true;
 214             }
   1 /*
   2  * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */


 174         return barriers & ~implicitMemoryBarriers;
 175     }
 176 
 177     /**
 178      * Determine whether a kind can be stored in a register of a given category.
 179      *
 180      * @param category the category of the register
 181      * @param kind the kind that should be stored in the register
 182      */
 183     public abstract boolean canStoreValue(RegisterCategory category, PlatformKind kind);
 184 
 185     /**
 186      * Return the largest kind that can be stored in a register of a given category.
 187      *
 188      * @param category the category of the register
 189      * @return the largest kind that can be stored in a register {@code category}
 190      */
 191     public abstract PlatformKind getLargestStorableKind(RegisterCategory category);
 192 
 193     /**
 194      * Gets the {@link PlatformKind} that is used to store values of a given {@link JavaKind}.
 195      *
 196      * @return {@code null} if there no deterministic {@link PlatformKind} for {@code javaKind}
 197      */
 198     public abstract PlatformKind getPlatformKind(JavaKind javaKind);
 199 
 200     @Override
 201     public final boolean equals(Object obj) {
 202         if (obj == this) {
 203             return true;
 204         }
 205         if (obj instanceof Architecture) {
 206             Architecture that = (Architecture) obj;
 207             if (this.name.equals(that.name)) {
 208                 assert this.byteOrder.equals(that.byteOrder);
 209                 assert this.implicitMemoryBarriers == that.implicitMemoryBarriers;
 210                 assert this.machineCodeCallDisplacementOffset == that.machineCodeCallDisplacementOffset;
 211                 assert this.registers.equals(that.registers);
 212                 assert this.returnAddressSize == that.returnAddressSize;
 213                 assert this.unalignedMemoryAccess == that.unalignedMemoryAccess;
 214                 assert this.wordKind == that.wordKind;
 215                 return true;
 216             }
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File