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.architecture; 014 015import org.jikesrvm.VM; 016 017public final class ArchitectureFactory { 018 019 public static AbstractRegisters createRegisters() { 020 if (VM.BuildForIA32) { 021 return new org.jikesrvm.ia32.Registers(); 022 } else { 023 if (VM.VerifyAssertions) VM._assert(VM.BuildForPowerPC); 024 return new org.jikesrvm.ppc.Registers(); 025 } 026 } 027 028 public static void initOutOfLineMachineCode() { 029 if (VM.BuildForIA32) { 030 org.jikesrvm.ia32.OutOfLineMachineCode.init(); 031 } else { 032 if (VM.VerifyAssertions) VM._assert(VM.BuildForPowerPC); 033 org.jikesrvm.ppc.OutOfLineMachineCode.init(); 034 } 035 } 036}