Comment typo of imm index

jiangfeilong jiangfeilong at huawei.com
Sat May 7 02:33:57 UTC 2022


Hi Dingli,

Thanks for pointing this out. We will get these typos fixed in our next PR :).

Thanks, Feilong

-----Original Message-----
From: riscv-port-dev <riscv-port-dev-retn at openjdk.java.net> On Behalf Of Dingli Zhang
Sent: Friday, May 6, 2022 5:36 PM
To: riscv-port-dev at openjdk.java.net
Subject: Comment typo of imm index

Hi, I found a small problem about imm index in the comments.
I think 'imm[31:28]’ may 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.
```

Best regards,
Dingli


More information about the riscv-port-dev mailing list