RFR: 8287552: riscv: Fix comment typo in li64
Feilong Jiang
fjiang at openjdk.java.net
Tue May 31 08:06:19 UTC 2022
In riscv, 'imm[31:28]’ should be 'imm[31:20]' for '0x7ff' in the following two places:
src/hotspot/cpu/riscv/assembler_riscv.cpp:
void Assembler::li64(Register Rd, int64_t imm) {
// Load upper 32 bits. upper = imm[63:32], but if imm[31] == 1 or
// (imm[31:28] == 0x7ff && imm[19] == 1), upper = imm[63:32] + 1.
int64_t lower = imm & 0xffffffff;
src/hotspot/cpu/riscv/macroAssembler_riscv.cpp:
// Load upper 32 bits. Upper = target[63:32], but if target[31] = 1 or (target[31:28] == 0x7ff && target[19] == 1),
// upper = target[63:32] + 1.
This patch also unifies the immediate type in `movptr_with_offset` to `int64_t`.
Hotspot tier1 test on QEMU passed without new failures.
-------------
Commit messages:
- fix typo
Changes: https://git.openjdk.java.net/jdk/pull/8950/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8950&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8287552
Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod
Patch: https://git.openjdk.java.net/jdk/pull/8950.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8950/head:pull/8950
PR: https://git.openjdk.java.net/jdk/pull/8950
More information about the hotspot-dev
mailing list