Commit Graph

47 Commits

Author SHA1 Message Date
Shamus Hammons 64dd9e00ec Fixes for bugs #211-213, submitted by Bastian Schick. :-) 2022-12-21 17:19:36 -06:00
ggn 0172b60145 Fix for #216 - add token scanner to assist ea expression parsing 2022-12-21 16:18:07 -06: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 5b53a2a9e5 Add new optimisation switches for 56001 mode that were missing. Added warnings to all optimisation messages, as well as mention which switch caused the optimisation. Moved opt +op to opt +30 (Issue #185) 2021-08-20 10:57:31 -05:00
ggn 22203fdc3b Fix for issue #179: Don't touch o10 when +/~Oall is called. Made the o10 error message more verbose. Updated documentation. 2021-06-08 20:11:29 -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 4a08774b12 Version bump + cleanup for last commit; now at v2.0.19. 2020-08-03 12:16:38 -05:00
ggn cadc95fb53 Fix a bug in +o5 where outer displacement would not optimise to word size 2020-08-03 11:42:36 -05:00
ggn 0ea4f9ed4f Tidy up ([bd,An/PC],Xn.W/L...) size and scale parse code 2020-08-03 11:42:36 -05:00
ggn d6e8469638 Tighten up ea parsing for 020+ ea modes: PC relative 020+ modes are not allowed in the destination field 2020-08-03 11:42:36 -05:00
ggn d812346ecf In ([bd,An/PC],Xn,od) parsing check for forced .w first and fall back to .l otherwise (worst case .l might get optimised to .w) 2020-08-03 11:42:36 -05:00
Shamus Hammons ac3149e460 Version bump for last commit + ws cleanups. Now at v2.0.18. 2020-07-17 18:45:33 -05:00
ggn 9afaf60ca2 Slight revamp of the optimisation system, featuring: strengthened flag parser, slight merge of two 020+ flags, fixes for +o6,+o8,+o9 and maybe more! 2020-07-17 18:20:19 -05:00
ggn fbbe9b115f Added new optimisation option "+op" which enforces PC relative mode (#123) 2020-01-17 13:56:41 -06:00
Shamus Hammons 4205233c83 EOY minor update. 2020-01-03 09:25:26 -06:00
Shamus Hammons bdbf34766f Added in DSP fixups to sect.c, misc. fixes for 6502 assembler. 2019-08-06 10:16:20 -05:00
Shamus Hammons 0561939cf6 Now we're pretty sure that the codebase doesn't cause any regressions. 2018-08-20 10:35:12 -05:00
ggn fce8ff3763 Don't print bogus message about optimising long address if it's suffixed with .l. Bump to version 1.13.3 2018-05-16 08:35:18 -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 81c752326a Version bump for last eight commits; cleanup of Alcyon image writing.
Now at version 1.11.9.
2018-01-23 22:20:24 -06:00
ggn 0951a3e289 Various small fixes including:
- Corner case in ([bd,An/PC],Xn,od) addressing mode where bd is suppressed
- 68060 specific instructions (68ktab, mach.c)
- PMMU instruction fixes (68ktab, mach.c)
- FMOVEM fixes (amode.c)
- Switching CPU state fixes (direct.c)
- Bitfield instruction fixes (mach.c)
- pflush fixes (68ktab, mach.c)
- Various warnings silenced (mark.c, riscasm.c)
- Formatting ;)
2018-01-23 20:32:40 -06:00
ggn a67f83362c Added missing (d16,An,Dn[.size][*scale]) addressing mode 2018-01-23 20:11:52 -06:00
ggn 8a5d76b0e6 Fix for addressing mode base value getting clobbered by scale value 2018-01-23 20:05:25 -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 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 79c1a7cc20 Version bump (1.8.2) for last commit. 2017-07-20 08:38:02 -05:00
ggn da0013df94 Various 020+ fixes. In brief, this commit fixes the following:
- Fix warning for \! inside string - we might be evaluating a macro so it's legal.
- Handle (Dn[.w][*scale],label[.l]) ea case.
- Enable scale value in ea to be expression (evaluated) besides constant.
- Fix for ([address[.wl]]). It seems that undefined symbols were not stored properly in eagen0.s (it used aNexpr instead of aNbexpr when storing base displacement).
- Fixes for fmove freg,freg (no size suffix) and ftst freg (no size suffix).
- fmovem now defaults to .x
- Fixed muls.l
2017-07-20 07:52:45 -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 60f204cb9e ELF support for RMAC.
ggn deserves most of the credit for this, as my job was going through
and tossing out the stuff that wasn't needed. ;-) There might be some
ELFish things that still need fixing; time, as usual, will tell.
2017-04-14 15:52:31 -05:00
ggn 02523045dc Removed -w flag, added +o[n], ~o[n] switches to control individual optimisations on/off, as well as +oall, ~oall for all optimisations.
Signed-off-by: Shamus Hammons <jlhamm@acm.org>
2016-09-12 21:25:48 -05:00
Shamus Hammons 66be644c3e Fix for bug #78: Thanks to ggn for reporting and supplying the patch.
Bug fix for .w access for alcyon target, added new optimisation that
converts 0(ax) to (ax).
2016-09-12 20:37:51 -05:00
ggn 917bfc1503 Extended switch -s to also warn about automatically applied 68000 optimisations. Added switch -w to turn off all automatic optimisations. 2015-11-17 07:40:58 -06:00
Shamus Hammons 52cea8604f Tentative fix for bug #55. Thanks to ggn for reporting! 2015-11-10 21:44:44 -06:00
Shamus Hammons d0c28c349d Fix for "*" getting bad section attributes, reported by A. Seed. 2015-02-19 08:56:14 -06:00
Shamus Hammons 062214e620 Fixed word reversed fixup problem.
For some reason, there was code in several places that marked fixups/symbols
as belonging to a RISC section when it was clearly not the case. As a result,
it caused serious problems by reversing words in 68K sections just because a
symbol had been seen in a MOVEI # statement in a RISC section. Probably not
the last nasty surprise in this pile of spaghetti. :-/
2014-05-17 15:56:15 -05:00
Shamus Hammons 75969398d9 Fixed subtle bug in expr().
Basically, expr() was looking at the token following the one it was
looking at and bypassing the longer parse path if it found an EOL token
there. Problem is, some tokens have follow on values and so can be
considered compound tokens. In this case, the EOL token codes to 101,
having a constant with a value of 101 will not evaluate correctly in
this case as the CONST token is a compound token.

The short of this is that making assumptions is BAD! Don't do it! It
WILL come around to bite you in the ass eventually, in the form of
subtle bugs that are difficult to chase down. Assume nothing!
2013-11-09 09:01:57 -06:00
Shamus Hammons 6c1bc37901 Fixed assembler not complaining when using RISC regs in 68K mode. 2013-09-12 21:59:10 -05:00
James Hammons 3385b36663 More readability cleanups. 2012-01-19 22:28:32 +00:00
James Hammons 75cce0d9eb Various cleanups to fix compiler warnings. 2011-12-26 23:54:45 +00:00
James Hammons d28f432296 Initial commit. 2011-12-26 22:50:27 +00:00