Skip to content

Commit 752c944

Browse files
committed
Adding special rule for _BitInt(32) on RV64
1 parent 426ad0a commit 752c944

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

riscv-cc.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ When passed in registers or on the stack, `_BitInt(N)` types are handled as
189189
follows:
190190
- For N < XLEN: Types are widened to XLEN bits, with upper bits sign-extended
191191
for signed `_BitInt(N)` or zero-extended for unsigned `_BitInt(N)`.
192+
However, for N = 32 in RV64, both signed and unsigned types are sign-extended.
193+
+
194+
[NOTE]
195+
====
196+
This ensures that `_BitInt(32)` behaves consistently with regular `int` types in RV64.
197+
====
192198
- For N = XLEN: Types are passed using the same rules as scalars that are XLEN
193199
bits wide.
194200
- For XLEN < N ≤ 2×XLEN: Types are passed using the same rules as scalars that

0 commit comments

Comments
 (0)