annotate agent/src/share/classes/sun/jvm/hotspot/oops/DataLayout.java @ 3939:f6f3bb0ee072

7088955: add C2 IR support to the SA Reviewed-by: kvn
author never
date Sun, 11 Sep 2011 14:48:24 -0700
parents
children 4bec1b1f7b33
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3939
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
1 /*
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
3 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
4 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
5 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
6 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
7 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
8 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
9 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
10 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
11 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
12 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
13 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
14 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
15 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
16 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
17 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
18 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
19 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
20 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
21 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
22 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
23 */
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
24
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
25 package sun.jvm.hotspot.oops;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
26
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
27 import java.io.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
28 import java.util.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
29 import sun.jvm.hotspot.debugger.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
30 import sun.jvm.hotspot.runtime.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
31 import sun.jvm.hotspot.types.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
32 import sun.jvm.hotspot.utilities.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
33
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
34 public class DataLayout {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
35 public static final int noTag = 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
36 public static final int bitDataTag = 1;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
37 public static final int counterDataTag = 2;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
38 public static final int jumpDataTag= 3;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
39 public static final int receiverTypeDataTag = 4;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
40 public static final int virtualCallDataTag = 5;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
41 public static final int retDataTag = 6;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
42 public static final int branchDataTag = 7;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
43 public static final int multiBranchDataTag = 8;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
44
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
45 // The _struct._flags word is formatted as [trapState:4 | flags:4].
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
46 // The trap state breaks down further as [recompile:1 | reason:3].
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
47 // This further breakdown is defined in deoptimization.cpp.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
48 // See Deoptimization.trapStateReason for an assert that
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
49 // trapBits is big enough to hold reasons < reasonRecordedLimit.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
50 //
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
51 // The trapState is collected only if ProfileTraps is true.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
52 public static final int trapBits = 1+3; // 3: enough to distinguish [0..reasonRecordedLimit].
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
53 public static final int trapShift = 8 - trapBits;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
54 public static final int trapMask = Bits.rightNBits(trapBits);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
55 public static final int trapMaskInPlace = (trapMask << trapShift);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
56 public static final int flagLimit = trapShift;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
57 public static final int flagMask = Bits.rightNBits(flagLimit);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
58 public static final int firstFlag = 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
59
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
60 private Address data;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
61
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
62 private int offset;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
63
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
64 private boolean handlized;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
65
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
66 public DataLayout(MethodData d, int o) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
67 data = d.getHandle();
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
68 offset = o;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
69 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
70
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
71 public DataLayout(Address d, int o) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
72 data = d;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
73 offset = o;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
74 handlized = true;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
75 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
76
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
77 public int dp() { return offset; }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
78
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
79 private int getU11(int at) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
80 return data.getJByteAt(offset + at) & 0xff;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
81 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
82
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
83 private int getU22(int at) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
84 return data.getJShortAt(offset + at) & 0xffff;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
85 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
86
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
87 int cellAt(int index) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
88 // Cells are intptr_t sized but only contain ints as raw values
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
89 return (int)data.getCIntegerAt(offset + cellOffset(index), MethodData.cellSize, false);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
90 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
91
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
92 Oop oopAt(int index) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
93 OopHandle handle;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
94 if (handlized) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
95 throw new InternalError("unsupported");
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
96 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
97 handle = data.getOopHandleAt(offset + cellOffset(index));
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
98 return VM.getVM().getObjectHeap().newOop(handle);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
99 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
100
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
101 public Address addressAt(int index) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
102 OopHandle handle;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
103 if (handlized) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
104 return data.getAddressAt(offset + cellOffset(index));
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
105 } else {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
106 return data.getOopHandleAt(offset + cellOffset(index));
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
107 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
108 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
109
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
110 // Every data layout begins with a header. This header
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
111 // contains a tag, which is used to indicate the size/layout
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
112 // of the data, 4 bits of flags, which can be used in any way,
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
113 // 4 bits of trap history (none/one reason/many reasons),
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
114 // and a bci, which is used to tie this piece of data to a
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
115 // specific bci in the bytecodes.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
116 // union {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
117 // intptrT _bits;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
118 // struct {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
119 // u1 _tag;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
120 // u1 _flags;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
121 // u2 _bci;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
122 // } _struct;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
123 // } _header;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
124
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
125 // Some types of data layouts need a length field.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
126 static boolean needsArrayLen(int tag) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
127 return (tag == multiBranchDataTag);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
128 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
129
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
130 public static final int counterIncrement = 1;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
131
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
132 // Size computation
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
133 static int headerSizeInBytes() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
134 return MethodData.cellSize;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
135 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
136 static int headerSizeInCells() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
137 return 1;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
138 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
139
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
140 static int computeSizeInBytes(int cellCount) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
141 return headerSizeInBytes() + cellCount * MethodData.cellSize;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
142 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
143
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
144 // Initialization
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
145 // void initialize(int tag, int bci, int cellCount);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
146
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
147 // Accessors
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
148 public int tag() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
149 return getU11(0);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
150 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
151
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
152 // Return a few bits of trap state. Range is [0..trapMask].
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
153 // The state tells if traps with zero, one, or many reasons have occurred.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
154 // It also tells whether zero or many recompilations have occurred.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
155 // The associated trap histogram in the MDO itself tells whether
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
156 // traps are common or not. If a BCI shows that a trap X has
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
157 // occurred, and the MDO shows N occurrences of X, we make the
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
158 // simplifying assumption that all N occurrences can be blamed
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
159 // on that BCI.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
160 int trapState() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
161 return (flags() >> trapShift) & trapMask;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
162 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
163
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
164 int flags() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
165 return getU11(1);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
166 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
167
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
168 int bci() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
169 return getU22(2);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
170 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
171
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
172 boolean flagAt(int flagNumber) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
173 // assert(flagNumber < flagLimit, "oob");
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
174 return (flags() & (0x1 << flagNumber)) != 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
175 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
176
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
177 // Low-level support for code generation.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
178 static int headerOffset() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
179 return 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
180 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
181 static int tagOffset() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
182 return 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
183 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
184 static int flagsOffset() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
185 return 1;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
186 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
187 static int bciOffset() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
188 return 2;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
189 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
190 public static int cellOffset(int index) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
191 return MethodData.cellSize + index * MethodData.cellSize;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
192 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
193 // // Return a value which, when or-ed as a byte into _flags, sets the flag.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
194 // static int flagNumberToByteConstant(int flagNumber) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
195 // assert(0 <= flagNumber && flagNumber < flagLimit, "oob");
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
196 // DataLayout temp; temp.setHeader(0);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
197 // temp.setFlagAt(flagNumber);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
198 // return temp._header._struct._flags;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
199 // }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
200 // // Return a value which, when or-ed as a word into _header, sets the flag.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
201 // static intptrT flagMaskToHeaderMask(int byteConstant) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
202 // DataLayout temp; temp.setHeader(0);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
203 // temp._header._struct._flags = byteConstant;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
204 // return temp._header._bits;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
205 // }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
206 }