()
| 264 | #[test] |
| 265 | fn regalloc_narrow_width_wrapping() { |
| 266 | // Narrow integer results are width-normalized in registers exactly like a |
| 267 | // slot store/reload would truncate and sign-extend. |
| 268 | assert_equivalent( |
| 269 | r#" |
| 270 | main: () -> i32 { |
| 271 | a: i8 = 100 |
| 272 | b: i8 = 100 |
| 273 | c: i8 = a + b |
| 274 | w: i16 = 30000 |
| 275 | x: i16 = w + w |
| 276 | y: i32 = 70000 |
| 277 | z: i32 = y * y |
| 278 | return ((c as i64) + (x as i64) + (z % 1000) as i64) as i32 |
| 279 | } |
| 280 | "#, |
| 281 | ); |
| 282 | } |
| 283 | |
| 284 | #[test] |
| 285 | fn regalloc_heap_alloc_and_uart_output() { |
| 286 | // malloc results cross a call boundary into allocated registers; printing |
nothing calls this directly
no test coverage detected