comparison src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp @ 2112:55f868e91c3b

7010618: C1: array length should be treated at int on 64bit during array allocation Summary: Sign-extend the length argument during array allocation Reviewed-by: never, kvn
author iveresov
date Thu, 06 Jan 2011 16:03:20 -0800
parents 037c727f35fb
children 1b4e6a5d98e0
comparison
equal deleted inserted replaced
2093:7514897db238 2112:55f868e91c3b
1 /* 1 /*
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 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.
2356 assert(op->tmp1()->as_register() == G1 && 2356 assert(op->tmp1()->as_register() == G1 &&
2357 op->tmp2()->as_register() == G3 && 2357 op->tmp2()->as_register() == G3 &&
2358 op->tmp3()->as_register() == G4 && 2358 op->tmp3()->as_register() == G4 &&
2359 op->tmp4()->as_register() == O1 && 2359 op->tmp4()->as_register() == O1 &&
2360 op->klass()->as_register() == G5, "must be"); 2360 op->klass()->as_register() == G5, "must be");
2361
2362 LP64_ONLY( __ signx(op->len()->as_register()); )
2361 if (UseSlowPath || 2363 if (UseSlowPath ||
2362 (!UseFastNewObjectArray && (op->type() == T_OBJECT || op->type() == T_ARRAY)) || 2364 (!UseFastNewObjectArray && (op->type() == T_OBJECT || op->type() == T_ARRAY)) ||
2363 (!UseFastNewTypeArray && (op->type() != T_OBJECT && op->type() != T_ARRAY))) { 2365 (!UseFastNewTypeArray && (op->type() != T_OBJECT && op->type() != T_ARRAY))) {
2364 __ br(Assembler::always, false, Assembler::pt, *op->stub()->entry()); 2366 __ br(Assembler::always, false, Assembler::pt, *op->stub()->entry());
2365 __ delayed()->nop(); 2367 __ delayed()->nop();