Parse an integer immediate: decimal, or `0x`/`0X` hex prefix.
(s: &str)
| 430 | out.push(AsmToken::Real(RealInstruction::Addi(Addi::new( |
| 431 | reg, 0, val32, |
| 432 | )))); |
| 433 | return; |
| 434 | } |
| 435 | let lo12 = val32 & 0xFFF; |
| 436 | let lo12_signed = if lo12 >= 0x800 { lo12 - 0x1000 } else { lo12 }; |
| 437 | let hi20 = val32.wrapping_sub(lo12_signed); |
| 438 | out.push(AsmToken::Real(RealInstruction::Lui(Lui::new(reg, hi20)))); |
| 439 | if lo12_signed != 0 { |
| 440 | out.push(AsmToken::Real(RealInstruction::Addi(Addi::new( |
| 441 | reg, |
| 442 | reg, |
no outgoing calls
no test coverage detected