001/*
002 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 *  This file is licensed to You under the Eclipse Public License (EPL);
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/eclipse-1.0.php
009 *
010 *  See the COPYRIGHT.txt file distributed with this work for information
011 *  regarding copyright ownership.
012 */
013package org.jikesrvm.compilers.common.assembler.ia32;
014
015/**
016 * Constants exported by the assembler
017 */
018public final class AssemblerConstants {
019  public static final String[] CONDITION =
020      {"O", "NO", "LLT", "LGE", "EQ", "NE", "LLE", "LGT", "S", "NS", "PE", "PO", "LT", "GE", "LE", "GT"};
021
022  /** OF == 1 - overflow */
023  public static final byte O = 0x0;
024  /** OF == 0 - not overflow */
025  public static final byte NO = 0x1;
026  /** CF == 1 - logically less than (below) */
027  public static final byte LLT = 0x2;
028  /** CF == 0 - logically greater than or equal (not below) */
029  public static final byte LGE = 0x3;
030  /** ZF == 1 - equal (zero) */
031  public static final byte EQ = 0x4;
032  /** ZF == 0 - not equal (not zero) */
033  public static final byte NE = 0x5;
034  /**  CF == 1 or ZF == 1 - logically less than or equal (not above) */
035  public static final byte LLE = 0x6;
036  /** CF == 0 and ZF == 0 - logically greater than (above) */
037  public static final byte LGT = 0x7;
038  public static final byte S = 0x8; // SF == 1 - (sign) negative??
039  public static final byte NS = 0x9; // SF == 0 - (not sign) positive or zero??
040  /** PF == 1 - even parity or unordered floating point #s */
041  public static final byte PE = 0xA;
042  /**  PF == 0 - odd parity or ordered floating point #s */
043  public static final byte PO = 0xB;
044  /** SF != OF - less than */
045  public static final byte LT = 0xC;
046  /** SF == OF - greater than or equal (not less than) */
047  public static final byte GE = 0xD;
048  /** ZF == 1 or SF != OF - less than or equal (not greater than) */
049  public static final byte LE = 0xE;
050  /** ZF == 0 and SF == OF - greater than */
051  public static final byte GT = 0xF;
052
053  // scale factors for SIB bytes
054  public static final short BYTE = 0;
055  public static final short SHORT = 1;
056  public static final short WORD = 2;
057  public static final short LONG = 3;
058
059  private AssemblerConstants() {
060    // prevent instantiation
061  }
062
063}