8311074: RISC-V: Fix -Wconversion warnings in some code header files

Reviewed-by: fyang, coleenp
This commit is contained in:
Gui Cao 2023-06-30 00:16:57 +00:00 committed by Fei Yang
parent 11fd34e196
commit 77e7b6d2a1
3 changed files with 4 additions and 4 deletions

View File

@ -219,7 +219,7 @@ template<typename FKind> frame ThawBase::new_stack_frame(const frame& hf, frame&
intptr_t* heap_sp = hf.unextended_sp();
// If caller is interpreted it already made room for the callee arguments
int overlap = caller.is_interpreted_frame() ? ContinuationHelper::InterpretedFrame::stack_argsize(hf) : 0;
const int fsize = ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap;
const int fsize = (int)(ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap);
const int locals = hf.interpreter_frame_method()->max_locals();
intptr_t* frame_sp = caller.unextended_sp() - fsize;
intptr_t* fp = frame_sp + (hf.fp() - heap_sp);

View File

@ -226,7 +226,7 @@ inline intptr_t* frame::real_fp() const {
inline int frame::frame_size() const {
return is_interpreted_frame()
? sender_sp() - sp()
? pointer_delta_as_int(sender_sp(), sp())
: cb()->frame_size();
}

View File

@ -114,8 +114,8 @@ inline int StackChunkFrameStream<frame_kind>::interpreter_frame_num_oops() const
f.interpreted_frame_oop_map(&mask);
return mask.num_oops()
+ 1 // for the mirror oop
+ ((intptr_t*)f.interpreter_frame_monitor_begin()
- (intptr_t*)f.interpreter_frame_monitor_end()) / BasicObjectLock::size();
+ pointer_delta_as_int((intptr_t*)f.interpreter_frame_monitor_begin(),
(intptr_t*)f.interpreter_frame_monitor_end()) / BasicObjectLock::size();
}
template<>