Commit 479f809
committed
fix off-by-one error for when working with ULP addresses
binutils-esp32ulp allows peripheral registers to be specified
either as a full address (e.g. 0x3ff48000) or as a direct ULP
address (e.g. 0x120), i.e. the address as seen from the ULP.
"direct" addresses are anything from 0x0 to 0x3ff (inclusive).
This change ensures that 0x3ff is included in what is treated
as a direct ULP address.
(See https://github.com/espressif/binutils-esp32ulp/blob/249ec34/gas/config/tc-esp32ulp_esp32.c#L145
for reference to how binutils treats anything larger than
DR_REG_MAX_DIRECT (0x3ff) as a full address, so everything
less *AND* equal to DR_REG_MAX_DIRECT is therefore a direct
ULP address.)
This commit contributes to being able to eventually assemble the
esp32ulp_ranges.s test from binutils-esp32ulp. It addresses this line:
https://github.com/espressif/binutils-esp32ulp/blob/249ec34/gas/testsuite/gas/esp32ulp/esp32/esp32ulp_ranges.s#L1361 parent 02e94ba commit 479f809
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| |||
0 commit comments