src/os/windows/vm/chaitin_windows.cpp

changeset 5001
e10e43e58e92
parent 5000
a6e09d6dd8e5
parent 4957
f78763f49817
child 5002
3c0584fec1e6
child 5003
78603aa58b1e
     1.1 --- a/src/os/windows/vm/chaitin_windows.cpp	Wed Apr 24 20:55:28 2013 -0400
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,78 +0,0 @@
     1.4 -/*
     1.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 - *
     1.8 - * This code is free software; you can redistribute it and/or modify it
     1.9 - * under the terms of the GNU General Public License version 2 only, as
    1.10 - * published by the Free Software Foundation.
    1.11 - *
    1.12 - * This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 - * version 2 for more details (a copy is included in the LICENSE file that
    1.16 - * accompanied this code).
    1.17 - *
    1.18 - * You should have received a copy of the GNU General Public License version
    1.19 - * 2 along with this work; if not, write to the Free Software Foundation,
    1.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 - *
    1.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.23 - * or visit www.oracle.com if you need additional information or have any
    1.24 - * questions.
    1.25 - *
    1.26 - */
    1.27 -
    1.28 -#include "precompiled.hpp"
    1.29 -#include "opto/chaitin.hpp"
    1.30 -#include "opto/machnode.hpp"
    1.31 -
    1.32 -// Disallow the use of the frame pointer (EBP) for implicit null exceptions
    1.33 -// on win95/98.  If we do not do this, the OS gets confused and gives a stack
    1.34 -// error.
    1.35 -void PhaseRegAlloc::pd_preallocate_hook() {
    1.36 -#ifndef _WIN64
    1.37 -  if (ImplicitNullChecks && !os::win32::is_nt()) {
    1.38 -    for (uint block_num=1; block_num<_cfg._num_blocks; block_num++) {
    1.39 -      Block *block = _cfg._blocks[block_num];
    1.40 -
    1.41 -      Node *block_end = block->end();
    1.42 -      if (block_end->is_MachNullCheck() &&
    1.43 -          block_end->as_Mach()->ideal_Opcode() != Op_Con) {
    1.44 -        // The last instruction in the block is an implicit null check.
    1.45 -        // Fix its input so that it does not load into the frame pointer.
    1.46 -        _matcher.pd_implicit_null_fixup(block_end->in(1)->as_Mach(),
    1.47 -                                        block_end->as_MachNullCheck()->_vidx);
    1.48 -      }
    1.49 -    }
    1.50 -  }
    1.51 -#else
    1.52 -  // WIN64==itanium on XP
    1.53 -#endif
    1.54 -}
    1.55 -
    1.56 -#ifdef ASSERT
    1.57 -// Verify that no implicit null check uses the frame pointer (EBP) as
    1.58 -// its register on win95/98.  Use of the frame pointer in an implicit
    1.59 -// null check confuses the OS, yielding a stack error.
    1.60 -void PhaseRegAlloc::pd_postallocate_verify_hook() {
    1.61 -#ifndef _WIN64
    1.62 -  if (ImplicitNullChecks && !os::win32::is_nt()) {
    1.63 -    for (uint block_num=1; block_num<_cfg._num_blocks; block_num++) {
    1.64 -      Block *block = _cfg._blocks[block_num];
    1.65 -
    1.66 -      Node *block_end = block->_nodes[block->_nodes.size()-1];
    1.67 -      if (block_end->is_MachNullCheck() && block_end->as_Mach()->ideal_Opcode() != Op_Con) {
    1.68 -        // The last instruction in the block is an implicit
    1.69 -        // null check.  Verify that this instruction does not
    1.70 -        // use the frame pointer.
    1.71 -        int reg = get_reg_first(block_end->in(1)->in(block_end->as_MachNullCheck()->_vidx));
    1.72 -        assert(reg != EBP_num,
    1.73 -               "implicit null check using frame pointer on win95/98");
    1.74 -      }
    1.75 -    }
    1.76 -  }
    1.77 -#else
    1.78 -  // WIN64==itanium on XP
    1.79 -#endif
    1.80 -}
    1.81 -#endif

mercurial