annotate agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64FloatRegisters.java @ 650:54782a4cd321

6812971: SA: re-attaching to process fails Summary: After attaching, de-attaching SA from a process, the second time attach() call fails. This happens because in VM.initialize(), Universe does not get re-initialized before it is accessed. Reviewed-by: swamyv
author poonam
date Sun, 15 Mar 2009 18:11:46 -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 2003 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 package sun.jvm.hotspot.asm.amd64;
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 import sun.jvm.hotspot.utilities.Assert;
a61af66fc99e Initial load
duke
parents:
diff changeset
28
a61af66fc99e Initial load
duke
parents:
diff changeset
29 public class AMD64FloatRegisters {
a61af66fc99e Initial load
duke
parents:
diff changeset
30
a61af66fc99e Initial load
duke
parents:
diff changeset
31 public static int getNumRegisters() {
a61af66fc99e Initial load
duke
parents:
diff changeset
32 return NUM_REGIXMMERS;
a61af66fc99e Initial load
duke
parents:
diff changeset
33 }
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 public static AMD64FloatRegister getRegister(int regNum) {
a61af66fc99e Initial load
duke
parents:
diff changeset
36 if (Assert.ASSERTS_ENABLED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
37 Assert.that(regNum > -1 && regNum < NUM_REGIXMMERS, "invalid float register number!");
a61af66fc99e Initial load
duke
parents:
diff changeset
38 }
a61af66fc99e Initial load
duke
parents:
diff changeset
39 return registers[regNum];
a61af66fc99e Initial load
duke
parents:
diff changeset
40 }
a61af66fc99e Initial load
duke
parents:
diff changeset
41
a61af66fc99e Initial load
duke
parents:
diff changeset
42 public static String getRegisterName(int i) {
a61af66fc99e Initial load
duke
parents:
diff changeset
43 return "XMM(" + i + ")";
a61af66fc99e Initial load
duke
parents:
diff changeset
44 }
a61af66fc99e Initial load
duke
parents:
diff changeset
45
a61af66fc99e Initial load
duke
parents:
diff changeset
46 public static final AMD64FloatRegister XMM0;
a61af66fc99e Initial load
duke
parents:
diff changeset
47 public static final AMD64FloatRegister XMM1;
a61af66fc99e Initial load
duke
parents:
diff changeset
48 public static final AMD64FloatRegister XMM2;
a61af66fc99e Initial load
duke
parents:
diff changeset
49 public static final AMD64FloatRegister XMM3;
a61af66fc99e Initial load
duke
parents:
diff changeset
50 public static final AMD64FloatRegister XMM4;
a61af66fc99e Initial load
duke
parents:
diff changeset
51 public static final AMD64FloatRegister XMM5;
a61af66fc99e Initial load
duke
parents:
diff changeset
52 public static final AMD64FloatRegister XMM6;
a61af66fc99e Initial load
duke
parents:
diff changeset
53 public static final AMD64FloatRegister XMM7;
a61af66fc99e Initial load
duke
parents:
diff changeset
54 public static final AMD64FloatRegister XMM8;
a61af66fc99e Initial load
duke
parents:
diff changeset
55 public static final AMD64FloatRegister XMM9;
a61af66fc99e Initial load
duke
parents:
diff changeset
56 public static final AMD64FloatRegister XMM10;
a61af66fc99e Initial load
duke
parents:
diff changeset
57 public static final AMD64FloatRegister XMM11;
a61af66fc99e Initial load
duke
parents:
diff changeset
58 public static final AMD64FloatRegister XMM12;
a61af66fc99e Initial load
duke
parents:
diff changeset
59 public static final AMD64FloatRegister XMM13;
a61af66fc99e Initial load
duke
parents:
diff changeset
60 public static final AMD64FloatRegister XMM14;
a61af66fc99e Initial load
duke
parents:
diff changeset
61 public static final AMD64FloatRegister XMM15;
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 public static final int NUM_REGIXMMERS = 16;
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65 private static final AMD64FloatRegister[] registers;
a61af66fc99e Initial load
duke
parents:
diff changeset
66
a61af66fc99e Initial load
duke
parents:
diff changeset
67 static {
a61af66fc99e Initial load
duke
parents:
diff changeset
68 XMM0 = new AMD64FloatRegister(0);
a61af66fc99e Initial load
duke
parents:
diff changeset
69 XMM1 = new AMD64FloatRegister(1);
a61af66fc99e Initial load
duke
parents:
diff changeset
70 XMM2 = new AMD64FloatRegister(2);
a61af66fc99e Initial load
duke
parents:
diff changeset
71 XMM3 = new AMD64FloatRegister(3);
a61af66fc99e Initial load
duke
parents:
diff changeset
72 XMM4 = new AMD64FloatRegister(4);
a61af66fc99e Initial load
duke
parents:
diff changeset
73 XMM5 = new AMD64FloatRegister(5);
a61af66fc99e Initial load
duke
parents:
diff changeset
74 XMM6 = new AMD64FloatRegister(6);
a61af66fc99e Initial load
duke
parents:
diff changeset
75 XMM7 = new AMD64FloatRegister(7);
a61af66fc99e Initial load
duke
parents:
diff changeset
76 XMM8 = new AMD64FloatRegister(8);
a61af66fc99e Initial load
duke
parents:
diff changeset
77 XMM9 = new AMD64FloatRegister(9);
a61af66fc99e Initial load
duke
parents:
diff changeset
78 XMM10 = new AMD64FloatRegister(10);
a61af66fc99e Initial load
duke
parents:
diff changeset
79 XMM11 = new AMD64FloatRegister(11);
a61af66fc99e Initial load
duke
parents:
diff changeset
80 XMM12 = new AMD64FloatRegister(12);
a61af66fc99e Initial load
duke
parents:
diff changeset
81 XMM13 = new AMD64FloatRegister(13);
a61af66fc99e Initial load
duke
parents:
diff changeset
82 XMM14 = new AMD64FloatRegister(14);
a61af66fc99e Initial load
duke
parents:
diff changeset
83 XMM15 = new AMD64FloatRegister(15);
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 registers = new AMD64FloatRegister[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
86 XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7,
a61af66fc99e Initial load
duke
parents:
diff changeset
87 XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15
a61af66fc99e Initial load
duke
parents:
diff changeset
88 };
a61af66fc99e Initial load
duke
parents:
diff changeset
89 }
a61af66fc99e Initial load
duke
parents:
diff changeset
90 }