8337785: Fix simple -Wzero-as-null-pointer-constant warnings in x86 code
Reviewed-by: jwaters, ayang, shade
This commit is contained in:
parent
e2c07d5044
commit
431d4f7e18
@ -279,7 +279,7 @@ void frame::patch_pc(Thread* thread, address pc) {
|
|||||||
|
|
||||||
assert(!Continuation::is_return_barrier_entry(*pc_addr), "return barrier");
|
assert(!Continuation::is_return_barrier_entry(*pc_addr), "return barrier");
|
||||||
|
|
||||||
assert(_pc == *pc_addr || pc == *pc_addr || *pc_addr == 0, "");
|
assert(_pc == *pc_addr || pc == *pc_addr || *pc_addr == nullptr, "");
|
||||||
DEBUG_ONLY(address old_pc = _pc;)
|
DEBUG_ONLY(address old_pc = _pc;)
|
||||||
*pc_addr = pc;
|
*pc_addr = pc;
|
||||||
_pc = pc; // must be set before call to get_deopt_original_pc
|
_pc = pc; // must be set before call to get_deopt_original_pc
|
||||||
@ -483,10 +483,10 @@ frame frame::sender_for_interpreter_frame(RegisterMap* map) const {
|
|||||||
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||||
assert(is_interpreted_frame(), "Not an interpreted frame");
|
assert(is_interpreted_frame(), "Not an interpreted frame");
|
||||||
// These are reasonable sanity checks
|
// These are reasonable sanity checks
|
||||||
if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) {
|
if (fp() == nullptr || (intptr_t(fp()) & (wordSize-1)) != 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (sp() == 0 || (intptr_t(sp()) & (wordSize-1)) != 0) {
|
if (sp() == nullptr || (intptr_t(sp()) & (wordSize-1)) != 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (fp() + interpreter_frame_initial_sp_offset < sp()) {
|
if (fp() + interpreter_frame_initial_sp_offset < sp()) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2021, Intel Corporation. All rights reserved.
|
* Copyright (c) 2016, 2024, Intel Corporation. All rights reserved.
|
||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@ -689,7 +689,7 @@ void MacroAssembler::sha256_AVX2(XMMRegister msg, XMMRegister state0, XMMRegiste
|
|||||||
|
|
||||||
address K256_W = StubRoutines::x86::k256_W_addr();
|
address K256_W = StubRoutines::x86::k256_W_addr();
|
||||||
address pshuffle_byte_flip_mask = StubRoutines::x86::pshuffle_byte_flip_mask_addr();
|
address pshuffle_byte_flip_mask = StubRoutines::x86::pshuffle_byte_flip_mask_addr();
|
||||||
address pshuffle_byte_flip_mask_addr = 0;
|
address pshuffle_byte_flip_mask_addr = nullptr;
|
||||||
|
|
||||||
const XMMRegister& SHUF_00BA = xmm10; // ymm10: shuffle xBxA -> 00BA
|
const XMMRegister& SHUF_00BA = xmm10; // ymm10: shuffle xBxA -> 00BA
|
||||||
const XMMRegister& SHUF_DC00 = xmm12; // ymm12: shuffle xDxC -> DC00
|
const XMMRegister& SHUF_DC00 = xmm12; // ymm12: shuffle xDxC -> DC00
|
||||||
@ -1247,7 +1247,7 @@ void MacroAssembler::sha512_AVX2(XMMRegister msg, XMMRegister state0, XMMRegiste
|
|||||||
|
|
||||||
address K512_W = StubRoutines::x86::k512_W_addr();
|
address K512_W = StubRoutines::x86::k512_W_addr();
|
||||||
address pshuffle_byte_flip_mask_sha512 = StubRoutines::x86::pshuffle_byte_flip_mask_addr_sha512();
|
address pshuffle_byte_flip_mask_sha512 = StubRoutines::x86::pshuffle_byte_flip_mask_addr_sha512();
|
||||||
address pshuffle_byte_flip_mask_addr = 0;
|
address pshuffle_byte_flip_mask_addr = nullptr;
|
||||||
|
|
||||||
const XMMRegister& XFER = xmm0; // YTMP0
|
const XMMRegister& XFER = xmm0; // YTMP0
|
||||||
const XMMRegister& BYTE_FLIP_MASK = xmm9; // ymm9
|
const XMMRegister& BYTE_FLIP_MASK = xmm9; // ymm9
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -572,7 +572,7 @@ void trace_method_handle_stub(const char* adaptername,
|
|||||||
|
|
||||||
frame cur_frame = os::current_frame();
|
frame cur_frame = os::current_frame();
|
||||||
|
|
||||||
if (cur_frame.fp() != 0) { // not walkable
|
if (cur_frame.fp() != nullptr) { // not walkable
|
||||||
|
|
||||||
// Robust search of trace_calling_frame (independent of inlining).
|
// Robust search of trace_calling_frame (independent of inlining).
|
||||||
// Assumes saved_regs comes from a pusha in the trace_calling_frame.
|
// Assumes saved_regs comes from a pusha in the trace_calling_frame.
|
||||||
|
@ -53,13 +53,13 @@ const char* VM_Version::_features_names[] = { CPU_FEATURE_FLAGS(DECLARE_CPU_FEAT
|
|||||||
#undef DECLARE_CPU_FEATURE_FLAG
|
#undef DECLARE_CPU_FEATURE_FLAG
|
||||||
|
|
||||||
// Address of instruction which causes SEGV
|
// Address of instruction which causes SEGV
|
||||||
address VM_Version::_cpuinfo_segv_addr = 0;
|
address VM_Version::_cpuinfo_segv_addr = nullptr;
|
||||||
// Address of instruction after the one which causes SEGV
|
// Address of instruction after the one which causes SEGV
|
||||||
address VM_Version::_cpuinfo_cont_addr = 0;
|
address VM_Version::_cpuinfo_cont_addr = nullptr;
|
||||||
// Address of instruction which causes APX specific SEGV
|
// Address of instruction which causes APX specific SEGV
|
||||||
address VM_Version::_cpuinfo_segv_addr_apx = 0;
|
address VM_Version::_cpuinfo_segv_addr_apx = nullptr;
|
||||||
// Address of instruction after the one which causes APX specific SEGV
|
// Address of instruction after the one which causes APX specific SEGV
|
||||||
address VM_Version::_cpuinfo_cont_addr_apx = 0;
|
address VM_Version::_cpuinfo_cont_addr_apx = nullptr;
|
||||||
|
|
||||||
static BufferBlob* stub_blob;
|
static BufferBlob* stub_blob;
|
||||||
static const int stub_size = 2000;
|
static const int stub_size = 2000;
|
||||||
|
@ -224,7 +224,7 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
|
|||||||
if (info != nullptr && uc != nullptr && thread != nullptr) {
|
if (info != nullptr && uc != nullptr && thread != nullptr) {
|
||||||
pc = (address) os::Posix::ucontext_get_pc(uc);
|
pc = (address) os::Posix::ucontext_get_pc(uc);
|
||||||
|
|
||||||
if (sig == SIGSEGV && info->si_addr == 0 && info->si_code == SI_KERNEL) {
|
if (sig == SIGSEGV && info->si_addr == nullptr && info->si_code == SI_KERNEL) {
|
||||||
// An irrecoverable SI_KERNEL SIGSEGV has occurred.
|
// An irrecoverable SI_KERNEL SIGSEGV has occurred.
|
||||||
// It's likely caused by dereferencing an address larger than TASK_SIZE.
|
// It's likely caused by dereferencing an address larger than TASK_SIZE.
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user