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 */ 013 package org.jikesrvm.runtime; 014 015 import org.jikesrvm.VM; 016 import org.jikesrvm.classloader.RVMField; 017 import org.jikesrvm.classloader.NormalMethod; 018 019 /** 020 * Entrypoints that are specific to instruction architecture. 021 */ 022 public interface ArchEntrypoints { 023 NormalMethod newArrayArrayMethod = 024 EntrypointHelper.getMethod("Lorg/jikesrvm/" + ArchEntrypoints.arch + "/MultianewarrayHelper;", "newArrayArray", "(IIII)Ljava/lang/Object;"); 025 String arch = VM.BuildForIA32 ? "ia32" : "ppc"; 026 String ArchCodeArrayName = "Lorg/jikesrvm/ArchitectureSpecific$CodeArray;"; 027 RVMField reflectiveMethodInvokerInstructionsField = 028 EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/OutOfLineMachineCode;", 029 "reflectiveMethodInvokerInstructions", 030 ArchCodeArrayName); 031 RVMField saveThreadStateInstructionsField = 032 EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/OutOfLineMachineCode;", "saveThreadStateInstructions", ArchCodeArrayName); 033 RVMField threadSwitchInstructionsField = 034 EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/OutOfLineMachineCode;", "threadSwitchInstructions", ArchCodeArrayName); 035 RVMField restoreHardwareExceptionStateInstructionsField = 036 EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/OutOfLineMachineCode;", 037 "restoreHardwareExceptionStateInstructions", 038 ArchCodeArrayName); 039 RVMField saveVolatilesInstructionsField = 040 (VM.BuildForPowerPC) ? 041 EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/OutOfLineMachineCode;", "saveVolatilesInstructions", ArchCodeArrayName) : null; 042 RVMField restoreVolatilesInstructionsField = 043 (VM.BuildForPowerPC) ? 044 EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/OutOfLineMachineCode;", "restoreVolatilesInstructions", ArchCodeArrayName) : null; 045 046 RVMField trampolineRegistersField = 047 EntrypointHelper.getField("Lorg/jikesrvm/scheduler/RVMThread;", "trampolineRegisters", "Lorg/jikesrvm/ArchitectureSpecific$Registers;"); 048 RVMField hijackedReturnAddressField = 049 EntrypointHelper.getField("Lorg/jikesrvm/scheduler/RVMThread;", "hijackedReturnAddress", "Lorg/vmmagic/unboxed/Address;"); 050 RVMField registersIPField = 051 EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/Registers;", "ip", "Lorg/vmmagic/unboxed/Address;"); 052 RVMField registersFPRsField = EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/Registers;", "fprs", "[D"); 053 RVMField registersGPRsField = 054 EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/Registers;", "gprs", "Lorg/vmmagic/unboxed/WordArray;"); 055 RVMField registersInUseField = EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/Registers;", "inuse", "Z"); 056 RVMField registersLRField = 057 (VM.BuildForPowerPC) ? EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/Registers;", 058 "lr", 059 "Lorg/vmmagic/unboxed/Address;") : null; 060 RVMField registersFPField = 061 (VM.BuildForIA32) ? EntrypointHelper.getField("Lorg/jikesrvm/" + arch + "/Registers;", 062 "fp", 063 "Lorg/vmmagic/unboxed/Address;") : null; 064 RVMField framePointerField = 065 (VM.BuildForIA32) ? EntrypointHelper.getField("Lorg/jikesrvm/scheduler/RVMThread;", 066 "framePointer", 067 "Lorg/vmmagic/unboxed/Address;") : null; 068 RVMField hiddenSignatureIdField = 069 (VM.BuildForIA32) ? EntrypointHelper.getField("Lorg/jikesrvm/scheduler/RVMThread;", "hiddenSignatureId", "I") : null; 070 RVMField arrayIndexTrapParamField = 071 (VM.BuildForIA32) ? EntrypointHelper.getField("Lorg/jikesrvm/scheduler/RVMThread;", "arrayIndexTrapParam", "I") : null; 072 }