Commit Graph

84 Commits

Author SHA1 Message Date
ggn e6e125acd9 Fix for #199 - stop tokenising after the first symbol when inside a disabled code blcok 2022-12-21 16:05:58 -06:00
ggn e298f2149d Removed redundant table 2022-05-30 14:56:38 -05:00
ggn 7d748dc6e2 Fix for #159: Split register sets according to architecture into different tables so they don't clash with label/symbol names. Modified tokeniser to use different tables when scanning for registers 2022-05-30 14:56:38 -05:00
ggn 7a571a6d9e Addendum for #193: Do less tokenisation processing when inside a disabled code block 2022-05-30 14:18:39 -05:00
ggn d21544da60 Removed some dead code, as well as all gpu/dsp regbank check code (not only it was complicated, it also was very incomplete - for example: no bank checks were performed during fixups) 2022-05-30 14:17:59 -05:00
ggn 9ad63bfb08 Fix for ^^filesize (these kind of hacks need to go in the long game) 2022-05-30 14:17:59 -05:00
ggn 1df6df8dae .equr overhaul part 4: handle equrundef (and the other permutations of the directive) 2022-05-30 14:17:59 -05:00
ggn f23a0935e1 .equr overhaul part 3: store and handle banks in .equr evaluation 2022-05-30 14:17:59 -05:00
ggn 216bfb25e0 .equr overhaul part 2: added equr evaluation during parsing. So far the gpu/dsp test seems to assemble fine 2022-05-30 14:17:59 -05:00
ggn 7815a9c950 Remove all remaining traces of "as68_flag" from the codebase (issue #186) 2021-08-20 10:08:06 -05:00
ggn 721ff28e66 Expand \~ in .REPTs to unique label names as in macros. (issue #75) 2021-08-20 09:59:09 -05:00
ggn 37694c99b0 Fix for bug #174 - when a macro contains an error, actually print the filename it was defined in, instead of current filename 2021-06-08 20:41:50 -05:00
ggn e1bd14aee0 Fix for bug #181 (goto was never working corectly) 2021-06-08 20:20:48 -05:00
Shamus Hammons cbc8347d4f Update to the name (don't ask), and copyright dates. Now at v2.1.0. 2021-03-07 16:43:25 -06:00
Shamus Hammons ba8121d864 Fix for bug #51. Now at v2.0.22.
We bumped the # of tokens in the TOKENSTREAM structure from 32 to 64,
but also added some logic to the macro invocation code to check if we
break the limits and thus don't crash.  Will 64 be enough?  My crystal
ball is cloudy ATM...  :-P
2020-09-28 21:41:40 -05:00
Shamus Hammons e01afe2aa5 Fix for bug #157 (token buffer overflow with long lines).
Also fixed a bug reported by swapd0 where a source file was longer than
65535 lines.  Now at v2.0.17.
2020-07-17 18:05:25 -05:00
Shamus Hammons c4fcee52c8 Add sanity checks to input line tokenizer. Probably will need more. 2020-07-04 12:29:20 -05:00
ggn c38505ee4b Actually implement ^^FILESIZE this time :) 2020-01-03 09:56:36 -06:00
ggn 114298f750 Updated VS2015 project files, it should now build out of the box on VS2015 and later 2020-01-03 09:49:02 -06:00
Shamus Hammons 4205233c83 EOY minor update. 2020-01-03 09:25:26 -06:00
ggn 59c5357bbd When expanding macro parameters ("\{param_name}") inside strings don't warn about bad backslashes 2020-01-01 13:56:03 -06:00
Shamus Hammons 29fa5dcf50 The deed has been accomplished.
As far as I can tell, there should be no more regressions, but that's
no guarantee of anything.  Assuming no more are found, this should go
out as version 2.0.0.  :-D
2019-08-07 18:24:52 -05:00
Shamus Hammons bdbf34766f Added in DSP fixups to sect.c, misc. fixes for 6502 assembler. 2019-08-06 10:16:20 -05:00
ggn b94e4cd8af Remove hacky code that truncates absolute addresses. (Bug 38) 2018-05-15 13:35:04 -05:00
Shamus Hammons 9153334781 Partial fix for bug #108 (Fixup cleanups).
RMAC has needed a struct for fixups for some time, and now it has one.
All of the credit for pushing (and patching!) in that direction goes to
ggn; blame for the way it's implemented goes to me. There's still room
for improvement; but for now, this should leave us in much better shape.
Now at v1.12.0.
2018-02-09 23:08:47 -06:00
Shamus Hammons 29b32d134b Lots of fixes for floating point handling; version now at 1.11.0.
Some of the following changes are ggn's, and some are mine:

 - When tokenizing floats we need to store them using a double pointer
 - PTR union needed a (double *)
 - Major changes to float depositing in eagen0.c
 - Reverted the changes in expr.c so at least floats are processed by
   expr() and friends
 - SYM svalue needs to be 64 bits
 - When EQUing a float symbol don't chop off the upper 32 bits from eval
 - Added fltpoint.{c,h} in order to properly create IEEE-754 floating
   point and Motorola extended numbers
 - Fixed float evaluations in evexpr()
 - Fixed floating point depositions in direct.c (in d_dc())
 - Upped the BSD image limit in object.c to 8MB for crazy people making
   6MB Jaguar ROMs (will need a real fix at some point)
2018-01-21 08:25:06 -06:00
Shamus Hammons 4ca28ba07d Small cleanups + version bump for last commit.
Version now at 1.10.2.
2017-11-29 18:52:47 -06:00
ggn c2caacfdc8 Modified IMACRO and IREPT to store line numbers during definition - error now correctly prints source line number 2017-11-29 13:58:33 -06:00
Shamus Hammons eace4e1b29 Roll back TOKENPTR changes and most of the .u32 changes weren't needed.
The last commit had gone a bit overboard with the 32 vs 64 bit token
changes; this has been rectified. There's still a ways to go with the
floating point code, but this should be stable for now. Version now at
1.10.1.
2017-11-29 07:57:58 -06:00
Shamus Hammons f3c7d186a1 Fixes for last commit; version is now 1.10.0.
The float changes will need some going over to ensure that we don't end
up with what we had when pointers were shoved into the token stream
willy-nilly.
2017-11-21 07:54:55 -06:00
ggn 582df8950c Added floating point support to expression evaluator, introduced FLOAT token, fixup FU_ equates, fixed a load of casting warnings that (some) led to codegen bugs. 2017-11-18 09:54:04 -06:00
Shamus Hammons ff8188b7e2 Add support for 64-bit evaluations.
Version bump to 1.9.0. Right now the only thing that supports it is
dc.d; now that the infrastructure supports it, anything else that needs
64-bit support (such as FPUs and the like) can be done very easily now.
2017-10-08 08:40:02 -05:00
Shamus Hammons cfd001aea6 Fix for section alignment values in ELF objects.
Thanks to SainT for the patch. :-)
2017-08-29 12:20:17 -05:00
Shamus Hammons a7d3861005 Version bump (1.8.4) for last commit. 2017-08-10 19:08:32 -05:00
ggn 05d0350b35 Multiple fixes for 020+ mode, including:
- Macro'd the FPU code generators.
- Fix some bfxxxx problems including {offset,width} parsing and valid <ea> modes.
- Add symbol checks for <ea> parsing
- Try at fixing k factor for fmove - had to change {} parsing in general so bfxxxx code was also changed.
- Fixed cinvl/p/a instructions. Converted all trapcc functions into macros.
- pmove/pmovefd fixed and verified against devpac.
- pack/unpk implemented and tested
- Fix left hand side of FPU register lists.
- Fix some 020 move parsing errors.
- Change tokenizer strategy to not munch forced .b/.w/.l extensions after constants
- Get rid of probably redundant code in m_move030.
- ploadr/ploadw implemented. Also added extra needed addressing mode to the mask for pmove which is used by the ploads too.
- Some pmove fixes.
- Added cpdbcc instructions.
- pflush/pflusha implemented for 68030/68040.
2017-08-10 18:52:53 -05:00
Shamus Hammons 49eac9eff9 Fix for bug #102. Thanks (blame!) go to ggn & dml for the idea. :-) 2017-07-20 14:15:53 -05:00
Shamus Hammons f7f625cf6c Fix for bug #101 (bad macro handling).
Just when you thought it was safe to write macros with constants, up
pops a condition you thought was dead and buried yet lurches inexorably
towards your code and causes it to segfault. As it turns out, it was
bad token stream parsing that caused this, with a constant masquerading
as a STRING token being the particular mischief maker. The code that
was in place was an awful mess of horrible garbage code that wasn't
even being used anymore--so that crap is gone, and replaced with
something more (I hope) sane and maintainable. I think that the code
that was there survived purging for so long because nobody really
understood it; now that I understand it, I can't believe that it was
written in the first place (to be fair, some of it was patching done by
me, though the bulk of awfulness didn't come from that code). Onward
and upward...
2017-07-19 23:22:01 -05:00
Shamus Hammons c9541a9d4f Fixed IREPT blocks to not corrupt memory on 64-bit hosts. 2017-07-19 15:27:06 -05:00
Shamus Hammons 96a5cd6957 Fixed bad char reporting, revamp of the error/warning system.
Somehow I put a unicode character in my assembly source and RMAC then
barfed up an internal error #2. Chasing this down, I finally determined
that the debug traces weren't lying to me and the input file had a
problem. However, RMAC wasn't reporting the illegal character correctly
either, so that was fixed (who knew that gcc was silently killing bit 7
of chars now?). I also realized that having five separate functions for
reporting errors (and the cruft of using those crippled things) was just
a wee bit insane, so now we have proper variable argument error and
warning functions (they can be used just like a printf). Enjoy!
2017-06-23 19:03:24 -05:00
ggn 03dd34951a (c) message in header files and doc mini adjustments. 2017-05-08 09:15:22 -05:00
Shamus Hammons 5f23454f71 Code cleanup from last patch, also, version bump for same. :-) 2017-05-06 21:07:36 -05:00
ggn 5cd8a4814b Initial commit for 68020/30/40/60/68881/68882/68851 support. 2017-05-06 13:06:57 -05:00
Shamus Hammons 51cff2ac6c Version bump for last commit. :-) 2017-05-05 08:33:31 -05:00
ggn 732c626abe Fix for bug where in alcyon mode the tokenizer would read past the end of the line. 2017-05-05 08:29:54 -05:00
Shamus Hammons 2601908757 Version bump for last commits. :-) 2017-04-27 08:14:08 -05:00
Shamus Hammons 9207a38ed4 Fixed code to remove warnings. Inching closer towards zero. :-) 2017-04-24 22:30:42 -05:00
Shamus Hammons 751aa148a9 Minor tweaking from last round of patching, version bump. :-) 2017-04-21 16:36:06 -05:00
ggn a3feec3b2d Much better implementation for A8 strings - introduced a new token called STRINGA8. Also, all this time we forgot to update mntab :). 2017-04-21 16:26:28 -05:00
Shamus Hammons 968958cccf Version bump for last commit. ;-) 2017-04-21 13:59:50 -05:00
ggn 2161b198b7 6502 mode: fix clearing of its RAM space with each .6502 invocation. Also fixed chptr resetting with each .6502 invocation. Also in this mode: dc.b strings with single quotes will get encoded to Atari 800 internal encoding (hardcoded mode for now, can be extended). 2017-04-21 13:42:40 -05:00