mirror of
https://github.com/gbdev/rgbds.git
synced 2025-12-01 07:17:49 +00:00
Remove undefined behavior from shifts
`asl` and `asr` in `src/link/patch.c` courtesy of @pinobatch, and rearranged in RGBASM evaluators.
This commit is contained in:
12
test/asm/shift.out
Normal file
12
test/asm/shift.out
Normal file
@@ -0,0 +1,12 @@
|
||||
1 << 1 = $2
|
||||
1 << 32 = $0
|
||||
1 << 9001 = $0
|
||||
-1 << 1 = $FFFFFFFE
|
||||
-1 << 32 = $0
|
||||
-1 << -9001 = $FFFFFFFF
|
||||
-1 >> 1 = $FFFFFFFF
|
||||
-1 >> 32 = $FFFFFFFF
|
||||
-1 >> 9001 = $FFFFFFFF
|
||||
-4 >> 1 = $FFFFFFFE
|
||||
-4 >> 2 = $FFFFFFFF
|
||||
-1 >> -9001 = $0
|
||||
Reference in New Issue
Block a user