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.runtime;
014
015import org.jikesrvm.classloader.Atom;
016
017/**
018 * Method names that are treated specially by compiler.
019 * <p>
020 * See also: Magic, various magic compilers.
021 */
022public class MagicNames {
023
024  public static final Atom invokeClassInitializer = Atom.findOrCreateAsciiAtom("invokeClassInitializer");
025  public static final Atom invokeMethodReturningVoid = Atom.findOrCreateAsciiAtom("invokeMethodReturningVoid");
026  public static final Atom invokeMethodReturningInt = Atom.findOrCreateAsciiAtom("invokeMethodReturningInt");
027  public static final Atom invokeMethodReturningLong = Atom.findOrCreateAsciiAtom("invokeMethodReturningLong");
028  public static final Atom invokeMethodReturningFloat = Atom.findOrCreateAsciiAtom("invokeMethodReturningFloat");
029  public static final Atom invokeMethodReturningDouble =
030      Atom.findOrCreateAsciiAtom("invokeMethodReturningDouble");
031  public static final Atom invokeMethodReturningObject =
032      Atom.findOrCreateAsciiAtom("invokeMethodReturningObject");
033
034  public static final Atom getFramePointer = Atom.findOrCreateAsciiAtom("getFramePointer");
035  public static final Atom getTocPointer = Atom.findOrCreateAsciiAtom("getTocPointer");
036  public static final Atom getJTOC = Atom.findOrCreateAsciiAtom("getJTOC");
037  public static final Atom getThreadRegister = Atom.findOrCreateAsciiAtom("getThreadRegister");
038  public static final Atom setThreadRegister = Atom.findOrCreateAsciiAtom("setThreadRegister");
039  /* IA-specific */
040  public static final Atom getESIAsThread = Atom.findOrCreateAsciiAtom("getESIAsThread");
041  public static final Atom setESIAsThread = Atom.findOrCreateAsciiAtom("setESIAsThread");
042
043  public static final Atom getTimeBase = Atom.findOrCreateAsciiAtom("getTimeBase");
044
045  public static final Atom getCallerFramePointer = Atom.findOrCreateAsciiAtom("getCallerFramePointer");
046  public static final Atom setCallerFramePointer = Atom.findOrCreateAsciiAtom("setCallerFramePointer");
047  public static final Atom getCompiledMethodID = Atom.findOrCreateAsciiAtom("getCompiledMethodID");
048  public static final Atom setCompiledMethodID = Atom.findOrCreateAsciiAtom("setCompiledMethodID");
049  public static final Atom getNextInstructionAddress = Atom.findOrCreateAsciiAtom("getNextInstructionAddress");
050  public static final Atom getReturnAddressLocation = Atom.findOrCreateAsciiAtom("getReturnAddressLocation");
051
052  public static final Atom loadPrefix = Atom.findOrCreateAsciiAtom("load");
053  public static final Atom loadByte = Atom.findOrCreateAsciiAtom("loadByte");
054  public static final Atom loadChar = Atom.findOrCreateAsciiAtom("loadChar");
055  public static final Atom loadInt = Atom.findOrCreateAsciiAtom("loadInt");
056  public static final Atom loadWord = Atom.findOrCreateAsciiAtom("loadWord");
057  public static final Atom loadObject = Atom.findOrCreateAsciiAtom("loadObject");
058  public static final Atom loadAddress = Atom.findOrCreateAsciiAtom("loadAddress");
059  public static final Atom loadShort = Atom.findOrCreateAsciiAtom("loadShort");
060  public static final Atom loadFloat = Atom.findOrCreateAsciiAtom("loadFloat");
061  public static final Atom loadLong = Atom.findOrCreateAsciiAtom("loadLong");
062  public static final Atom loadDouble = Atom.findOrCreateAsciiAtom("loadDouble");
063  public static final Atom loadObjectReference = Atom.findOrCreateAsciiAtom("loadObjectReference");
064  public static final Atom store = Atom.findOrCreateAsciiAtom("store");
065  public static final Atom pause = Atom.findOrCreateAsciiAtom("pause");
066  public static final Atom sqrt  = Atom.findOrCreateAsciiAtom("sqrt");
067
068  public static final Atom getInlineDepth = Atom.findOrCreateAsciiAtom("getInlineDepth");
069  public static final Atom isConstantParameter = Atom.findOrCreateAsciiAtom("isConstantParameter");
070
071  public static final Atom getUnsignedByteAtOffset = Atom.findOrCreateAsciiAtom("getUnsignedByteAtOffset");
072  public static final Atom getByteAtOffset = Atom.findOrCreateAsciiAtom("getByteAtOffset");
073  public static final Atom getCharAtOffset = Atom.findOrCreateAsciiAtom("getCharAtOffset");
074  public static final Atom getShortAtOffset = Atom.findOrCreateAsciiAtom("getShortAtOffset");
075  public static final Atom getIntAtOffset = Atom.findOrCreateAsciiAtom("getIntAtOffset");
076  public static final Atom getLongAtOffset = Atom.findOrCreateAsciiAtom("getLongAtOffset");
077  public static final Atom getFloatAtOffset = Atom.findOrCreateAsciiAtom("getFloatAtOffset");
078  public static final Atom getDoubleAtOffset = Atom.findOrCreateAsciiAtom("getDoubleAtOffset");
079  public static final Atom getWordAtOffset = Atom.findOrCreateAsciiAtom("getWordAtOffset");
080  public static final Atom getAddressAtOffset = Atom.findOrCreateAsciiAtom("getAddressAtOffset");
081  public static final Atom getExtentAtOffset = Atom.findOrCreateAsciiAtom("getExtentAtOffset");
082  public static final Atom getOffsetAtOffset = Atom.findOrCreateAsciiAtom("getOffsetAtOffset");
083  public static final Atom getObjectAtOffset = Atom.findOrCreateAsciiAtom("getObjectAtOffset");
084  public static final Atom getTIBAtOffset = Atom.findOrCreateAsciiAtom("getTIBAtOffset");
085  public static final Atom setBooleanAtOffset = Atom.findOrCreateAsciiAtom("setBooleanAtOffset");
086  public static final Atom setByteAtOffset = Atom.findOrCreateAsciiAtom("setByteAtOffset");
087  public static final Atom setCharAtOffset = Atom.findOrCreateAsciiAtom("setCharAtOffset");
088  public static final Atom setShortAtOffset = Atom.findOrCreateAsciiAtom("setShortAtOffset");
089  public static final Atom setIntAtOffset = Atom.findOrCreateAsciiAtom("setIntAtOffset");
090  public static final Atom setLongAtOffset = Atom.findOrCreateAsciiAtom("setLongAtOffset");
091  public static final Atom setFloatAtOffset = Atom.findOrCreateAsciiAtom("setFloatAtOffset");
092  public static final Atom setDoubleAtOffset = Atom.findOrCreateAsciiAtom("setDoubleAtOffset");
093  public static final Atom setWordAtOffset = Atom.findOrCreateAsciiAtom("setWordAtOffset");
094  public static final Atom setAddressAtOffset = Atom.findOrCreateAsciiAtom("setAddressAtOffset");
095  public static final Atom setOffsetAtOffset = Atom.findOrCreateAsciiAtom("setOffsetAtOffset");
096  public static final Atom setExtentAtOffset = Atom.findOrCreateAsciiAtom("setExtentAtOffset");
097  public static final Atom setObjectAtOffset = Atom.findOrCreateAsciiAtom("setObjectAtOffset");
098
099  public static final Atom getMemoryInt = Atom.findOrCreateAsciiAtom("getMemoryInt");
100  public static final Atom setMemoryInt = Atom.findOrCreateAsciiAtom("setMemoryInt");
101  public static final Atom getMemoryWord = Atom.findOrCreateAsciiAtom("getMemoryWord");
102  public static final Atom setMemoryWord = Atom.findOrCreateAsciiAtom("setMemoryWord");
103  public static final Atom getMemoryAddress = Atom.findOrCreateAsciiAtom("getMemoryAddress");
104
105  public static final Atom preparePrefix = Atom.findOrCreateAsciiAtom("prepare");
106  public static final Atom prepareInt = Atom.findOrCreateAsciiAtom("prepareInt");
107  public static final Atom prepareObject = Atom.findOrCreateAsciiAtom("prepareObject");
108  public static final Atom prepareObjectReference = Atom.findOrCreateAsciiAtom("prepareObjectReference");
109  public static final Atom prepareAddress = Atom.findOrCreateAsciiAtom("prepareAddress");
110  public static final Atom prepareWord = Atom.findOrCreateAsciiAtom("prepareWord");
111  public static final Atom prepareLong = Atom.findOrCreateAsciiAtom("prepareLong");
112  public static final Atom attempt = Atom.findOrCreateAsciiAtom("attempt");
113  public static final Atom attemptInt = Atom.findOrCreateAsciiAtom("attemptInt");
114  public static final Atom attemptObject = Atom.findOrCreateAsciiAtom("attemptObject");
115  public static final Atom attemptObjectReference = Atom.findOrCreateAsciiAtom("attemptObjectReference");
116  public static final Atom attemptAddress = Atom.findOrCreateAsciiAtom("attemptAddress");
117  public static final Atom attemptWord = Atom.findOrCreateAsciiAtom("attemptWord");
118  public static final Atom attemptLong = Atom.findOrCreateAsciiAtom("attemptLong");
119
120  public static final Atom saveThreadState = Atom.findOrCreateAsciiAtom("saveThreadState");
121  public static final Atom threadSwitch = Atom.findOrCreateAsciiAtom("threadSwitch");
122  public static final Atom restoreHardwareExceptionState =
123      Atom.findOrCreateAsciiAtom("restoreHardwareExceptionState");
124  public static final Atom returnToNewStack = Atom.findOrCreateAsciiAtom("returnToNewStack");
125  public static final Atom dynamicBridgeTo = Atom.findOrCreateAsciiAtom("dynamicBridgeTo");
126
127  public static final Atom objectAsAddress = Atom.findOrCreateAsciiAtom("objectAsAddress");
128  public static final Atom addressAsObject = Atom.findOrCreateAsciiAtom("addressAsObject");
129  public static final Atom addressAsTIB = Atom.findOrCreateAsciiAtom("addressAsTIB");
130  public static final Atom objectAsType = Atom.findOrCreateAsciiAtom("objectAsType");
131  public static final Atom addressAsByteArray = Atom.findOrCreateAsciiAtom("addressAsByteArray");
132  public static final Atom objectAsShortArray = Atom.findOrCreateAsciiAtom("objectAsShortArray");
133  public static final Atom objectAsIntArray = Atom.findOrCreateAsciiAtom("objectAsIntArray");
134  public static final Atom codeArrayAsObject = Atom.findOrCreateAsciiAtom("codeArrayAsObject");
135  public static final Atom tibAsObject = Atom.findOrCreateAsciiAtom("tibAsObject");
136
137  public static final Atom objectAsThread = Atom.findOrCreateAsciiAtom("objectAsThread");
138  public static final Atom floatAsIntBits = Atom.findOrCreateAsciiAtom("floatAsIntBits");
139  public static final Atom intBitsAsFloat = Atom.findOrCreateAsciiAtom("intBitsAsFloat");
140  public static final Atom doubleAsLongBits = Atom.findOrCreateAsciiAtom("doubleAsLongBits");
141  public static final Atom longBitsAsDouble = Atom.findOrCreateAsciiAtom("longBitsAsDouble");
142
143  public static final Atom getObjectType = Atom.findOrCreateAsciiAtom("getObjectType");
144  public static final Atom getArrayLength = Atom.findOrCreateAsciiAtom("getArrayLength");
145
146  public static final Atom fence = Atom.findOrCreateAsciiAtom("fence");
147  public static final Atom combinedLoadBarrier = Atom.findOrCreateAsciiAtom("combinedLoadBarrier");
148  public static final Atom storeStoreBarrier = Atom.findOrCreateAsciiAtom("storeStoreBarrier");
149  public static final Atom sync = Atom.findOrCreateAsciiAtom("sync");
150  public static final Atom isync = Atom.findOrCreateAsciiAtom("isync");
151  public static final Atom prefetch = Atom.findOrCreateAsciiAtom("prefetch");
152  /* IA-specific */
153  public static final Atom prefetchNTA = Atom.findOrCreateAsciiAtom("prefetchNTA");
154  /* PowerPC-specific */
155  public static final Atom dcbst = Atom.findOrCreateAsciiAtom("dcbst");
156  public static final Atom dcbt = Atom.findOrCreateAsciiAtom("dcbt");
157  public static final Atom dcbtst = Atom.findOrCreateAsciiAtom("dcbtst");
158  public static final Atom dcbz = Atom.findOrCreateAsciiAtom("dcbz");
159  public static final Atom dcbzl = Atom.findOrCreateAsciiAtom("dcbzl");
160  public static final Atom icbi = Atom.findOrCreateAsciiAtom("icbi");
161
162  // atoms related to Word, Address, Offset, Extent
163  public static final Atom wordFromObject = Atom.findOrCreateAsciiAtom("fromObject");
164  public static final Atom wordFromInt = Atom.findOrCreateAsciiAtom("fromInt");
165  public static final Atom wordFromIntZeroExtend = Atom.findOrCreateAsciiAtom("fromIntZeroExtend");
166  public static final Atom wordFromIntSignExtend = Atom.findOrCreateAsciiAtom("fromIntSignExtend");
167  public static final Atom wordFromLong = Atom.findOrCreateAsciiAtom("fromLong");
168  public static final Atom wordToObject = Atom.findOrCreateAsciiAtom("toObject");
169  public static final Atom wordToObjectReference = Atom.findOrCreateAsciiAtom("toObjectReference");
170  public static final Atom wordToInt = Atom.findOrCreateAsciiAtom("toInt");
171  public static final Atom wordToLong = Atom.findOrCreateAsciiAtom("toLong");
172  public static final Atom wordToWord = Atom.findOrCreateAsciiAtom("toWord");
173  public static final Atom wordToAddress = Atom.findOrCreateAsciiAtom("toAddress");
174  public static final Atom wordToOffset = Atom.findOrCreateAsciiAtom("toOffset");
175  public static final Atom wordToExtent = Atom.findOrCreateAsciiAtom("toExtent");
176  public static final Atom wordPlus = Atom.findOrCreateAsciiAtom("plus");
177  public static final Atom wordMinus = Atom.findOrCreateAsciiAtom("minus");
178  public static final Atom wordDiff = Atom.findOrCreateAsciiAtom("diff");
179  public static final Atom wordEQ = Atom.findOrCreateAsciiAtom("EQ");
180  public static final Atom wordNE = Atom.findOrCreateAsciiAtom("NE");
181  public static final Atom wordLT = Atom.findOrCreateAsciiAtom("LT");
182  public static final Atom wordLE = Atom.findOrCreateAsciiAtom("LE");
183  public static final Atom wordGT = Atom.findOrCreateAsciiAtom("GT");
184  public static final Atom wordGE = Atom.findOrCreateAsciiAtom("GE");
185  public static final Atom wordsLT = Atom.findOrCreateAsciiAtom("sLT");
186  public static final Atom wordsLE = Atom.findOrCreateAsciiAtom("sLE");
187  public static final Atom wordsGT = Atom.findOrCreateAsciiAtom("sGT");
188  public static final Atom wordsGE = Atom.findOrCreateAsciiAtom("sGE");
189  public static final Atom wordZero = Atom.findOrCreateAsciiAtom("zero");
190  public static final Atom wordNull = Atom.findOrCreateAsciiAtom("nullReference");
191  public static final Atom wordOne = Atom.findOrCreateAsciiAtom("one");
192  public static final Atom wordMax = Atom.findOrCreateAsciiAtom("max");
193  public static final Atom wordIsNull = Atom.findOrCreateAsciiAtom("isNull");
194  public static final Atom wordIsZero = Atom.findOrCreateAsciiAtom("isZero");
195  public static final Atom wordIsMax = Atom.findOrCreateAsciiAtom("isMax");
196  public static final Atom wordAnd = Atom.findOrCreateAsciiAtom("and");
197  public static final Atom wordOr = Atom.findOrCreateAsciiAtom("or");
198  public static final Atom wordNot = Atom.findOrCreateAsciiAtom("not");
199  public static final Atom wordXor = Atom.findOrCreateAsciiAtom("xor");
200  public static final Atom wordLsh = Atom.findOrCreateAsciiAtom("lsh");
201  public static final Atom wordRshl = Atom.findOrCreateAsciiAtom("rshl");
202  public static final Atom wordRsha = Atom.findOrCreateAsciiAtom("rsha");
203
204  // atoms related to WordArray, AddressArray, OffsetArray, ExtentArray, CodeArray
205  public static final Atom addressArrayCreate = Atom.findOrCreateAsciiAtom("create");
206  public static final Atom addressArrayLength = Atom.findOrCreateAsciiAtom("length");
207  public static final Atom addressArrayGet = Atom.findOrCreateAsciiAtom("get");
208  public static final Atom addressArraySet = Atom.findOrCreateAsciiAtom("set");
209}