mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-02-09 09:31:39 +00:00
Fix to make statically-evaluated unsigned comparisons evaluate to 1 if true.
Previously, they evaluated to -1. The following example shows the problem: #include <stdio.h> int main(void) { printf("%i\n", 0U <= 5U); }
This commit is contained in:
parent
018f5a7548
commit
0cf948e3bd
@ -145,8 +145,7 @@ result equ 0
|
||||
lda x
|
||||
cmp y
|
||||
lb1 blt lb2
|
||||
dec result
|
||||
dec result+2
|
||||
inc result
|
||||
|
||||
lb2 return 2:result
|
||||
end
|
||||
@ -170,8 +169,7 @@ result equ 0
|
||||
lda x
|
||||
cmp y
|
||||
lb1 ble lb2
|
||||
dec result
|
||||
dec result+2
|
||||
inc result
|
||||
|
||||
lb2 return 2:result
|
||||
end
|
||||
@ -195,8 +193,7 @@ result equ 0
|
||||
lda x
|
||||
cmp y
|
||||
lb1 bgt lb2
|
||||
dec result
|
||||
dec result+2
|
||||
inc result
|
||||
|
||||
lb2 return 2:result
|
||||
end
|
||||
@ -220,8 +217,7 @@ result equ 0
|
||||
lda x
|
||||
cmp y
|
||||
lb1 bge lb2
|
||||
dec result
|
||||
dec result+2
|
||||
inc result
|
||||
|
||||
lb2 return 2:result
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user