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.compilers.opt.ir; 014 015 import org.jikesrvm.VM; 016 import org.jikesrvm.compilers.opt.ir.operand.Operand; 017 import org.jikesrvm.compilers.opt.regalloc.LiveIntervalElement; 018 019 /** 020 * Generic wrappers around machine-specific IR 021 */ 022 public abstract class MachineSpecificIR { 023 /* common to all ISAs */ 024 public abstract boolean isConditionOperand(Operand operand); 025 026 public abstract void mutateMIRCondBranch(Instruction cb); 027 028 public abstract boolean isHandledByRegisterUnknown(char opcode); 029 030 public abstract boolean mayEscapeThread(Instruction instruction); 031 032 public abstract boolean mayEscapeMethod(Instruction instruction); 033 034 /* unique to IA32 */ 035 public boolean isAdviseESP(Operator operator) { 036 if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); 037 return false; 038 } 039 040 public boolean isFClear(Operator operator) { 041 if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); 042 return false; 043 } 044 045 public boolean isFNInit(Operator operator) { 046 if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); 047 return false; 048 } 049 050 public boolean isBURSManagedFPROperand(Operand operand) { 051 if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); 052 return false; 053 } 054 055 public int getBURSManagedFPRValue(Operand operand) { 056 if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); 057 return -1; 058 } 059 060 public boolean mutateFMOVs(LiveIntervalElement live, Register register, int dfnbegin, int dfnend) { 061 if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); 062 return false; 063 } 064 065 public void rewriteFPStack(IR ir) { 066 if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); 067 } 068 069 /* unique to PowerPC */ 070 public boolean isPowerPCTrapOperand(Operand operand) { 071 if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); 072 return false; 073 } 074 075 public boolean canFoldNullCheckAndLoad(Instruction s) { 076 if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); 077 return false; 078 } 079 }