Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/MulNode.java @ 18844:5e80dd2f1783
Extend emitMul, emitAdd and emitSub in ArithmeticLIRGenerator for explicitly requesting to set the flags register. (In AMD64 flags are set implicitly, but on SPARC it is not)
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Mon, 12 Jan 2015 19:34:31 +0100 |
parents | 290dc460feb3 |
children | edbac8edc2e1 |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
16215
b558af6ff4bc
don't pass stamps to arithmetic node constructors
Lukas Stadler <lukas.stadler@oracle.com>
parents:
16207
diff
changeset
|
2 * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
23 package com.oracle.graal.nodes.calc; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
5510
426c605c9d3c
Move cri.ci to api.code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5507
diff
changeset
|
25 import com.oracle.graal.api.code.*; |
5507
dc71b06d09f8
Moving classes from cri.ri to api.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5506
diff
changeset
|
26 import com.oracle.graal.api.meta.*; |
15198
2c0cfbf454b5
Move LIRTypeTool and Stamp to graal.compiler.common.
Josef Eisl <josef.eisl@jku.at>
parents:
15130
diff
changeset
|
27 import com.oracle.graal.compiler.common.type.*; |
17418
393fe459eadc
Don't cache op field in arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
17276
diff
changeset
|
28 import com.oracle.graal.compiler.common.type.ArithmeticOpTable.BinaryOp; |
18646
290dc460feb3
use better types to simplify instantiation of Serializable lambdas
Doug Simon <doug.simon@oracle.com>
parents:
18644
diff
changeset
|
29 import com.oracle.graal.compiler.common.type.ArithmeticOpTable.BinaryOp.Mul; |
11881
da9db8331658
moved Canonicalizable and Simplifiable to the com.oracle.graal.graph project (GRAAL-506)
Doug Simon <doug.simon@oracle.com>
parents:
11880
diff
changeset
|
30 import com.oracle.graal.graph.spi.*; |
15299
60406b8d6ad1
Move ArithmeticLIRGenerator to graal.lir (errors).
Josef Eisl <josef.eisl@jku.at>
parents:
15261
diff
changeset
|
31 import com.oracle.graal.lir.gen.*; |
16841
cbd42807a31f
moved NodeInfo and friends into separate com.oracle.graal.nodeinfo project so that annotation processor can be applied to the base Node class
Doug Simon <doug.simon@oracle.com>
parents:
16217
diff
changeset
|
32 import com.oracle.graal.nodeinfo.*; |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
33 import com.oracle.graal.nodes.*; |
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
34 import com.oracle.graal.nodes.spi.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
35 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 @NodeInfo(shortName = "*") |
17419
83c3dd41ca64
Simplify ArithmeticOpTable implementation and make it type safe.
Roland Schatz <roland.schatz@oracle.com>
parents:
17418
diff
changeset
|
37 public class MulNode extends BinaryArithmeticNode<Mul> implements NarrowableArithmeticNode { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 |
17197
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
39 public static MulNode create(ValueNode x, ValueNode y) { |
17450
45b45f902bed
removed Node generation (GRAAL-857)
Doug Simon <doug.simon@oracle.com>
parents:
17419
diff
changeset
|
40 return new MulNode(x, y); |
16895
06c15e88d383
added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents:
16841
diff
changeset
|
41 } |
06c15e88d383
added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents:
16841
diff
changeset
|
42 |
17197
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
43 protected MulNode(ValueNode x, ValueNode y) { |
18646
290dc460feb3
use better types to simplify instantiation of Serializable lambdas
Doug Simon <doug.simon@oracle.com>
parents:
18644
diff
changeset
|
44 super(ArithmeticOpTable::getMul, x, y); |
11851
04b039d82e86
Simplify constant folding.
Roland Schatz <roland.schatz@oracle.com>
parents:
11289
diff
changeset
|
45 } |
04b039d82e86
Simplify constant folding.
Roland Schatz <roland.schatz@oracle.com>
parents:
11289
diff
changeset
|
46 |
04b039d82e86
Simplify constant folding.
Roland Schatz <roland.schatz@oracle.com>
parents:
11289
diff
changeset
|
47 @Override |
16217
561070049e73
implement Canonicalizable.Binary in the BinaryNode hierarchy
Lukas Stadler <lukas.stadler@oracle.com>
parents:
16215
diff
changeset
|
48 public ValueNode canonical(CanonicalizerTool tool, ValueNode forX, ValueNode forY) { |
17197
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
49 ValueNode ret = super.canonical(tool, forX, forY); |
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
50 if (ret != this) { |
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
51 return ret; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
52 } |
17197
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
53 |
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
54 if (forX.isConstant() && !forY.isConstant()) { |
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
55 return MulNode.create(forY, forX); |
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
56 } |
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
57 if (forY.isConstant()) { |
17419
83c3dd41ca64
Simplify ArithmeticOpTable implementation and make it type safe.
Roland Schatz <roland.schatz@oracle.com>
parents:
17418
diff
changeset
|
58 BinaryOp<Mul> op = getOp(forX, forY); |
18188
8652481a1110
Introduce new Constant interface for use in high-level graph.
Roland Schatz <roland.schatz@oracle.com>
parents:
18187
diff
changeset
|
59 Constant c = forY.asConstant(); |
17418
393fe459eadc
Don't cache op field in arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
17276
diff
changeset
|
60 if (op.isNeutral(c)) { |
16217
561070049e73
implement Canonicalizable.Binary in the BinaryNode hierarchy
Lukas Stadler <lukas.stadler@oracle.com>
parents:
16215
diff
changeset
|
61 return forX; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 } |
17197
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
63 |
18188
8652481a1110
Introduce new Constant interface for use in high-level graph.
Roland Schatz <roland.schatz@oracle.com>
parents:
18187
diff
changeset
|
64 if (c instanceof PrimitiveConstant && ((PrimitiveConstant) c).getKind().isNumericInteger()) { |
8652481a1110
Introduce new Constant interface for use in high-level graph.
Roland Schatz <roland.schatz@oracle.com>
parents:
18187
diff
changeset
|
65 long i = ((PrimitiveConstant) c).asLong(); |
17220
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
66 boolean signFlip = false; |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
67 if (i < 0) { |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
68 i = -i; |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
69 signFlip = true; |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
70 } |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
71 if (i > 0) { |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
72 ValueNode mulResult = null; |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
73 long bit1 = i & -i; |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
74 long bit2 = i - bit1; |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
75 bit2 = bit2 & -bit2; // Extract 2nd bit |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
76 if (CodeUtil.isPowerOf2(i)) { // |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
77 mulResult = LeftShiftNode.create(forX, ConstantNode.forInt(CodeUtil.log2(i))); |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
78 } else if (bit2 + bit1 == i) { // We can work with two shifts and add |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
79 ValueNode shift1 = LeftShiftNode.create(forX, ConstantNode.forInt(CodeUtil.log2(bit1))); |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
80 ValueNode shift2 = LeftShiftNode.create(forX, ConstantNode.forInt(CodeUtil.log2(bit2))); |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
81 mulResult = AddNode.create(shift1, shift2); |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
82 } else if (CodeUtil.isPowerOf2(i + 1)) { // shift and subtract |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
83 ValueNode shift1 = LeftShiftNode.create(forX, ConstantNode.forInt(CodeUtil.log2(i + 1))); |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
84 mulResult = SubNode.create(shift1, forX); |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
85 } |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
86 if (mulResult != null) { |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
87 if (signFlip) { |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
88 return NegateNode.create(mulResult); |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
89 } else { |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
90 return mulResult; |
1738211d4cdb
Multiply use shift-add|subtract operations when easily possible. In DivNode use rightshift
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
17200
diff
changeset
|
91 } |
17197
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
92 } |
5689
1d3df3a16940
Canonicalize more Mul/Div to shifts
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
5621
diff
changeset
|
93 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
94 } |
17197
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
95 |
17418
393fe459eadc
Don't cache op field in arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
17276
diff
changeset
|
96 if (op.isAssociative()) { |
17197
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
97 // canonicalize expressions like "(a * 1) * 2" |
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
98 return reassociate(this, ValueNode.isConstantPredicate(), forX, forY); |
ec35bb4eccb8
Add support for other data types to integer arithmetic nodes.
Roland Schatz <roland.schatz@oracle.com>
parents:
16980
diff
changeset
|
99 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
100 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
101 return this; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
102 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
103 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
104 @Override |
15130
ec22234bde0d
Pass more restricted interfaces to ArithmeticLIRLowerable and LocationNode in LIR generation.
Roland Schatz <roland.schatz@oracle.com>
parents:
14950
diff
changeset
|
105 public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { |
16207
df6f2365b153
rename of x() to getX(), y() to getY() and object() to getValue()
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15413
diff
changeset
|
106 Value op1 = builder.operand(getX()); |
df6f2365b153
rename of x() to getX(), y() to getY() and object() to getValue()
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15413
diff
changeset
|
107 Value op2 = builder.operand(getY()); |
17200
56458afc02a3
Use common nodes for integer and floating point arithmetic.
Roland Schatz <roland.schatz@oracle.com>
parents:
17197
diff
changeset
|
108 if (!getY().isConstant() && !BinaryArithmeticNode.livesLonger(this, getY(), builder)) { |
17276
ffb974bef674
moved Node valueNumber and valueEquals logic (optionally) to generated nodes
Doug Simon <doug.simon@oracle.com>
parents:
17220
diff
changeset
|
109 Value tmp = op1; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
110 op1 = op2; |
17276
ffb974bef674
moved Node valueNumber and valueEquals logic (optionally) to generated nodes
Doug Simon <doug.simon@oracle.com>
parents:
17220
diff
changeset
|
111 op2 = tmp; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 } |
18844
5e80dd2f1783
Extend emitMul, emitAdd and emitSub in ArithmeticLIRGenerator for explicitly requesting to set the flags register. (In AMD64 flags are set implicitly, but on SPARC it is not)
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
18646
diff
changeset
|
113 builder.setResult(this, gen.emitMul(op1, op2, false)); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
115 } |