Mercurial > hg > truffle
annotate agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FloatRegisters.java @ 2376:c7f3d0b4570f
7017732: move static fields into Class to prepare for perm gen removal
Reviewed-by: kvn, coleenp, twisti, stefank
author | never |
---|---|
date | Fri, 18 Mar 2011 16:00:34 -0700 |
parents | c18cbe5936b8 |
children |
rev | line source |
---|---|
0 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
2 * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
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 | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 package sun.jvm.hotspot.asm.x86; | |
26 | |
27 import sun.jvm.hotspot.utilities.Assert; | |
28 | |
29 public class X86FloatRegisters { | |
30 | |
31 public static int getNumRegisters() { | |
32 return NUM_REGISTERS; | |
33 } | |
34 | |
35 public static X86FloatRegister getRegister(int regNum) { | |
36 if (Assert.ASSERTS_ENABLED) { | |
37 Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid float register number!"); | |
38 } | |
39 return registers[regNum]; | |
40 } | |
41 | |
42 public static String getRegisterName(int i) { | |
43 return "ST(" + i + ")"; | |
44 } | |
45 | |
46 public static final X86FloatRegister ST0; | |
47 public static final X86FloatRegister ST1; | |
48 public static final X86FloatRegister ST2; | |
49 public static final X86FloatRegister ST3; | |
50 public static final X86FloatRegister ST4; | |
51 public static final X86FloatRegister ST5; | |
52 public static final X86FloatRegister ST6; | |
53 public static final X86FloatRegister ST7; | |
54 | |
55 public static final int NUM_REGISTERS = 8; | |
56 | |
57 private static final X86FloatRegister registers[]; | |
58 | |
59 static { | |
60 ST0 = new X86FloatRegister(0); | |
61 ST1 = new X86FloatRegister(1); | |
62 ST2 = new X86FloatRegister(2); | |
63 ST3 = new X86FloatRegister(3); | |
64 ST4 = new X86FloatRegister(4); | |
65 ST5 = new X86FloatRegister(5); | |
66 ST6 = new X86FloatRegister(6); | |
67 ST7 = new X86FloatRegister(7); | |
68 registers = (new X86FloatRegister[] { | |
69 ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7 | |
70 }); | |
71 } | |
72 } |