1 /* |
1 /* |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2012, 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. |
1059 |
1059 |
1060 length.load_item_force(FrameMap::rbx_opr); |
1060 length.load_item_force(FrameMap::rbx_opr); |
1061 LIR_Opr len = length.result(); |
1061 LIR_Opr len = length.result(); |
1062 |
1062 |
1063 CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info); |
1063 CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info); |
1064 ciObject* obj = (ciObject*) ciObjArrayKlass::make(x->klass()); |
1064 ciKlass* obj = (ciKlass*) ciObjArrayKlass::make(x->klass()); |
1065 if (obj == ciEnv::unloaded_ciobjarrayklass()) { |
1065 if (obj == ciEnv::unloaded_ciobjarrayklass()) { |
1066 BAILOUT("encountered unloaded_ciobjarrayklass due to out of memory error"); |
1066 BAILOUT("encountered unloaded_ciobjarrayklass due to out of memory error"); |
1067 } |
1067 } |
1068 jobject2reg_with_patching(klass_reg, obj, patching_info); |
1068 klass2reg_with_patching(klass_reg, obj, patching_info); |
1069 __ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, T_OBJECT, klass_reg, slow_path); |
1069 __ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, T_OBJECT, klass_reg, slow_path); |
1070 |
1070 |
1071 LIR_Opr result = rlock_result(x); |
1071 LIR_Opr result = rlock_result(x); |
1072 __ move(reg, result); |
1072 __ move(reg, result); |
1073 } |
1073 } |
1102 |
1102 |
1103 store_stack_parameter(size->result(), in_ByteSize(i*4)); |
1103 store_stack_parameter(size->result(), in_ByteSize(i*4)); |
1104 } |
1104 } |
1105 |
1105 |
1106 LIR_Opr reg = result_register_for(x->type()); |
1106 LIR_Opr reg = result_register_for(x->type()); |
1107 jobject2reg_with_patching(reg, x->klass(), patching_info); |
1107 klass2reg_with_patching(reg, x->klass(), patching_info); |
1108 |
1108 |
1109 LIR_Opr rank = FrameMap::rbx_opr; |
1109 LIR_Opr rank = FrameMap::rbx_opr; |
1110 __ move(LIR_OprFact::intConst(x->rank()), rank); |
1110 __ move(LIR_OprFact::intConst(x->rank()), rank); |
1111 LIR_Opr varargs = FrameMap::rcx_opr; |
1111 LIR_Opr varargs = FrameMap::rcx_opr; |
1112 __ move(FrameMap::rsp_opr, varargs); |
1112 __ move(FrameMap::rsp_opr, varargs); |