< prev index next > src/hotspot/share/runtime/stackValue.cpp
Print this page
/*
! * Copyright (c) 1997, 2023, Oracle and/or its affiliates. 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.
/*
! * Copyright (c) 1997, 2024, Oracle and/or its affiliates. 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.
assert(value_addr == nullptr || Continuation::is_in_usable_stack(value_addr, reg_map->as_RegisterMap()) || (reg_map->thread() != nullptr && reg_map->thread()->is_in_usable_stack(value_addr)), INTPTR_FORMAT, p2i(value_addr));
return value_addr;
}
! BasicLock* StackValue::resolve_monitor_lock(const frame* fr, Location location) {
assert(location.is_stack(), "for now we only look at the stack");
int word_offset = location.stack_offset() / wordSize;
// (stack picture)
// high: [ ] word_offset + 1
// low [ ] word_offset
//
// sp-> [ ] 0
// the word_offset is the distance from the stack pointer to the lowest address
// The frame's original stack pointer, before any extension by its callee
// (due to Compiler1 linkage on SPARC), must be used.
! return (BasicLock*) (fr->unextended_sp() + word_offset);
}
#ifndef PRODUCT
assert(value_addr == nullptr || Continuation::is_in_usable_stack(value_addr, reg_map->as_RegisterMap()) || (reg_map->thread() != nullptr && reg_map->thread()->is_in_usable_stack(value_addr)), INTPTR_FORMAT, p2i(value_addr));
return value_addr;
}
! BasicLock* StackValue::resolve_monitor_lock(const frame& fr, Location location) {
assert(location.is_stack(), "for now we only look at the stack");
int word_offset = location.stack_offset() / wordSize;
// (stack picture)
// high: [ ] word_offset + 1
// low [ ] word_offset
//
// sp-> [ ] 0
// the word_offset is the distance from the stack pointer to the lowest address
// The frame's original stack pointer, before any extension by its callee
// (due to Compiler1 linkage on SPARC), must be used.
! return (BasicLock*) (fr.unextended_sp() + word_offset);
}
#ifndef PRODUCT
< prev index next >