1 /* |
1 /* |
2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
385 __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info); |
385 __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info); |
386 } |
386 } |
387 |
387 |
388 if (obj_store) { |
388 if (obj_store) { |
389 // Needs GC write barriers. |
389 // Needs GC write barriers. |
390 pre_barrier(LIR_OprFact::address(array_addr), false, NULL); |
390 pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */, |
|
391 true /* do_load */, false /* patch */, NULL); |
391 } |
392 } |
392 __ move(value.result(), array_addr, null_check_info); |
393 __ move(value.result(), array_addr, null_check_info); |
393 if (obj_store) { |
394 if (obj_store) { |
394 // Precise card mark |
395 // Precise card mark |
395 post_barrier(LIR_OprFact::address(array_addr), value.result()); |
396 post_barrier(LIR_OprFact::address(array_addr), value.result()); |
685 val.load_item(); |
686 val.load_item(); |
686 |
687 |
687 __ add(obj.result(), offset.result(), addr); |
688 __ add(obj.result(), offset.result(), addr); |
688 |
689 |
689 if (type == objectType) { // Write-barrier needed for Object fields. |
690 if (type == objectType) { // Write-barrier needed for Object fields. |
690 pre_barrier(addr, false, NULL); |
691 pre_barrier(addr, LIR_OprFact::illegalOpr /* pre_val */, |
|
692 true /* do_load */, false /* patch */, NULL); |
691 } |
693 } |
692 |
694 |
693 if (type == objectType) |
695 if (type == objectType) |
694 __ cas_obj(addr, cmp.result(), val.result(), t1, t2); |
696 __ cas_obj(addr, cmp.result(), val.result(), t1, t2); |
695 else if (type == intType) |
697 else if (type == intType) |
1185 } else { |
1187 } else { |
1186 addr = new LIR_Address(base_op, index_op, type); |
1188 addr = new LIR_Address(base_op, index_op, type); |
1187 } |
1189 } |
1188 |
1190 |
1189 if (is_obj) { |
1191 if (is_obj) { |
1190 pre_barrier(LIR_OprFact::address(addr), false, NULL); |
1192 pre_barrier(LIR_OprFact::address(addr), LIR_OprFact::illegalOpr /* pre_val */, |
|
1193 true /* do_load */, false /* patch */, NULL); |
1191 // _bs->c1_write_barrier_pre(this, LIR_OprFact::address(addr)); |
1194 // _bs->c1_write_barrier_pre(this, LIR_OprFact::address(addr)); |
1192 } |
1195 } |
1193 __ move(data, addr); |
1196 __ move(data, addr); |
1194 if (is_obj) { |
1197 if (is_obj) { |
1195 // This address is precise |
1198 // This address is precise |