Hi all ~
I notice the case cctest/test-run-load-store/RunLoadStoreZeroExtend64.
It load a uint32 from a pointer and store it back by Kword64
Node* load64 = m.LoadFromPointer(&buffer[0], MachineType::Uint64());
m.StoreToPointer(&buffer[3], MachineRepresentation::kWord64, load32);
Does V8 default uint32 must be unsigned extended to 64bit in 64-bit
platform?
Due to riscv64 spec, riscv64 load a uint32 into register and
SignExtend to 64bit.
https://github.com/riscv-collab/riscv-gnu-toolchain/issues/680#issuecomment-666367253
https://github.com/riscv-collab/riscv-gnu-toolchain/issues/680#issuecomment-686225804
```
*aswaterman <https://github.com/aswaterman> *commented on 3 Sep 2020
<https://github.com/riscv-collab/riscv-gnu-toolchain/issues/680#issuecomment-686225804>
The sign-extension is an ABI constraint. If you want zero extension, you
need to use a wider unsigned type, like uint64_t.
*sorear <https://github.com/sorear> *commented on 30 Jul 2020
<https://github.com/riscv-collab/riscv-gnu-toolchain/issues/680#issuecomment-666367253>
The intent of the RISC-V ISA is that 32-bit C values are stored sign
extended in registers, even for unsigned types.
```
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/v8-dev/ed728033-02c0-4f0c-b12a-69998e95611en%40googlegroups.com.