Commit Graph

  • 1ca59f25d0 Revert "Make RGBASM overwrite output files atomically" Eldred Habert 2020-02-10 03:08:27 +01:00
  • 1d0c8fa113 Merge pull request #451 from rednex/atomic_output Eldred Habert 2020-02-10 03:08:14 +01:00
  • 1d70c989be Test one more label diff case ISSOtm 2020-02-10 02:55:51 +01:00
  • 818a0d0296 Test more cases in label-diff test ISSOtm 2020-02-07 14:53:28 +01:00
  • ab1eb146c9 Print special message when PC is not constant ISSOtm 2020-02-07 14:46:17 +01:00
  • 63054ae0fd Make more functions ignore the RPN buffer when constant ISSOtm 2020-01-21 00:36:13 +01:00
  • 155040240d Improve error message when a symbol's value is not constant ISSOtm 2020-01-21 00:25:47 +01:00
  • d466cab1e8 Init RPN expressions created by binary operators ISSOtm 2020-01-21 00:25:18 +01:00
  • 4e8b34f42e Improve error message when a symbol is not constant ISSOtm 2020-01-21 00:19:58 +01:00
  • 5014f55c48 Treat PC as a symbol as well ISSOtm 2020-01-21 01:05:29 +01:00
  • 1d78cd0f03 Axe the constexpr expression evaluator This avoids redundancy between them (and also having to port fixes and features) The error messages have been preserved through a string reporting mechanism ISSOtm 2020-01-20 23:12:41 +01:00
  • 52d62c6b21 Handle subtractions between labels ISSOtm 2020-01-20 23:07:31 +01:00
  • b4a73f33ce Avoid undefined behavior when shifting in RPN math ISSOtm 2020-01-26 19:42:34 +01:00
  • f9c25608e9 Ignore RPN strings when their value is known ISSOtm 2020-01-20 17:05:49 +01:00
  • 9fb9e63554 Reserve space for RPN expressions in a single call This should mean less overhead with some commands ISSOtm 2020-01-20 15:26:52 +01:00
  • 9ce8a9f5f0 Add comments to RPN expr struct ISSOtm 2020-01-20 15:20:09 +01:00
  • cc59730c5b Cleanup the RPN evaluator somewhat Make the bool field an actual bool Rename iReloc to a more exact isKnown (as was already pointed out by some comments) Make the value of BANK(symbol) consistent when the argument is invalid ISSOtm 2020-01-20 14:04:14 +01:00
  • 0a04904b75 Refactor RPN binary expressions into a single func This mirrors what the constexpr evaluator is doing, and removes a lot of code shared between all of them ISSOtm 2020-01-20 13:22:14 +01:00
  • 9ed6e9af65 Make = a separate token from SET ISSOtm 2020-02-10 00:49:45 +01:00
  • c424a9bf5a Only output a single error with charmaps ISSOtm 2020-02-09 22:15:43 +01:00
  • 9d811e1267 Warn when truncating values in charmap ISSOtm 2020-02-09 22:13:16 +01:00
  • af6f62701c Remove ambiguous charmap syntax ISSOtm 2020-02-09 22:02:47 +01:00
  • 299574221e Truncate shift.out.bin ISSOtm 2020-02-09 19:51:47 +01:00
  • fe0c269382 Use ++ and -- instead of [+-]= 1 ISSOtm 2020-02-09 15:21:08 +01:00
  • 579a324ce7 Fix diffing bin files in RGBASM tests ISSOtm 2020-02-09 13:58:47 +01:00
  • 7903c14993 Fix undefined behavior when reading constant in RGBLINK ISSOtm 2020-02-07 14:51:13 +01:00
  • b42a04c24e Add test for jr @ ISSOtm 2020-01-26 21:28:14 +01:00
  • ea52e45335 Fix @ The symbol's evaluation by the assembler and linker was very inconsistent ISSOtm 2020-02-07 13:18:49 +01:00
  • 9687e6e1dd Allow forcing the second byte of STOP Fixes #433 ISSOtm 2020-02-07 10:06:02 +01:00
  • ee34200e5f Output diffs when binary tests fail ISSOtm 2020-02-06 15:36:15 +01:00
  • 295fc6c619 Improve coverage of db-@ test ISSOtm 2020-02-05 13:24:50 +01:00
  • 28473d314a Make implicit truncation a warning ISSOtm 2020-02-05 13:20:51 +01:00
  • 35f7340dc9 Report failing test names in RGBLINK as well ISSOtm 2020-02-04 01:41:35 +01:00
  • b76567e7d1 Merge pull request #470 from ISSOtm/rst Eldred Habert 2020-02-04 01:26:06 +01:00
  • 652db60ad6 Document modifications made to object file format ISSOtm 2020-02-03 21:05:28 +01:00
  • a7cb0a166a Inline readRGBxObject ISSOtm 2020-02-03 21:01:38 +01:00
  • f363541611 Introduce revision number field ISSOtm 2020-01-27 10:06:17 +01:00
  • fa1fba7fd9 Increase object version to RGB9 ISSOtm 2020-01-27 08:48:43 +01:00
  • d73fa09774 Remove RGB6 parsing ISSOtm 2020-01-27 08:42:04 +01:00
  • b1cd730db2 Add link-time RST instruction This allows using a label as the argument to a rst instruction Fixes rednex#448 ISSOtm 2020-01-14 00:02:22 +01:00
  • 359a048b6e Bump object version number We're about to break the format, so let's do this ISSOtm 2020-01-13 15:25:25 +01:00
  • f2be601a13 Check "left" boundary as well in isLocationSuitable ISSOtm 2020-02-03 20:57:12 +01:00
  • 4d2379b3df Merge both "single-side" code paths in placeSection ISSOtm 2020-02-03 20:19:30 +01:00
  • fd32b2252f Define additional variable when doing make develop ISSOtm 2020-02-03 19:55:46 +01:00
  • d15915ef14 Simplify bankrangecheck ISSOtm 2020-02-03 15:36:38 +01:00
  • 877e0e0b91 Get rid of BANK_COUNT_* symbols ISSOtm 2020-02-03 15:11:19 +01:00
  • da1d9f68c7 Remove and reorder bank counts ISSOtm 2020-02-03 15:00:28 +01:00
  • 24f41ef897 Expose link def arrays to RGBASM ISSOtm 2020-02-03 14:58:25 +01:00
  • 09dff85d5b Merge common.h into linkdefs.h ISSOtm 2020-02-03 14:50:00 +01:00
  • 20e5685c1a Merge pull request #424 from ISSOtm/better_deps Eldred Habert 2020-02-03 03:50:09 +01:00
  • ac6232bc87 Merge pull request #473 from ISSOtm/shift_ub Eldred Habert 2020-02-03 03:49:38 +01:00
  • b16ec83a33 Add gbdiff.bash script ISSOtm 2020-01-30 02:43:31 +01:00
  • ed72baca2a Make more symbol functions const ISSOtm 2020-01-30 02:38:33 +01:00
  • edb562d2e5 Mark a few symbol functions as static ISSOtm 2020-01-30 02:18:55 +01:00
  • 6d4b128611 Avoid unnecessary copies in symbol init ISSOtm 2020-01-30 02:15:43 +01:00
  • e2e01e84fa Fall back from failure in time a bit better ISSOtm 2020-01-30 02:07:55 +01:00
  • 93ee417567 Fix timestamp symbols on Windows (partially) ISSOtm 2020-01-30 01:47:50 +01:00
  • 44cdcd12c3 Use tput for formatting escape sequences ISSOtm 2020-01-28 21:04:01 +01:00
  • ed06981f57 Add test for db X, @ It should behave identically to both of these on separate lines ISSOtm 2020-01-26 21:40:58 +01:00
  • ec6c42e9d6 Merge pull request #467 from ISSOtm/report Eldred Habert 2020-01-28 18:59:11 +01:00
  • b11d121c48 Remove undefined behavior from shifts asl and asr in src/link/patch.c courtesy of @pinobatch, and rearranged in RGBASM evaluators. ISSOtm 2020-01-17 09:08:49 +01:00
  • cdf6000618 Report failing file names in comparisons The files being diffed (especially for variants) are temp files, so their names are pretty nondescript. This improve error output, using ANSI escape sequences to make those lines stand out. ISSOtm 2020-01-13 15:22:10 +01:00
  • 2e8094b712 Allow RGBASM to overwrite object files on Windows ISSOtm 2020-01-28 11:07:46 +01:00
  • a9cb4f8245 Make RGBASM overwrite output files atomically Fixes rednex/#446. I am not sure this is the best (in cases where the target directory is not writable but the target file is), but maybe this can be toggled via a flag, for example. ISSOtm 2019-11-09 01:09:54 +01:00
  • 1bd41bf79a Don't use diff to compare bin files in tests ISSOtm 2020-01-26 21:10:13 +01:00
  • 08ab34cf57 Fix a few checkpatch warnings in symbol.h ISSOtm 2020-01-26 18:26:57 +01:00
  • 7bb55469fe Fix partial paths being output to dep files with -i ISSOtm 2019-11-09 01:33:52 +01:00
  • a29dd738f2 Reimplement -M variants using long options ISSOtm 2019-11-06 18:43:05 +01:00
  • 4a98b41d57 Fix -MG always being enabled ISSOtm 2019-11-06 18:39:14 +01:00
  • 6fc5097278 Allow outputting dep files to stdout using - ISSOtm 2019-09-10 15:12:34 +02:00
  • 12f2f654dd Add -MG This option allows for automatic dependency detection and generation: as soon as a missing file is found, it is output to the dep file, and assembly immediately aborts. (No .o file is produced, even if -o was speicified.) This doesn't cause an error, either; the point is that once the file is added to the dep file, the Makefile is re-parsed, and this time the file will be generated, so the dep list builds up automatically. This mimicks GCC's option and behavior. ISSOtm 2019-09-10 15:09:24 +02:00
  • 0649b360fb Allow specifying multiple dependency targets This is done to match GCC's behavior. Also, this unifies the code of -MT and -MQ. ISSOtm 2019-09-10 03:50:54 +02:00
  • f1f314270d Add -MQ Just like GCC's -MQ, this is basically -MT but the file name is escaped. ISSOtm 2019-09-10 03:29:14 +02:00
  • 1fb9f90f0f Add -MT option Allows overriding the output file in dependencies, which also allows outputting those without also outputting the object file. This, again, mimicks GCC's option. ISSOtm 2019-09-10 03:02:53 +02:00
  • bfa8da78a6 Add -MP option Adds a phony target to every included file, mimicking gcc's ISSOtm 2019-09-10 02:04:45 +02:00
  • fb81733b2b Merge pull request #472 from ISSOtm/romx-tiny Eldred Habert 2020-01-26 14:48:32 +01:00
  • e7eac583da Merge pull request #477 from ISSOtm/sym_overhaul Eldred Habert 2020-01-26 14:30:47 +01:00
  • cd107855e7 Test new working label subtractions ISSOtm 2020-01-24 03:03:18 +01:00
  • ab9307ac61 Clean up symbol management Stop using that bitfield for everything, including what can be determined otherwise It also makes it easier to have a sane state, since some bits were (supposedly) mutually exclusive ISSOtm 2020-01-22 15:05:07 +01:00
  • e3ef194b4f Remove local label error checking This is actually not necessary, because RGBLINK would warn about missing labels. Besides, through semi-esoteric ways, it is possible to define more labels in this scope, and there's no reason to prevent that. ISSOtm 2020-01-22 10:44:44 +01:00
  • ab4ca9ad8c Make symbol ref in patch symbols constant ISSOtm 2020-01-21 15:06:18 +01:00
  • 3fb5648880 Actually rely on createsymbol never returning NULL This reduces complexity, basically ISSOtm 2020-01-21 11:37:30 +01:00
  • a7c0616cd8 Rename export type enum to that This prevents a conflict in the next commit ISSOtm 2020-01-21 10:54:16 +01:00
  • 51d5ff0567 Test subtracting labels ISSOtm 2020-01-24 02:50:24 +01:00
  • 0665146dcd Report line info on empty RPN stack ISSOtm 2020-01-21 03:12:43 +01:00
  • 1f8422575e Test that all-instructions does not error out ISSOtm 2020-01-21 03:05:22 +01:00
  • 61c381a62c Systemize RGBLINK testing ISSOtm 2020-01-21 03:01:58 +01:00
  • 56d5f1588a Do not run .pipe tests if the normal variant fails They'll most likely fail as well, just adding redundant error output ISSOtm 2020-01-21 00:27:28 +01:00
  • c05334dfc1 Upgrade testing to latest disasm commits ISSOtm 2020-01-20 14:39:55 +01:00
  • 09d6c7a54f Merge pull request #475 from ISSOtm/licensing Eldred Habert 2020-01-19 15:45:46 +01:00
  • 4fe44447a2 Add license headers where missing ISSOtm 2020-01-19 11:11:36 +01:00
  • 23c600eef5 Remove unnecessary gitignore file This became unnecessary when the linker script parser was rewritten ad-hoc ISSOtm 2020-01-19 11:02:47 +01:00
  • 50f091ab7c Fix RGBLINK failing to read args on certain machines char has implementation-defined signedness, and if it's chosen to be unsigned, then -1 gets converted to 255, which is then promoted back to int as... 255, always failing the loop condition in src/link/main.c:118 int8_t has the correct signedness, but considering musl_getopt_long_only returns int, better use that so as not to lose any bits ISSOtm 2020-01-18 22:12:25 +01:00
  • 7437f7eb85 Clarify redefinition error message ISSOtm 2020-01-17 03:53:27 +01:00
  • d6a99981d6 Fix checkcodebase warnings ISSOtm 2020-01-16 22:31:24 +01:00
  • 71fe652556 Allow ROMX and WRAMX sections in restricted modes Closes #462, although with this implementation BANK("some ROMX section") would return 0 instead of 1, which I think is benign anyways ISSOtm 2020-01-16 22:24:05 +01:00
  • 89917ef688 Put semicolons before labels in test suite ISSOtm 2020-01-16 22:08:11 +01:00
  • 097e4c9799 Merge pull request #468 from ISSOtm/include_stem Eldred Habert 2020-01-16 19:18:00 +01:00
  • 2c37a1e971 Fix default warning states They were in the wrong order for some reason, this especially caused user warnings to be off by default ISSOtm 2020-01-16 19:16:54 +01:00
  • 2c52364978 Add test for fixed section addresses ISSOtm 2020-01-16 18:12:42 +01:00