1 Star 0 Fork 105

misaka00251/bishengjdk-11

forked from openEuler/bishengjdk-11 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ZGC-aarch64-fix-not-using-load-store-Pre-index.patch 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
misaka00251 提交于 2023-05-15 16:04 . Initial commit
From e8bf6d9c5a02b3ffaf223dd1109bc15c664cca28 Mon Sep 17 00:00:00 2001
Date: Mon, 24 Feb 2020 18:51:09 +0800
Subject: [PATCH] ZGC: aarch64: fix not using load/store Pre-indexed
addressing to modify sp
Summary: <gc>: <instruction load/store Pre-indexed addressing offset range is not enough>
LLT: JFUZZ
Bug url:
---
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
index a65a605d0..6db979b57 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
@@ -2114,12 +2114,11 @@ int MacroAssembler::push_fp(unsigned int bitset, Register stack) {
return 0;
}
+ add(stack, stack, -count * wordSize * 2);
+
if (count & 1) {
- strq(as_FloatRegister(regs[0]), Address(pre(stack, -count * wordSize * 2)));
+ strq(as_FloatRegister(regs[0]), Address(stack));
i += 1;
- } else {
- stpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(pre(stack, -count * wordSize * 2)));
- i += 2;
}
for (; i < count; i += 2) {
@@ -2145,20 +2144,15 @@ int MacroAssembler::pop_fp(unsigned int bitset, Register stack) {
}
if (count & 1) {
+ ldrq(as_FloatRegister(regs[0]), Address(stack));
i += 1;
- } else {
- i += 2;
}
for (; i < count; i += 2) {
ldpq(as_FloatRegister(regs[i]), as_FloatRegister(regs[i+1]), Address(stack, i * wordSize * 2));
}
- if ((count & 1) == 0) {
- ldpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(post(stack, count * wordSize * 2)));
- } else {
- ldrq(as_FloatRegister(regs[0]), Address(post(stack, count * wordSize * 2)));
- }
+ add(stack, stack, count * wordSize * 2);
return count;
}
--
2.12.3
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/misaka00251/bishengjdk-11.git
git@gitee.com:misaka00251/bishengjdk-11.git
misaka00251
bishengjdk-11
bishengjdk-11
master

搜索帮助