If you have an area of memory which is greater than 2Gbytes with a start and end pointers. Then if you do end -start
the compiler generates a signed shift right ASR and thus bit 31 stays set. The compiler needs to check for a carry from the subtraction and either do ASR #2 or LSR #2
If you have an area of memory which is greater than 2Gbytes with a start and end pointers. Then if you do end -start
the compiler generates a signed shift right ASR and thus bit 31 stays set. The compiler needs to check for a carry from the subtraction and either do ASR #2 or LSR #2
See below for an example.
https:/ /godbolt. org/z/iVE4J5