1 /*
2 * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
121 union {
122 jdouble jd;
123 jint array[2];
124 } x;
125 // Interpreter stack is reversed in memory:
126 // low memory location is in higher java local slot.
127 x.jd = value;
128 at(slot+1)->set_int(x.array[0]);
129 at(slot+0)->set_int(x.array[1]);
130 #endif
131 }
132
133 #ifndef PRODUCT
134 void StackValueCollection::print() {
135 for(int index = 0; index < size(); index++) {
136 tty->print("\t %2d ", index);
137 at(index)->print_on(tty);
138 if( at(index )->type() == T_INT &&
139 index+1 < size() &&
140 at(index+1)->type() == T_INT ) {
141 tty->print(" " INT64_FORMAT " (long)", long_at(index));
142 tty->cr();
143 tty->print("\t %.15e (double)", double_at(index));
144 tty->print(" " PTR64_FORMAT " (longhex)", long_at(index));
145 }
146 tty->cr();
147 }
148 }
149 #endif
|
1 /*
2 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
121 union {
122 jdouble jd;
123 jint array[2];
124 } x;
125 // Interpreter stack is reversed in memory:
126 // low memory location is in higher java local slot.
127 x.jd = value;
128 at(slot+1)->set_int(x.array[0]);
129 at(slot+0)->set_int(x.array[1]);
130 #endif
131 }
132
133 #ifndef PRODUCT
134 void StackValueCollection::print() {
135 for(int index = 0; index < size(); index++) {
136 tty->print("\t %2d ", index);
137 at(index)->print_on(tty);
138 if( at(index )->type() == T_INT &&
139 index+1 < size() &&
140 at(index+1)->type() == T_INT ) {
141 tty->print(" " INT64_FORMAT " (long)", (int64_t)long_at(index));
142 tty->cr();
143 tty->print("\t %.15e (double)", double_at(index));
144 tty->print(" " PTR64_FORMAT " (longhex)", (int64_t)long_at(index));
145 }
146 tty->cr();
147 }
148 }
149 #endif
|