-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Hey,
first of all thank you for this lib, it is very nice to work with!
I noticed that llvm can have int values of arbitrary size, one example mentions an integer with the size of more than a million bits. In the case that raised this question for me, I have a constant integer size of 128, in a normally compiled program. However, the actual value fits inside a u64 and is used as part of the mul instruction.
https://releases.llvm.org/10.0.0/docs/LangRef.html#integer-type
The internal field value that contains the constant value is of size u64.
Line 14 in 575bb41
value: u64, // If the Int is less than 64 bits, the value will be zero-extended to create the Rust `u64` `value` (so if `bits` is 8, the lowest 8 bits of `value` are the relevant bits, and the others are all zeroes). Note that LLVM integers aren't signed or unsigned; each individual instruction indicates whether it's treating the integer as signed or unsigned if necessary (e.g., UDiv vs SDiv). |
So my question is, what happens for a constant int value that is larger than a u64?
Metadata
Metadata
Assignees
Labels
No labels