Re:New integer types I’d like to see
by chrisseaton on Friday September 30, 2022 @03:23PM
(#33039512)
Right but have you seen what that’s done to your machine code? That’s why people don’t do it normally.
> LEA (Load Effective Address) can't overflow...
You're mistaken - it's defined to overflow.
https://reverseengineering.stackexchange.com/questions/11442...
Re:New integer types I’d like to see
by zorgmonkey on Friday September 30, 2022 @05:07PM
(#33040832)
I'm not 100% sure, but I think that the behavior of LEA is to wrap, but it does not set the overflow flag
You can use -ftrapv to check for integer overflows, like this
https://godbolt.org/z/snbdadv8b
>Let me know how you think you can work out if that lea overflowed!
LEA (Load Effective Address) can't overflow... memory is supposed to wrap, the byte after the last byte is byte 0.