timjrd opened issue #6958:
Feature
Use
Uimm64forUnaryImm::imminstead ofImm64, sinceUnaryImm::immis now always encoding an unsigned integer; following #6850 & #3059.Benefit
Make it clear that
UnaryImm::immmust be interpreted as an unsigned integer; or that it should be reinterpreted as a signed integer if necessary, taking into account the actual bit-length of the encoded value. For example, since #6850, the immediate oficonst.i32 -2is encoded inUnaryImm::immas0xffff_fffe, and not-2, despite being stored in a signed 64-bit integer.Implementation
Change the type, listen to the complaints of the compiler, and address tests breakage.
I would like to try to address this issue, if it's suitable for a compiler beginner with limited time resource.
Alternatives
Keep using
Imm64since the verifier is already rejecting incorrect encodings.
Last updated: Dec 06 2025 at 06:05 UTC