annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java @ 11959:23ccaa863eda

made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
author Doug Simon <doug.simon@oracle.com>
date Thu, 10 Oct 2013 16:14:55 +0200
parents 88fb9cba8751
children 0fc653a9e019
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
1 /*
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
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.extended;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
24
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
25 import static com.oracle.graal.graph.UnsafeAccess.*;
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
26
5507
dc71b06d09f8 Moving classes from cri.ri to api.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5504
diff changeset
27 import com.oracle.graal.api.meta.*;
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
28 import com.oracle.graal.nodes.*;
7091
08fe3a509cf1 Canoncialize UnsafeLoad/Store
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7090
diff changeset
29 import com.oracle.graal.nodes.java.*;
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
30 import com.oracle.graal.nodes.spi.*;
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
31 import com.oracle.graal.nodes.type.*;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
32
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
33 /**
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7394
diff changeset
34 * Store of a value at a location specified as an offset relative to an object. No null check is
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7394
diff changeset
35 * performed before the store.
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
36 */
10647
2ea604c4c6ec Factor and improve unsafe load/store canonicalization.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10646
diff changeset
37 public class UnsafeStoreNode extends UnsafeAccessNode implements StateSplit, Lowerable, Virtualizable, MemoryCheckpoint.Single {
7090
05ce1defa4f9 Common out some parts of UnsafeLoad/Store in UnsafeAccess
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7049
diff changeset
38
05ce1defa4f9 Common out some parts of UnsafeLoad/Store in UnsafeAccess
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7049
diff changeset
39 @Input private ValueNode value;
05ce1defa4f9 Common out some parts of UnsafeLoad/Store in UnsafeAccess
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7049
diff changeset
40 @Input(notDataflow = true) private FrameState stateAfter;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
41
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
42 public UnsafeStoreNode(ValueNode object, ValueNode offset, ValueNode value, Kind accessKind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
43 this(object, offset, value, accessKind, LocationIdentity.ANY_LOCATION);
7090
05ce1defa4f9 Common out some parts of UnsafeLoad/Store in UnsafeAccess
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7049
diff changeset
44 }
05ce1defa4f9 Common out some parts of UnsafeLoad/Store in UnsafeAccess
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7049
diff changeset
45
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
46 public UnsafeStoreNode(ValueNode object, ValueNode offset, ValueNode value, Kind accessKind, LocationIdentity locationIdentity) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
47 super(StampFactory.forVoid(), object, offset, accessKind, locationIdentity);
7090
05ce1defa4f9 Common out some parts of UnsafeLoad/Store in UnsafeAccess
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7049
diff changeset
48 assert accessKind != Kind.Void && accessKind != Kind.Illegal;
05ce1defa4f9 Common out some parts of UnsafeLoad/Store in UnsafeAccess
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7049
diff changeset
49 this.value = value;
05ce1defa4f9 Common out some parts of UnsafeLoad/Store in UnsafeAccess
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7049
diff changeset
50 }
5375
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
51
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
52 public FrameState stateAfter() {
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
53 return stateAfter;
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
54 }
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
55
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
56 public void setStateAfter(FrameState x) {
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
57 assert x == null || x.isAlive() : "frame state must be in a graph";
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
58 updateUsages(stateAfter, x);
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
59 stateAfter = x;
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
60 }
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
61
6534
feb579677b58 SnippetTemplate must not depend on CodeCacheProvider (only on MetaAccessProvider). This means that the hasSideEffect flag of a RuntimeCall must be already fixed in the RuntimeCall.Descriptor to avoid a lookup of the actual RuntimeCall using the CodeCacheProvider.
Christian Wimmer <christian.wimmer@oracle.com>
parents: 6521
diff changeset
62 public boolean hasSideEffect() {
5375
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
63 return true;
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents: 5362
diff changeset
64 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
65
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
66 public ValueNode value() {
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
67 return value;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
68 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
69
5705
f96e7b39e9fe Be more strict on isInt check in CAS lowering when index is constant
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 5540
diff changeset
70 @Override
11579
ae619d70bf4b Rename LoweringType to GuardsPhase and make it an attribute of StructuredGraphs
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 10647
diff changeset
71 public void lower(LoweringTool tool) {
11959
23ccaa863eda made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
Doug Simon <doug.simon@oracle.com>
parents: 11923
diff changeset
72 tool.getCodeCache().lower(this, tool);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
73 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
74
7049
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
75 @Override
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
76 public void virtualize(VirtualizerTool tool) {
7394
94f032472c28 changed PEA interface:
Lukas Stadler <lukas.stadler@jku.at>
parents: 7091
diff changeset
77 State state = tool.getObjectState(object());
94f032472c28 changed PEA interface:
Lukas Stadler <lukas.stadler@jku.at>
parents: 7091
diff changeset
78 if (state != null && state.getState() == EscapeState.Virtual) {
7049
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
79 ValueNode indexValue = tool.getReplacedValue(offset());
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
80 if (indexValue.isConstant()) {
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
81 long offset = indexValue.asConstant().asLong();
7394
94f032472c28 changed PEA interface:
Lukas Stadler <lukas.stadler@jku.at>
parents: 7091
diff changeset
82 int entryIndex = state.getVirtualObject().entryIndexForOffset(offset);
94f032472c28 changed PEA interface:
Lukas Stadler <lukas.stadler@jku.at>
parents: 7091
diff changeset
83 if (entryIndex != -1 && state.getVirtualObject().entryKind(entryIndex) == accessKind()) {
94f032472c28 changed PEA interface:
Lukas Stadler <lukas.stadler@jku.at>
parents: 7091
diff changeset
84 tool.setVirtualEntry(state, entryIndex, value());
7049
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
85 tool.delete();
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
86 }
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
87 }
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
88 }
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
89 }
ccade022ec83 virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents: 6716
diff changeset
90
7091
08fe3a509cf1 Canoncialize UnsafeLoad/Store
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7090
diff changeset
91 @Override
10647
2ea604c4c6ec Factor and improve unsafe load/store canonicalization.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10646
diff changeset
92 protected ValueNode cloneAsFieldAccess(ResolvedJavaField field) {
2ea604c4c6ec Factor and improve unsafe load/store canonicalization.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10646
diff changeset
93 StoreFieldNode storeFieldNode = graph().add(new StoreFieldNode(object(), field, value()));
2ea604c4c6ec Factor and improve unsafe load/store canonicalization.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10646
diff changeset
94 storeFieldNode.setStateAfter(stateAfter());
2ea604c4c6ec Factor and improve unsafe load/store canonicalization.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10646
diff changeset
95 return storeFieldNode;
2ea604c4c6ec Factor and improve unsafe load/store canonicalization.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10646
diff changeset
96 }
2ea604c4c6ec Factor and improve unsafe load/store canonicalization.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10646
diff changeset
97
11787
4fc75b6ca3dd Introduce NodeWithState for nodes that hold some VirtualState. Use this interface in the required special cases (Scheduling and PEA)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 11579
diff changeset
98 public FrameState getState() {
4fc75b6ca3dd Introduce NodeWithState for nodes that hold some VirtualState. Use this interface in the required special cases (Scheduling and PEA)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 11579
diff changeset
99 return stateAfter;
4fc75b6ca3dd Introduce NodeWithState for nodes that hold some VirtualState. Use this interface in the required special cases (Scheduling and PEA)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 11579
diff changeset
100 }
4fc75b6ca3dd Introduce NodeWithState for nodes that hold some VirtualState. Use this interface in the required special cases (Scheduling and PEA)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 11579
diff changeset
101
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
102 // specialized on value type until boxing/unboxing is sorted out in intrinsification
8436
10293cbfc2b6 wrote implementations for node intrinsics so that they can be interpreted when a method substitution is deoptimized and added unit tests to ensure existing method substitutions can run interpreted
Doug Simon <doug.simon@oracle.com>
parents: 8394
diff changeset
103
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
104 @SuppressWarnings("unused")
8436
10293cbfc2b6 wrote implementations for node intrinsics so that they can be interpreted when a method substitution is deoptimized and added unit tests to ensure existing method substitutions can run interpreted
Doug Simon <doug.simon@oracle.com>
parents: 8394
diff changeset
105 @NodeIntrinsic
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
106 public static void store(Object object, long offset, Object value, @ConstantNodeParameter Kind kind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
107 unsafe.putObject(object, offset, value);
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
108 }
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
109
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
110 @SuppressWarnings("unused")
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
111 @NodeIntrinsic
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
112 public static void store(Object object, long offset, boolean value, @ConstantNodeParameter Kind kind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
113 unsafe.putBoolean(object, offset, value);
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
114 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
115
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
116 @SuppressWarnings("unused")
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
117 @NodeIntrinsic
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
118 public static void store(Object object, long offset, byte value, @ConstantNodeParameter Kind kind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
119 unsafe.putByte(object, offset, value);
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
120 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
121
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
122 @SuppressWarnings("unused")
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
123 @NodeIntrinsic
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
124 public static void store(Object object, long offset, char value, @ConstantNodeParameter Kind kind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
125 unsafe.putChar(object, offset, value);
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
126 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
127
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
128 @SuppressWarnings("unused")
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
129 @NodeIntrinsic
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
130 public static void store(Object object, long offset, double value, @ConstantNodeParameter Kind kind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
131 unsafe.putDouble(object, offset, value);
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
132 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
133
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
134 @SuppressWarnings("unused")
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
135 @NodeIntrinsic
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
136 public static void store(Object object, long offset, float value, @ConstantNodeParameter Kind kind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
137 unsafe.putFloat(object, offset, value);
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
138 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
139
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
140 @SuppressWarnings("unused")
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
141 @NodeIntrinsic
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
142 public static void store(Object object, long offset, int value, @ConstantNodeParameter Kind kind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
143 unsafe.putInt(object, offset, value);
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
144 }
5187
9b8c0d1bc2dd unsafe load/store snippets now require a displacement argument which allows x86 complex addressing modes to be used for tighter encoding of array store/load operations
Doug Simon <doug.simon@oracle.com>
parents: 5061
diff changeset
145
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
146 @SuppressWarnings("unused")
8436
10293cbfc2b6 wrote implementations for node intrinsics so that they can be interpreted when a method substitution is deoptimized and added unit tests to ensure existing method substitutions can run interpreted
Doug Simon <doug.simon@oracle.com>
parents: 8394
diff changeset
147 @NodeIntrinsic
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
148 public static void store(Object object, long offset, long value, @ConstantNodeParameter Kind kind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
149 unsafe.putLong(object, offset, value);
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
150 }
8451
2ffd472c5d25 Backed out changeset: 10293cbfc2b6
Doug Simon <doug.simon@oracle.com>
parents: 8436
diff changeset
151
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
152 @SuppressWarnings("unused")
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
153 @NodeIntrinsic
11923
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
154 public static void store(Object object, long offset, short value, @ConstantNodeParameter Kind kind) {
88fb9cba8751 Simplify handling of unsafe store and unsafe load.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 11787
diff changeset
155 unsafe.putShort(object, offset, value);
8481
92571f3eeeeb made VM independent method substitutions be interpretable
Doug Simon <doug.simon@oracle.com>
parents: 8451
diff changeset
156 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
157 }