Skip to content

Commit a5071e0

Browse files
author
Kim Barrett
committedJan 9, 2024
8322817: RISC-V: Eliminate -Wparentheses warnings in riscv code
Reviewed-by: fyang, luhenry
1 parent 28d8149 commit a5071e0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed
 

‎src/hotspot/cpu/riscv/frame_riscv.inline.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
44
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
55
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -186,7 +186,7 @@ inline bool frame::equal(frame other) const {
186186
unextended_sp() == other.unextended_sp() &&
187187
fp() == other.fp() &&
188188
pc() == other.pc();
189-
assert(!ret || ret && cb() == other.cb() && _deopt_state == other._deopt_state, "inconsistent construction");
189+
assert(!ret || (cb() == other.cb() && _deopt_state == other._deopt_state), "inconsistent construction");
190190
return ret;
191191
}
192192

‎src/hotspot/cpu/riscv/macroAssembler_riscv.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
44
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
55
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4904,9 +4904,9 @@ void MacroAssembler::object_move(OopMap* map,
49044904

49054905
// A float arg may have to do float reg int reg conversion
49064906
void MacroAssembler::float_move(VMRegPair src, VMRegPair dst, Register tmp) {
4907-
assert(src.first()->is_stack() && dst.first()->is_stack() ||
4908-
src.first()->is_reg() && dst.first()->is_reg() ||
4909-
src.first()->is_stack() && dst.first()->is_reg(), "Unexpected error");
4907+
assert((src.first()->is_stack() && dst.first()->is_stack()) ||
4908+
(src.first()->is_reg() && dst.first()->is_reg()) ||
4909+
(src.first()->is_stack() && dst.first()->is_reg()), "Unexpected error");
49104910
if (src.first()->is_stack()) {
49114911
if (dst.first()->is_stack()) {
49124912
lwu(tmp, Address(fp, reg2offset_in(src.first())));
@@ -4948,9 +4948,9 @@ void MacroAssembler::long_move(VMRegPair src, VMRegPair dst, Register tmp) {
49484948

49494949
// A double move
49504950
void MacroAssembler::double_move(VMRegPair src, VMRegPair dst, Register tmp) {
4951-
assert(src.first()->is_stack() && dst.first()->is_stack() ||
4952-
src.first()->is_reg() && dst.first()->is_reg() ||
4953-
src.first()->is_stack() && dst.first()->is_reg(), "Unexpected error");
4951+
assert((src.first()->is_stack() && dst.first()->is_stack()) ||
4952+
(src.first()->is_reg() && dst.first()->is_reg()) ||
4953+
(src.first()->is_stack() && dst.first()->is_reg()), "Unexpected error");
49544954
if (src.first()->is_stack()) {
49554955
if (dst.first()->is_stack()) {
49564956
ld(tmp, Address(fp, reg2offset_in(src.first())));

0 commit comments

Comments
 (0)
Please sign in to comment.