Multiple fixes and enhancements to RPN behavior: (#1448)

- FIX: `Label & const` was not actually doing the `& const` masking
  (fixes #1446)
- ADD: `LOW(Label)` can be constant if `Label` is aligned to 8 or more bits
  (resolves #1444)
- ADD: `!expr` can be constant 0 if `expr` has any non-zero bits
  (resolves #1447)
- `LOW()` and `HIGH()` have their own RPN operator values
  (resolves #1445)

The change to RPN values means that the object file version was incremented.

This also refactors unary operators and functions, combining their
evaluation similarly to binary ones.
This commit is contained in:
Sylvie
2024-08-06 07:54:55 -04:00
committed by GitHub
parent 2f8f99bd94
commit 2706f94788
8 changed files with 150 additions and 74 deletions

View File

@@ -1,6 +1,6 @@
.\" SPDX-License-Identifier: MIT
.\"
.Dd December 22, 2023
.Dd August 6, 2024
.Dt RGBDS 5
.Os
.Sh NAME
@@ -391,6 +391,10 @@ The value is then ORed with $C7
.It Li $80 Ta Integer literal; followed by the
.Cm LONG
integer.
.It Li $70 Ta Ql HIGH
byte.
.It Li $71 Ta Ql LOW
byte.
.It Li $81 Ta A symbol's value; followed by the symbol's
.Cm LONG
ID.