Mercurial > hg > graal-compiler
comparison graal/Compiler/src/com/sun/c1x/lir/LIROp3.java @ 2507:9ec15d6914ca
Pull over of compiler from maxine repository.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Apr 2011 11:43:22 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2506:4a3bf8a5bf41 | 2507:9ec15d6914ca |
---|---|
1 /* | |
2 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23 package com.sun.c1x.lir; | |
24 | |
25 import com.sun.cri.ci.*; | |
26 | |
27 /** | |
28 * The {@code LIROp3} class definition. | |
29 * | |
30 * @author Marcelo Cintra | |
31 * | |
32 */ | |
33 public class LIROp3 extends LIRInstruction { | |
34 | |
35 /** | |
36 * Creates a new LIROp3 instruction. A LIROp3 instruction represents a LIR instruction | |
37 * that has three input operands. | |
38 * | |
39 * @param opcode the instruction's opcode | |
40 * @param opr1 the first input operand | |
41 * @param opr2 the second input operand | |
42 * @param opr3 the third input operand | |
43 * @param result the result operand | |
44 * @param info the debug information, used for deoptimization, associated to this instruction | |
45 */ | |
46 public LIROp3(LIROpcode opcode, CiValue opr1, CiValue opr2, CiValue opr3, CiValue result, LIRDebugInfo info) { | |
47 super(opcode, result, info, false, 1, 1, opr1, opr2, opr3); | |
48 assert isInRange(opcode, LIROpcode.BeginOp3, LIROpcode.EndOp3) : "The " + opcode + " is not a valid LIROp3 opcode"; | |
49 } | |
50 | |
51 /** | |
52 * Gets the opr1 of this class. | |
53 * | |
54 * @return the opr1 | |
55 */ | |
56 public CiValue opr1() { | |
57 return operand(0); | |
58 } | |
59 | |
60 /** | |
61 * Gets the opr2 of this class. | |
62 * | |
63 * @return the opr2 | |
64 */ | |
65 public CiValue opr2() { | |
66 return operand(1); | |
67 } | |
68 | |
69 /** | |
70 * Emits assembly code for this instruction. | |
71 * | |
72 * @param masm the target assembler | |
73 */ | |
74 @Override | |
75 public void emitCode(LIRAssembler masm) { | |
76 masm.emitOp3(this); | |
77 } | |
78 } |