1 pnkfelix 1.1.2.1 // TempBuilder.java, created Thu Oct 21 17:58:01 1999 by pnkfelix 2 pnkfelix 1.1.2.1 // Copyright (C) 1999 Felix S. Klock II <pnkfelix@mit.edu> 3 pnkfelix 1.1.2.1 // Licensed under the terms of the GNU GPL; see COPYING for details. 4 pnkfelix 1.1.2.1 package harpoon.Backend.StrongARM; 5 pnkfelix 1.1.2.1 6 pnkfelix 1.1.2.1 import harpoon.Temp.Temp; 7 pnkfelix 1.1.2.1 import harpoon.Temp.TempFactory; 8 pnkfelix 1.1.2.1 import harpoon.IR.Tree.Typed; 9 pnkfelix 1.1.2.1 10 pnkfelix 1.1.2.1 /** 11 pnkfelix 1.1.2.1 * <code>TempBuilder</code> for StrongARM. 12 pnkfelix 1.1.2.1 * 13 pnkfelix 1.1.2.1 * @author Felix S. Klock II <pnkfelix@mit.edu> 14 cananian 1.2 * @version $Id: TempBuilder.java,v 1.2 2002/02/25 21:02:50 cananian Exp $ 15 pnkfelix 1.1.2.1 */ 16 pnkfelix 1.1.2.1 public class TempBuilder extends harpoon.Backend.Generic.TempBuilder { 17 pnkfelix 1.1.2.1 18 pnkfelix 1.1.2.1 /** Creates a <code>TempBuilder</code>. */ 19 pnkfelix 1.1.2.1 public TempBuilder() { 20 pnkfelix 1.1.2.1 21 pnkfelix 1.1.2.1 } 22 pnkfelix 1.1.2.1 23 pnkfelix 1.1.2.1 public Temp makeTemp(Typed t, TempFactory tf) { 24 pnkfelix 1.1.2.1 if (t.isDoubleWord()) { 25 pnkfelix 1.1.2.1 return new TwoWordTemp(tf); 26 pnkfelix 1.1.2.1 } else { 27 pnkfelix 1.1.2.1 return new Temp(tf); 28 pnkfelix 1.1.2.1 } 29 pnkfelix 1.1.2.1 } 30 cananian 1.2 }