1 /*
2 * Copyright (c) 2003, 2014, 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 *
172 break;
173 #endif // INCLUDE_ALL_GCS
174 case BarrierSet::CardTableModRef:
175 case BarrierSet::CardTableExtension:
176 {
177 if (val == noreg) {
178 __ store_heap_oop_null(obj);
179 } else {
180 __ store_heap_oop(obj, val);
181 // flatten object address if needed
182 if (!precise || (obj.index() == noreg && obj.disp() == 0)) {
183 __ store_check(obj.base());
184 } else {
185 __ leaq(rdx, obj);
186 __ store_check(rdx);
187 }
188 }
189 }
190 break;
191 case BarrierSet::ModRef:
192 case BarrierSet::Other:
193 if (val == noreg) {
194 __ store_heap_oop_null(obj);
195 } else {
196 __ store_heap_oop(obj, val);
197 }
198 break;
199 default :
200 ShouldNotReachHere();
201
202 }
203 }
204
205 Address TemplateTable::at_bcp(int offset) {
206 assert(_desc->uses_bcp(), "inconsistent uses_bcp information");
207 return Address(r13, offset);
208 }
209
210 void TemplateTable::patch_bytecode(Bytecodes::Code bc, Register bc_reg,
211 Register temp_reg, bool load_bc_into_bc_reg/*=true*/,
212 int byte_no) {
|
1 /*
2 * Copyright (c) 2003, 2015, 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 *
172 break;
173 #endif // INCLUDE_ALL_GCS
174 case BarrierSet::CardTableModRef:
175 case BarrierSet::CardTableExtension:
176 {
177 if (val == noreg) {
178 __ store_heap_oop_null(obj);
179 } else {
180 __ store_heap_oop(obj, val);
181 // flatten object address if needed
182 if (!precise || (obj.index() == noreg && obj.disp() == 0)) {
183 __ store_check(obj.base());
184 } else {
185 __ leaq(rdx, obj);
186 __ store_check(rdx);
187 }
188 }
189 }
190 break;
191 case BarrierSet::ModRef:
192 if (val == noreg) {
193 __ store_heap_oop_null(obj);
194 } else {
195 __ store_heap_oop(obj, val);
196 }
197 break;
198 default :
199 ShouldNotReachHere();
200
201 }
202 }
203
204 Address TemplateTable::at_bcp(int offset) {
205 assert(_desc->uses_bcp(), "inconsistent uses_bcp information");
206 return Address(r13, offset);
207 }
208
209 void TemplateTable::patch_bytecode(Bytecodes::Code bc, Register bc_reg,
210 Register temp_reg, bool load_bc_into_bc_reg/*=true*/,
211 int byte_no) {
|