fix signed long shift right

This commit is contained in:
Irmen de Jong
2025-09-27 23:07:49 +02:00
parent 045c4909a8
commit cd1862dd9f
2 changed files with 13 additions and 83 deletions

View File

@@ -1,7 +1,6 @@
TODO
====
CHECK THAT >> and << work correctly for negative longs
implement the bitwise & | ^ operations as expressions on longs (all types args)
@@ -177,6 +176,8 @@ Optimizations
- more optimized operator handling of different types, for example uword a ^ byte b now does a type cast of b to word first
- optimize longEqualsValue() for const and variable operands to not assign needlessly to R0-R3.
- optimize inplacemodificationLongWithLiteralval() for more shift values such as 8, 16, 24 etc but take sign bit into account!
- optimize inplacemodificationLongWithLiteralval() for more shift values such as 8, 16, 24 etc but take sign bit into account!
- Port benchmarks from https://thred.github.io/c-bench-64/ to prog8 and see how it stacks up.
- Since fixing the missing zp-var initialization, programs grew in size again because STZ's reappeared. Can we add more intelligent (and correct!) optimizations to remove those STZs that might be redundant again?
- in Identifier: use typedarray of strings instead of listOf? Other places?