Commit 63721ac
docs:
Since #28293 (25f5ced) `int` lowers to `i64` on 64-bit targets and to
`i32` on 32-bit ones, but the Primitive types note still said "Unlike C
and Go, `int` is always a 32 bit integer".
The raw inline-assembly example had the same stale assumption: it used
`addl` on two `int` operands, which fails under gcc with "incorrect
register `%rax' used with `l' suffix" (the same problem as #28870). Its
operands are now `i32`, with a sentence on why.
Co-Authored-By: WOZCODE <contact@withwoz.com>int is platform width, not always 32-bit1 parent c9b806b commit 63721ac
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
634 | | - | |
| 634 | + | |
| 635 | + | |
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
| |||
9314 | 9315 | | |
9315 | 9316 | | |
9316 | 9317 | | |
9317 | | - | |
9318 | | - | |
| 9318 | + | |
| 9319 | + | |
9319 | 9320 | | |
9320 | 9321 | | |
9321 | 9322 | | |
| |||
9325 | 9326 | | |
9326 | 9327 | | |
9327 | 9328 | | |
| 9329 | + | |
| 9330 | + | |
| 9331 | + | |
| 9332 | + | |
9328 | 9333 | | |
9329 | 9334 | | |
9330 | 9335 | | |
| |||
0 commit comments