hotspot/src/share/vm/code/vmreg.hpp

Print this page
rev 611 : Merge

*** 1,10 **** #ifdef USE_PRAGMA_IDENT_HDR #pragma ident "@(#)vmreg.hpp 1.37 07/05/05 17:05:22 JVM" #endif /* ! * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,10 ---- #ifdef USE_PRAGMA_IDENT_HDR #pragma ident "@(#)vmreg.hpp 1.37 07/05/05 17:05:22 JVM" #endif /* ! * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 67,79 **** // shouldn't really be called with stack return "STACKED REG"; } } static VMReg Bad() { return (VMReg) (intptr_t) BAD; } ! bool is_valid() { return ((intptr_t) this) != BAD; } ! bool is_stack() { return (intptr_t) this >= (intptr_t) stack0; } ! bool is_reg() { return is_valid() && !is_stack(); } // A concrete register is a value that returns true for is_reg() and is // also a register you could use in the assembler. On machines with // 64bit registers only one half of the VMReg (and OptoReg) is considered // concrete. --- 67,79 ---- // shouldn't really be called with stack return "STACKED REG"; } } static VMReg Bad() { return (VMReg) (intptr_t) BAD; } ! bool is_valid() const { return ((intptr_t) this) != BAD; } ! bool is_stack() const { return (intptr_t) this >= (intptr_t) stack0; } ! bool is_reg() const { return is_valid() && !is_stack(); } // A concrete register is a value that returns true for is_reg() and is // also a register you could use in the assembler. On machines with // 64bit registers only one half of the VMReg (and OptoReg) is considered // concrete.
*** 97,107 **** } intptr_t value() const {return (intptr_t) this; } ! void print(); // bias a stack slot. // Typically used to adjust a virtual frame slots by amounts that are offset by // amounts that are part of the native abi. The VMReg must be a stack slot // and the result must be also. --- 97,108 ---- } intptr_t value() const {return (intptr_t) this; } ! void print_on(outputStream* st) const; ! void print() const { print_on(tty); } // bias a stack slot. // Typically used to adjust a virtual frame slots by amounts that are offset by // amounts that are part of the native abi. The VMReg must be a stack slot // and the result must be also.
*** 156,181 **** _second = VMRegImpl::Bad(); #endif _first = ptr; } // Return true if single register, even if the pair is really just adjacent stack slots ! bool is_single_reg() { return (_first->is_valid()) && (_first->value() + 1 == _second->value()); } // Return true if single stack based "register" where the slot alignment matches input alignment ! bool is_adjacent_on_stack(int alignment) { return (_first->is_stack() && (_first->value() + 1 == _second->value()) && ((_first->value() & (alignment-1)) == 0)); } // Return true if single stack based "register" where the slot alignment matches input alignment ! bool is_adjacent_aligned_on_stack(int alignment) { return (_first->is_stack() && (_first->value() + 1 == _second->value()) && ((_first->value() & (alignment-1)) == 0)); } // Return true if single register but adjacent stack slots do not count ! bool is_single_phys_reg() { return (_first->is_reg() && (_first->value() + 1 == _second->value())); } VMReg second() const { return _second; } VMReg first() const { return _first; } --- 157,182 ---- _second = VMRegImpl::Bad(); #endif _first = ptr; } // Return true if single register, even if the pair is really just adjacent stack slots ! bool is_single_reg() const { return (_first->is_valid()) && (_first->value() + 1 == _second->value()); } // Return true if single stack based "register" where the slot alignment matches input alignment ! bool is_adjacent_on_stack(int alignment) const { return (_first->is_stack() && (_first->value() + 1 == _second->value()) && ((_first->value() & (alignment-1)) == 0)); } // Return true if single stack based "register" where the slot alignment matches input alignment ! bool is_adjacent_aligned_on_stack(int alignment) const { return (_first->is_stack() && (_first->value() + 1 == _second->value()) && ((_first->value() & (alignment-1)) == 0)); } // Return true if single register but adjacent stack slots do not count ! bool is_single_phys_reg() const { return (_first->is_reg() && (_first->value() + 1 == _second->value())); } VMReg second() const { return _second; } VMReg first() const { return _first; }