1 /* 2 * Copyright (c) 2005, 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 * 23 */ 24 25 #include "incls/_precompiled.incl" 26 #include "incls/_c1_LinearScan_x86.cpp.incl" 27 28 29 //---------------------------------------------------------------------- 30 // Allocation of FPU stack slots (Intel x86 only) 31 //---------------------------------------------------------------------- 32 33 void LinearScan::allocate_fpu_stack() { 34 // First compute which FPU registers are live at the start of each basic block 35 // (To minimize the amount of work we have to do if we have to merge FPU stacks) 36 if (ComputeExactFPURegisterUsage) { 37 Interval* intervals_in_register, *intervals_in_memory; 38 create_unhandled_lists(&intervals_in_register, &intervals_in_memory, is_in_fpu_register, NULL); 39 40 // ignore memory intervals by overwriting intervals_in_memory 41 // the dummy interval is needed to enforce the walker to walk until the given id: 42 // without it, the walker stops when the unhandled-list is empty -> live information 43 // beyond this point would be incorrect. 44 Interval* dummy_interval = new Interval(any_reg); 45 dummy_interval->add_range(max_jint - 2, max_jint - 1); 46 dummy_interval->set_next(Interval::end()); | 1 /* 2 * Copyright (c) 2005, 2010, 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 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "c1/c1_Instruction.hpp" 27 #include "c1/c1_LinearScan.hpp" 28 #include "utilities/bitMap.inline.hpp" 29 30 31 //---------------------------------------------------------------------- 32 // Allocation of FPU stack slots (Intel x86 only) 33 //---------------------------------------------------------------------- 34 35 void LinearScan::allocate_fpu_stack() { 36 // First compute which FPU registers are live at the start of each basic block 37 // (To minimize the amount of work we have to do if we have to merge FPU stacks) 38 if (ComputeExactFPURegisterUsage) { 39 Interval* intervals_in_register, *intervals_in_memory; 40 create_unhandled_lists(&intervals_in_register, &intervals_in_memory, is_in_fpu_register, NULL); 41 42 // ignore memory intervals by overwriting intervals_in_memory 43 // the dummy interval is needed to enforce the walker to walk until the given id: 44 // without it, the walker stops when the unhandled-list is empty -> live information 45 // beyond this point would be incorrect. 46 Interval* dummy_interval = new Interval(any_reg); 47 dummy_interval->add_range(max_jint - 2, max_jint - 1); 48 dummy_interval->set_next(Interval::end()); |