annotate src/cpu/sparc/vm/c1_MacroAssembler_sparc.hpp @ 1375:e0a1a502e402 jdk7-b91

Added tag jdk7-b90 for changeset 605c9707a766
author mikejwre
date Thu, 22 Apr 2010 16:54:23 -0700
parents a61af66fc99e
children c18cbe5936b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 void pd_init() { /* nothing to do */ }
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
28 void try_allocate(
a61af66fc99e Initial load
duke
parents:
diff changeset
29 Register obj, // result: pointer to object after successful allocation
a61af66fc99e Initial load
duke
parents:
diff changeset
30 Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise
a61af66fc99e Initial load
duke
parents:
diff changeset
31 int con_size_in_bytes, // object size in bytes if known at compile time
a61af66fc99e Initial load
duke
parents:
diff changeset
32 Register t1, // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
33 Register t2, // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
34 Label& slow_case // continuation point if fast allocation fails
a61af66fc99e Initial load
duke
parents:
diff changeset
35 );
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 void initialize_header(Register obj, Register klass, Register len, Register t1, Register t2);
a61af66fc99e Initial load
duke
parents:
diff changeset
38 void initialize_body(Register base, Register index);
a61af66fc99e Initial load
duke
parents:
diff changeset
39
a61af66fc99e Initial load
duke
parents:
diff changeset
40 // locking/unlocking
a61af66fc99e Initial load
duke
parents:
diff changeset
41 void lock_object (Register Rmark, Register Roop, Register Rbox, Register Rscratch, Label& slow_case);
a61af66fc99e Initial load
duke
parents:
diff changeset
42 void unlock_object(Register Rmark, Register Roop, Register Rbox, Label& slow_case);
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 void initialize_object(
a61af66fc99e Initial load
duke
parents:
diff changeset
45 Register obj, // result: pointer to object after successful allocation
a61af66fc99e Initial load
duke
parents:
diff changeset
46 Register klass, // object klass
a61af66fc99e Initial load
duke
parents:
diff changeset
47 Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise
a61af66fc99e Initial load
duke
parents:
diff changeset
48 int con_size_in_bytes, // object size in bytes if known at compile time
a61af66fc99e Initial load
duke
parents:
diff changeset
49 Register t1, // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
50 Register t2 // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
51 );
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 // allocation of fixed-size objects
a61af66fc99e Initial load
duke
parents:
diff changeset
54 // (can also be used to allocate fixed-size arrays, by setting
a61af66fc99e Initial load
duke
parents:
diff changeset
55 // hdr_size correctly and storing the array length afterwards)
a61af66fc99e Initial load
duke
parents:
diff changeset
56 void allocate_object(
a61af66fc99e Initial load
duke
parents:
diff changeset
57 Register obj, // result: pointer to object after successful allocation
a61af66fc99e Initial load
duke
parents:
diff changeset
58 Register t1, // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
59 Register t2, // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
60 Register t3, // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
61 int hdr_size, // object header size in words
a61af66fc99e Initial load
duke
parents:
diff changeset
62 int obj_size, // object size in words
a61af66fc99e Initial load
duke
parents:
diff changeset
63 Register klass, // object klass
a61af66fc99e Initial load
duke
parents:
diff changeset
64 Label& slow_case // continuation point if fast allocation fails
a61af66fc99e Initial load
duke
parents:
diff changeset
65 );
a61af66fc99e Initial load
duke
parents:
diff changeset
66
a61af66fc99e Initial load
duke
parents:
diff changeset
67 enum {
a61af66fc99e Initial load
duke
parents:
diff changeset
68 max_array_allocation_length = 0x01000000 // sparc friendly value, requires sethi only
a61af66fc99e Initial load
duke
parents:
diff changeset
69 };
a61af66fc99e Initial load
duke
parents:
diff changeset
70
a61af66fc99e Initial load
duke
parents:
diff changeset
71 // allocation of arrays
a61af66fc99e Initial load
duke
parents:
diff changeset
72 void allocate_array(
a61af66fc99e Initial load
duke
parents:
diff changeset
73 Register obj, // result: pointer to array after successful allocation
a61af66fc99e Initial load
duke
parents:
diff changeset
74 Register len, // array length
a61af66fc99e Initial load
duke
parents:
diff changeset
75 Register t1, // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
76 Register t2, // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
77 Register t3, // temp register
a61af66fc99e Initial load
duke
parents:
diff changeset
78 int hdr_size, // object header size in words
a61af66fc99e Initial load
duke
parents:
diff changeset
79 int elt_size, // element size in bytes
a61af66fc99e Initial load
duke
parents:
diff changeset
80 Register klass, // object klass
a61af66fc99e Initial load
duke
parents:
diff changeset
81 Label& slow_case // continuation point if fast allocation fails
a61af66fc99e Initial load
duke
parents:
diff changeset
82 );
a61af66fc99e Initial load
duke
parents:
diff changeset
83
a61af66fc99e Initial load
duke
parents:
diff changeset
84 // invalidates registers in this window
a61af66fc99e Initial load
duke
parents:
diff changeset
85 void invalidate_registers(bool iregisters, bool lregisters, bool oregisters,
a61af66fc99e Initial load
duke
parents:
diff changeset
86 Register preserve1 = noreg, Register preserve2 = noreg);