mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-24 03:52:08 +00:00
Add unsigned right shift operator
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
macro test
|
||||
; Test the rpn system, as well as the linker...
|
||||
DEF expr EQUS STRRPL(STRRPL("\1 + zero)", "<<", "<< ("), ">>", ">> (")
|
||||
DEF expr EQUS STRRPL(STRRPL("\1 + zero)", "<< ", "<< ("), ">> ", ">> (")
|
||||
dl expr
|
||||
PURGE expr
|
||||
|
||||
@@ -24,5 +24,8 @@ section "test", ROM0[0]
|
||||
test -4 >> 2
|
||||
test -1 >> -9001
|
||||
|
||||
test $DEADBEEF >> 1
|
||||
test $DEADBEEF >>> 1
|
||||
|
||||
SECTION "Zero", ROM0[0]
|
||||
zero:
|
||||
|
||||
@@ -24,3 +24,5 @@ warning: shift.asm(25) -> shift.asm::test(8): [-Wshift]
|
||||
Shifting right negative value -1
|
||||
warning: shift.asm(25) -> shift.asm::test(8): [-Wshift-amount]
|
||||
Shifting right by negative amount -9001
|
||||
warning: shift.asm(27) -> shift.asm::test(8): [-Wshift]
|
||||
Shifting right negative value -559038737
|
||||
|
||||
@@ -10,3 +10,5 @@
|
||||
-4 >> 1 = $FFFFFFFE
|
||||
-4 >> 2 = $FFFFFFFF
|
||||
-1 >> -9001 = $0
|
||||
$DEADBEEF >> 1 = $EF56DF77
|
||||
$DEADBEEF >>> 1 = $6F56DF77
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user