1 pnkfelix 1.1.2.1 // TwoWordTemp.java, created Thu Jul 22 17:46:30 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.4 import harpoon.Util.Util;
 7 pnkfelix 1.1.2.1 import harpoon.Temp.Temp;
 8 pnkfelix 1.1.2.1 import harpoon.Temp.TempFactory;
 9 pnkfelix 1.1.2.1 
10 pnkfelix 1.1.2.1 /**
11 pnkfelix 1.1.2.1  * <code>TwoWordTemp</code>
12 pnkfelix 1.1.2.1  * 
13 pnkfelix 1.1.2.1  * @author  Felix S. Klock II <pnkfelix@mit.edu>
14 cananian 1.4      * @version $Id: TwoWordTemp.java,v 1.4 2002/04/10 03:04:01 cananian Exp $
15 pnkfelix 1.1.2.1  */
16 pnkfelix 1.1.2.1 public class TwoWordTemp extends Temp {
17 pnkfelix 1.1.2.1     
18 pnkfelix 1.1.2.1     private Temp low;
19 pnkfelix 1.1.2.1     private Temp high;
20 pnkfelix 1.1.2.1 
21 pnkfelix 1.1.2.1     /** Creates a <code>TwoWordTemp</code>. */
22 pnkfelix 1.1.2.1     public TwoWordTemp(TempFactory tf) {
23 pnkfelix 1.1.2.1         super(tf);
24 pnkfelix 1.1.2.1         low = new Temp(tf);
25 pnkfelix 1.1.2.1         high = new Temp(tf);
26 pnkfelix 1.1.2.4     }
27 pnkfelix 1.1.2.4 
28 cananian 1.1.2.5     public TwoWordTemp(TempFactory tf, Temp low, Temp high) {
29 pnkfelix 1.1.2.4         super(tf);
30 cananian 1.3.2.1         assert low.tempFactory().equals(tf);
31 cananian 1.3.2.1         assert high.tempFactory().equals(tf);
32 pnkfelix 1.1.2.4         this.low = low;
33 pnkfelix 1.1.2.4         this.high = high;
34 pnkfelix 1.1.2.1     }
35 pnkfelix 1.1.2.1 
36 pnkfelix 1.1.2.1     /** Returns the <code>Temp</code> representing the low order bits
37 pnkfelix 1.1.2.1         of <code>this</code>. 
38 pnkfelix 1.1.2.1     */ 
39 pnkfelix 1.1.2.1     public Temp getLow() {
40 pnkfelix 1.1.2.1         return low;
41 pnkfelix 1.1.2.1     }
42 pnkfelix 1.1.2.1 
43 pnkfelix 1.1.2.1     /** Returns the <code>Temp</code> representing the high order bits
44 pnkfelix 1.1.2.1         of <code>this</code>. 
45 pnkfelix 1.1.2.1     */ 
46 pnkfelix 1.1.2.1     public Temp getHigh() {
47 pnkfelix 1.1.2.1         return high; 
48 pnkfelix 1.1.2.2     }
49 pnkfelix 1.1.2.2 
50 pnkfelix 1.1.2.3     public void accept(TempVisitor v) {
51 pnkfelix 1.1.2.2         v.visit(this);
52 pnkfelix 1.1.2.1     }
53 cananian 1.2     }