1 Star 0 Fork 13

aoqi/openjdk-21

forked from src-openEuler/openjdk-21 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
8300800-UB-Shift-exponent-32-is-too-large-for-32-bit.patch 912 Bytes
一键复制 编辑 原始数据 按行查看 历史
wuyafang 提交于 2024-10-14 11:38 . sync bishengjdk21 patches
Subject: 8300800: UB: Shift exponent 32 is too large for 32-bit type 'int'
---
src/hotspot/cpu/aarch64/immediate_aarch64.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp
index 3d87fde2b..961f93ed7 100644
--- a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp
@@ -295,7 +295,7 @@ int expandLogicalImmediate(uint32_t immN, uint32_t immr,
uint64_t and_bits_sub = replicate(and_bit, 1, nbits);
uint64_t or_bits_sub = replicate(or_bit, 1, nbits);
uint64_t and_bits_top = (and_bits_sub << nbits) | ones(nbits);
- uint64_t or_bits_top = (0 << nbits) | or_bits_sub;
+ uint64_t or_bits_top = (UCONST64(0) << nbits) | or_bits_sub;
tmask = ((tmask
& (replicate(and_bits_top, 2 * nbits, 32 / nbits)))
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/theaoqi/openjdk-21.git
[email protected]:theaoqi/openjdk-21.git
theaoqi
openjdk-21
openjdk-21
master

搜索帮助