Rangi
165b79546c
Add RGBASM -Winclude-shadow warning ( #2180 )
2026-09-27 20:49:21 -04:00
Rangi
ba4e58f4e0
Add -Wsingle-union warning for UNION without NEXTU ( #2170 )
2026-09-27 20:02:42 -04:00
Rangi
62a9d8d518
Add __CYCLES__ variable to count cycles used by instructions ( #2171 )
2026-09-27 19:59:32 -04:00
Rangi
6e2e2f1db7
Add %A/%a uppercase/lowercase string format specifiers ( #2165 )
2026-09-26 19:30:05 -04:00
Rangi
ed02991af9
Make STRCMP and STRICMP tests more precise
2026-09-26 18:31:53 -04:00
Rangi
6edf41e83f
Allow RSSET to take a negative value ( #2167 )
2026-09-26 18:24:39 -04:00
Rangi
cf897aa065
Add STRICMP case-insensitive string compare function ( #2164 )
2026-09-27 00:19:10 +02:00
Rangi
d95e9260e4
Add POPCOUNT function ( #2166 )
2026-09-27 00:17:31 +02:00
Rangi and Eldred Habert
f1e530ac39
Make the comma after assert warn/fail/fatal optional ( #2160 )
...
Co-authored-by: Eldred Habert <[email protected] >
2026-09-26 19:55:35 +02:00
Rangi
e8422c1c88
Implement compound assignment operators **= and >>>= ( #2158 )
2026-09-26 19:10:39 +02:00
Rangi
e0ee6c9013
Allow STARTOF(SECTTYPE) and SIZEOF(SECTTYPE) to be constant when possible ( #2131 )
2026-09-26 19:08:28 +02:00
Rangi
548a11c3ef
Add STRSTARTS and STRENDS functions ( #2159 )
2026-09-26 19:04:14 +02:00
ISSOtm
6a08e809b5
Mark an asm test as failed if linking fails
2026-09-25 13:48:10 -04:00
Rangi
646cb05faf
Fix BANK(@) discrepancy within LOAD blocks ( #2149 )
...
RGBASM and RGBLINK disagreed on which section to consider `@` to be in;
we have decided that the latter is correct.
The `assume` change is known to be suspicious; for more discussion, see
https://github.com/gbdev/rgbds/pull/2149#discussion_r4106902830
2026-09-25 19:18:52 +02:00
Rangi42
dc701294f8
Add an additional check to the jr-@ test (ported from rsgbds)
2026-09-25 12:59:00 -04:00
Rangi and Eldred Habert
04bbe80ae0
Some shell script style improvements ( #2087 )
...
* Escape special characters in filenames when comparing gfx .err output
* Use `if` instead of `&&`
* Use `case` instead of `if` disjunction
---------
Co-authored-by: Eldred Habert <[email protected] >
2026-09-21 10:15:40 -04:00
Rangi
a2dd318f1d
Remove executable status from non-script files (git update-index --chmod=-x)
2026-09-20 19:46:40 -04:00
Rangi
f4c6221eb1
Fix underflow of ALIGN[16, offset] ( #2090 )
2026-09-15 20:22:33 -04:00
Rangi
d81ab2fb23
Fix underflowing SECTION FRAGMENT fixed address ( #2091 )
2026-09-15 20:22:19 -04:00
Rangi
ed1ac7309b
Fix overflow with high fixed-point magnitudes
2026-09-14 14:27:16 -04:00
Rangi
d082f24a2d
Fix rounding of fixed-point constants where fractional digits should carry into integer part ( #2088 )
2026-09-14 13:52:39 -04:00
Rangi
47bbd30f2c
Fix a failing assertion when two sections have the same name ( #2079 )
2026-09-12 17:58:37 -04:00
Rangi
fdd6cece30
Warn about signed 8-bit truncation for add sp, e8 and ld hl, sp + e8
2026-09-07 19:28:45 +02:00
Rangi
7d0cb000e8
Specify COLUMNS in test scripts for consistent output
2026-09-06 00:07:16 +02:00
Rangi
a2c52caca2
Disallow NUL characters in section names and assertion messages
...
Allowing these in object files would lose anything after the '\0'
when RGBLINK reads the object.
2026-08-22 19:51:03 -04:00
Rangi
21a4b85a4f
Fix STRFMT stopping at NUL characters in format spec strings
2026-08-22 19:23:49 -04:00
Rangi
9fa5058add
Correct error message for macro arg \<-INT_MIN>
2026-08-22 19:02:23 -04:00
Rangi
e287ee2724
Fix C++ UB from negating INT_MIN with macro shift INT_MIN
2026-08-22 18:48:36 -04:00
Rangi
196d50c1d7
Add XXX: comment tag to working but fragile test cases
2026-07-13 22:39:41 -04:00
Rangi
96bc58b7f7
Add test case for local labels that superficially look like keywords
2026-07-11 13:51:53 -04:00
Rangi
21682e8814
Consistently handle negative shifted macro args ( #2014 )
...
Negative macro arguments count from the end, i.e. `\<-1>`
is equivalent to `\<_NARG>`, even after `shift`ing them.
Negative arguments cannot be used to access shifted values.
2026-07-07 02:19:37 -04:00
Rangi
f82b0838a1
Disallow minus sign before symbol name in bracketed macro arguments ( #2015 )
...
This was being silently allowed but without actually negating the symbol's value
2026-07-07 00:42:09 -04:00
Rangi
fe3b238dea
Do not allow defining labels outside sections ( #2013 )
...
Creating a `Symbol` with `type = SYM_LABEL` but `section = nullptr`
is inconsistent and dangerous. I was not able to cause any buggy
behavior so far, but it's safer and reasonable to not create such
a symbol in the first place.
The main consequence is that `DEF(LabelOutsideSection)` will now
evaluate as 0.
2026-07-06 16:18:42 -04:00
Rangi
46a6966b70
Fix $8000_0000 % -1 to warn with -Wdiv like $8000_0000 / -1 does ( #2012 )
2026-07-06 15:08:44 -04:00
Rangi
0adbb92e50
Same-line shellcheck comment explanations
...
These are obvious even with `git grep shellcheck`.
2026-07-06 04:43:08 +02:00
Rangi
09da4e001a
Use Bash arrays instead of POSIX splitting when possible
2026-07-06 04:43:08 +02:00
Rangi
9bbb2247a7
Fix rgbasm -Werror=... not adding to the final error count
2026-07-03 13:05:33 -04:00
Rangi
7eaca1577d
Update .gitattributes for test/asm/crlf.asm
...
A fresh clone showed a diff even without any bytes changed.
2026-05-25 22:57:52 -04:00
Rangi
996469ee28
Ensure CRLF line endings are preserved when necessary
...
Some test cases need CRLF line endings checked out even on Unix.
Also some source files had inadvertently contained CR bytes.
2026-05-25 22:00:45 -04:00
Rangi
55db252a8f
Simplify the lexer by removing BufferedContent and inlining ViewedContent ( #1981 )
...
Instead of reading 64 characters at a time into a rolling buffer
as `shiftChar()` is called, we read 8192 characters at a time into
a complete buffer before any `peek()`/`shiftChar()` operations.
2026-05-25 21:05:59 -04:00
Rangi
d56dbbb4bf
Refactor section creation errors, and simplify output for single errors ( #1964 )
2026-05-21 13:01:08 -04:00
Rangi
358e8fe636
Add more tests of lexer's skipToLeadingKeyword behavior ( #1971 )
...
The character after the ending keyword gets blue-painted.
2026-05-09 15:56:17 -04:00
ISSOtm
fa22b78e7d
Use type instead of which in shell scripts
...
The latter is not a Bash built-in,
and some environments turn out to produce non-conforming
return codes.
`type` is provided by Bash itself,
so we can rely on it better.
2026-05-05 16:03:33 +02:00
Rangi42
9fd0c0297f
Fix invalid character in bracketed macro argument
...
The invalid character should not be consumed by `shiftChar()`.
2026-04-27 17:11:20 +02:00
Rangi42
a18b2f1049
Consistently lex local labels after keywords, even when skipping/capturing
2026-04-27 15:28:30 +02:00
Rangi42
3f144b7713
Add test case for local labels after block-ending keywords
2026-04-27 15:04:12 +02:00
Rangi
cfec017fed
Consolidate, refactor, and bugfix the lexer's handling of captures and skips ( #1957 )
...
- Do not error about local labels following keywords in skips or captures (fixes #1955 )
- Do not incompletely attempt to handle line continuations in skips (fixes #1956 )
- Rename `skipToLeadingIdentifier` to `skipToLeadingKeyword`, refactor to merge
`skipToEOL` into it, and use it for both skips and captures
2026-04-20 13:04:20 +02:00
ISSOtm
81edc27b6e
Fix two warnings on MinGW
2026-04-16 00:57:33 +02:00
Rangi
df0b557638
Don't allow invalid interpolations to occur ( #1925 )
...
Fixes #1921
2026-04-11 18:16:07 +02:00
Rangi
9b4b4a581b
Check for overflow in fixed-point precision suffix ( #1918 )
...
Fixes #1917
2026-04-07 17:06:54 -04:00