Mercurial > hg > graal-compiler
annotate src/cpu/x86/vm/c1_FpuStackSim_x86.hpp @ 1580:f56e28f22410
6958458: Bump the HS19 build number to 03
Summary: Update the HS19 build number to 03
Reviewed-by: jcoomes
author | trims |
---|---|
date | Thu, 03 Jun 2010 18:18:56 -0700 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
rev | line source |
---|---|
0 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
2 * Copyright (c) 2005, 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 // Simulates the FPU stack and maintains mapping [fpu-register -> stack offset] | |
26 // FPU registers are described as numbers from 0..nof_fpu_regs-1 | |
27 | |
28 class Compilation; | |
29 | |
30 class FpuStackSim VALUE_OBJ_CLASS_SPEC { | |
31 private: | |
32 Compilation* _compilation; | |
33 int _stack_size; | |
34 int _regs[FrameMap::nof_fpu_regs]; | |
35 | |
36 int tos_index() const { return _stack_size - 1; } | |
37 | |
38 int regs_at(int i) const; | |
39 void set_regs_at(int i, int val); | |
40 void dec_stack_size(); | |
41 void inc_stack_size(); | |
42 | |
43 // unified bailout support | |
44 Compilation* compilation() const { return _compilation; } | |
45 void bailout(const char* msg) const { compilation()->bailout(msg); } | |
46 bool bailed_out() const { return compilation()->bailed_out(); } | |
47 | |
48 public: | |
49 FpuStackSim(Compilation* compilation); | |
50 void pop (); | |
51 void pop (int rnr); // rnr must be on tos | |
52 void push(int rnr); | |
53 void swap(int offset); // exchange tos with tos + offset | |
54 int offset_from_tos(int rnr) const; // return the offset of the topmost instance of rnr from TOS | |
55 int get_slot(int tos_offset) const; // return the entry at the given offset from TOS | |
56 void set_slot(int tos_offset, int rnr); // set the entry at the given offset from TOS | |
57 void rename(int old_rnr, int new_rnr); // rename all instances of old_rnr to new_rnr | |
58 bool contains(int rnr); // debugging support only | |
59 bool is_empty(); | |
60 bool slot_is_empty(int tos_offset); | |
61 int stack_size() const { return _stack_size; } | |
62 void clear(); | |
63 intArray* write_state(); | |
64 void read_state(intArray* fpu_stack_state); | |
65 | |
66 void print() PRODUCT_RETURN; | |
67 }; |