ggn [Sat, 18 Jul 2020 16:34:16 +0000 (19:34 +0300)]
Fix a bug in +o5 where outer displacement would not optimise to word size
ggn [Sat, 18 Jul 2020 16:17:11 +0000 (19:17 +0300)]
Tidy up ([bd,An/PC],Xn.W/L...) size and scale parse code
ggn [Sat, 18 Jul 2020 15:26:53 +0000 (18:26 +0300)]
All size optimisation warnings are hidden by default unless rmac is invoked with '-s' (TODO: add optimisation flag(s) for these)
ggn [Sat, 18 Jul 2020 15:15:43 +0000 (18:15 +0300)]
Tighten up ea parsing for 020+ ea modes: PC relative 020+ modes are not allowed in the destination field
ggn [Sat, 18 Jul 2020 15:13:49 +0000 (18:13 +0300)]
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)
Shamus Hammons [Mon, 20 Jul 2020 14:45:09 +0000 (09:45 -0500)]
Reign in internal help back to 80 columns. :-P
Shamus Hammons [Fri, 17 Jul 2020 23:45:33 +0000 (18:45 -0500)]
Version bump for last commit + ws cleanups. Now at v2.0.18.
ggn [Fri, 17 Jul 2020 20:23:08 +0000 (23:23 +0300)]
Slight revamp of the optimisation system, featuring: strengthened flag parser, slight merge of two 020+ flags, fixes for +o6,+o8,+o9 and maybe more!
ggn [Thu, 16 Jul 2020 13:15:54 +0000 (16:15 +0300)]
Fix for bug #165: apply checks when transforming adda to lea, and also negate value in the case of suba
ggn [Wed, 15 Jul 2020 15:05:00 +0000 (18:05 +0300)]
Updates to the manual for .opt and .incbin
Shamus Hammons [Fri, 17 Jul 2020 23:05:25 +0000 (18:05 -0500)]
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.
Shamus Hammons [Sat, 4 Jul 2020 17:29:20 +0000 (12:29 -0500)]
Add sanity checks to input line tokenizer. Probably will need more.
Shamus Hammons [Sat, 4 Jul 2020 16:35:44 +0000 (11:35 -0500)]
Fix a small buglet in the last patch. :-)
Shamus Hammons [Sat, 4 Jul 2020 16:30:11 +0000 (11:30 -0500)]
Version bump for last commit. Now at v2.0.16.
ggn [Sat, 4 Jul 2020 09:56:21 +0000 (12:56 +0300)]
Extend incbin to incbin "filename" [,][size][,][offset]
Shamus Hammons [Sat, 4 Jul 2020 16:09:52 +0000 (11:09 -0500)]
Fix for bug #149; thanks to ggn for the patch. Now at v2.0.15.
Shamus Hammons [Sat, 4 Jul 2020 15:56:15 +0000 (10:56 -0500)]
Accidentally committed wrong makefile. :-/
Shamus Hammons [Sat, 4 Jul 2020 15:54:16 +0000 (10:54 -0500)]
Version bump for last commit; now at v2.0.14.
ggn [Sun, 7 Jun 2020 16:24:13 +0000 (19:24 +0300)]
Fix gcc10/clang link errors by adding "extern" to exported variables and defining a couple in headers (issue #162)
Shamus Hammons [Fri, 8 May 2020 15:22:41 +0000 (10:22 -0500)]
Version bump for latest patch. Now at v2.0.13.
James Jones [Sun, 12 Apr 2020 05:25:48 +0000 (22:25 -0700)]
Properly advance past register bank specifier
Register banks, like all constants, are stored
in the token stream as uint64_t values. Hence,
to advance the stream, the 32-bit tok pointer
must be advanced twice after parsing a register
bank.
Shamus Hammons [Mon, 2 Mar 2020 14:03:56 +0000 (08:03 -0600)]
Version bump for last commit; now at v2.0.12.
ggn [Sun, 1 Mar 2020 20:24:50 +0000 (22:24 +0200)]
Supplementary fix for bug #140. Apparently
bf4dbb2860116dd1d0fd934b28a16f9eb15cd7fd wasn't enough, we needed to add some extra logic to AddBSDSymEntry
Shamus Hammons [Fri, 28 Feb 2020 23:24:59 +0000 (17:24 -0600)]
Added check to see that include paths actually exist.
RMAC will now yell at you if you give it a bogus include path. Thanks
to ggn for the idea! Now at v2.0.11.
Shamus Hammons [Fri, 17 Jan 2020 20:16:03 +0000 (14:16 -0600)]
Version bump for last commits; now at v2.0.10.
ggn [Thu, 16 Jan 2020 09:47:59 +0000 (11:47 +0200)]
Add support for some missing ptestr/ptestrw/fsmove/fdmove. Add DSM in directives tab
ggn [Fri, 17 Jan 2020 11:56:40 +0000 (13:56 +0200)]
Added new optimisation option "+op" which enforces PC relative mode (#123)
ggn [Wed, 15 Jan 2020 06:31:07 +0000 (08:31 +0200)]
Forgotten file for the VS project
Shamus Hammons [Wed, 15 Jan 2020 04:14:01 +0000 (22:14 -0600)]
Fixes for bug #144 (unitialized code paths in 6502 codegen).
I was able to throw away a bunch of code in m6502cg(); things should be
much clearer vis-a-vis how things are parsed and code flow through that
function. Plus it's always nice to be able to throw away code. :-)
Now at v2.0.9.
Shamus Hammons [Fri, 10 Jan 2020 15:08:27 +0000 (09:08 -0600)]
Version bump for previous commits; now at v2.0.8.
Shamus Hammons [Fri, 10 Jan 2020 15:06:55 +0000 (09:06 -0600)]
Further fix for bug #135 (added RISC error reporting).
ggn [Thu, 9 Jan 2020 09:40:02 +0000 (11:40 +0200)]
Introducing new switch -fr which outputs binaries assembled at a given address.
ggn [Wed, 8 Jan 2020 12:47:49 +0000 (14:47 +0200)]
Fix for #145 - addressing mode mask was not restrictive enough for destinations
Shamus Hammons [Sat, 4 Jan 2020 16:24:57 +0000 (10:24 -0600)]
Fix for bug #135 (RISC error reporting for immediate values).
Thanks to Linkovitch for the report; now at v2.0.7.
Shamus Hammons [Fri, 3 Jan 2020 16:37:08 +0000 (10:37 -0600)]
Version bump for last commits; now at v2.0.6.
ggn [Fri, 3 Jan 2020 06:46:19 +0000 (08:46 +0200)]
Actually implement ^^FILESIZE this time :)
ggn [Fri, 3 Jan 2020 06:09:01 +0000 (08:09 +0200)]
Updated VS2015 project files, it should now build out of the box on VS2015 and later
Shamus Hammons [Fri, 3 Jan 2020 15:25:26 +0000 (09:25 -0600)]
EOY minor update.
Shamus Hammons [Fri, 3 Jan 2020 15:21:02 +0000 (09:21 -0600)]
Minor changes and version bump for prior commit; now at v2.0.5.
ggn [Fri, 3 Jan 2020 07:04:32 +0000 (09:04 +0200)]
Yet another fix for bug #77 - eval is now uint64_t so the check wasn't correct
Shamus Hammons [Thu, 2 Jan 2020 22:06:56 +0000 (16:06 -0600)]
Fix for bug #140 (unusual COFF writer case); now at v2.0.4.
ggn [Mon, 3 Sep 2018 12:08:52 +0000 (15:08 +0300)]
Long forgotten helper script which is used to create tables for VS builds
Shamus Hammons [Thu, 2 Jan 2020 18:37:24 +0000 (12:37 -0600)]
Version bump for the last few commits. Now at v2.0.3.
ggn [Thu, 29 Aug 2019 12:09:37 +0000 (15:09 +0300)]
Added DSM directive for 56001 mode (and not only). Updated doc. Condensed usage message.
ggn [Tue, 27 Aug 2019 08:09:29 +0000 (11:09 +0300)]
Updated documentation for v2.0.0
ggn [Fri, 10 Aug 2018 07:59:04 +0000 (10:59 +0300)]
Implement ^^FILESIZE unary operator that returns the file size of a given file. Minor doc update
ggn [Wed, 27 Jun 2018 11:04:21 +0000 (14:04 +0300)]
When expanding macro parameters ("\{param_name}") inside strings don't warn about bad backslashes
ggn [Wed, 27 Jun 2018 10:15:36 +0000 (13:15 +0300)]
More correct calculation of ^^ABSCOUNT. Also updated VS project. Now at version 2.0.1.
Shamus Hammons [Fri, 9 Aug 2019 14:48:31 +0000 (09:48 -0500)]
Minor code cleanups.
Shamus Hammons [Fri, 9 Aug 2019 14:12:14 +0000 (09:12 -0500)]
Fix a few minor problems with 030 mode PC relative fixups.
Shamus Hammons [Thu, 8 Aug 2019 20:01:34 +0000 (15:01 -0500)]
Added missing d_ds handling, add kludge for 56K fixups.
Also added code to prevent dumping a 6502 section that had nothing in
it, as this is very annoying.
Shamus Hammons [Thu, 8 Aug 2019 02:21:55 +0000 (21:21 -0500)]
Forgot to update the copyright in rmac.c. D'oh! :-P
Shamus Hammons [Thu, 8 Aug 2019 02:15:19 +0000 (21:15 -0500)]
One more minor fix: add back FP values for 56001 in d_dc.
Shamus Hammons [Wed, 7 Aug 2019 23:24:52 +0000 (18:24 -0500)]
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
Shamus Hammons [Tue, 6 Aug 2019 15:16:20 +0000 (10:16 -0500)]
Added in DSP fixups to sect.c, misc. fixes for 6502 assembler.
Shamus Hammons [Mon, 20 Aug 2018 15:35:12 +0000 (10:35 -0500)]
Now we're pretty sure that the codebase doesn't cause any regressions.
Shamus Hammons [Sat, 23 Jun 2018 16:57:21 +0000 (11:57 -0500)]
Cleanup of codebase and initial commit of 56K assembler by ggn.
There's still a ways to go before this will work properly as we need to
add proper fixup handling and origin (".org") bookkeeping. As it is now,
the addition of all the miscellaneous bits and bobs to support the main
56K assembler are in place but they don't cause any regressions to the
existing assemblers already present in RMAC. Stay tuned for Round 2!
Shamus Hammons [Sun, 3 Jun 2018 15:01:45 +0000 (10:01 -0500)]
Minor fixups.
Basically give a more meaningful error message in incbin if the filename
is missing, and use the macros already defined in opkw.h instead of
cooking up our own and (possibly) getting out of sync later on down the
road.
Shamus Hammons [Wed, 16 May 2018 17:58:03 +0000 (12:58 -0500)]
Version bump for last commit; now at version 1.13.5.
ggn [Tue, 30 Jan 2018 12:29:52 +0000 (14:29 +0200)]
Bug fix in flognp1. Better handling of cpbcc/fbcc/pbcc groups of instructions.
Shamus Hammons [Wed, 16 May 2018 13:39:48 +0000 (08:39 -0500)]
Version bump for last patch; now at v1.13.4.
ggn [Tue, 15 May 2018 19:20:47 +0000 (22:20 +0300)]
Fix for bug 120. AND can never accept an address register as destination in all 680x0 CPUs
ggn [Wed, 16 May 2018 12:55:13 +0000 (15:55 +0300)]
Don't print bogus message about optimising long address if it's suffixed with .l. Bump to version 1.13.3
Shamus Hammons [Tue, 15 May 2018 18:36:04 +0000 (13:36 -0500)]
Version bump for last commit. Now at version 1.13.2.
ggn [Tue, 15 May 2018 15:59:52 +0000 (18:59 +0300)]
Remove hacky code that truncates absolute addresses. (Bug 38)
Shamus Hammons [Tue, 27 Feb 2018 02:43:58 +0000 (20:43 -0600)]
Minor tweak for OP data address fixups. Now at version 1.13.1.
Shamus Hammons [Mon, 26 Feb 2018 03:39:59 +0000 (21:39 -0600)]
Added Jaguar Object Processor assembler.
Rationale for this and how it works can be found in
docs/note-on-the-op-assembler.txt. Version now at 1.13.0.
Shamus Hammons [Sat, 24 Feb 2018 16:27:31 +0000 (10:27 -0600)]
Fix for subtle bug in the expression analyzer.
Turns out if you blindly promote arithmetic expressions to
ABS + DEFINED, it causes things to assemble wrong. This crept in around
v1.9.1; Now at version 1.12.5.
Shamus Hammons [Sat, 10 Feb 2018 17:41:18 +0000 (11:41 -0600)]
Add fixup stubs for FU_FLOATfoo types. Now at version 1.12.4.
Shamus Hammons [Sat, 10 Feb 2018 17:14:28 +0000 (11:14 -0600)]
Cleanups for the RISC assembler. Now at version 1.12.3.
Shamus Hammons [Sat, 10 Feb 2018 15:12:28 +0000 (09:12 -0600)]
Minor bugfix for FU_NUM15 fixups.
Since eval is an unsigned int, the check for eval < -16 would never be
true. This has been fixed by casting eval to an int. Now at v1.12.2.
Shamus Hammons [Sat, 10 Feb 2018 14:30:54 +0000 (08:30 -0600)]
Fix for D_foo() macros.
Seems that no bounds checking was been done for the majority of the
D_foo() macros; that has been fixed. Now at v1.12.1.
Shamus Hammons [Sat, 10 Feb 2018 05:08:47 +0000 (23:08 -0600)]
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.
Shamus Hammons [Wed, 24 Jan 2018 04:20:24 +0000 (22:20 -0600)]
Version bump for last eight commits; cleanup of Alcyon image writing.
Now at version 1.11.9.
ggn [Tue, 23 Jan 2018 12:46:00 +0000 (14:46 +0200)]
When an error occurs inside a macro or rept, report the exact line, not the line the macro or rept was invoked
ggn [Tue, 23 Jan 2018 12:07:23 +0000 (14:07 +0200)]
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 ;)
ggn [Tue, 23 Jan 2018 11:40:49 +0000 (13:40 +0200)]
Added missing (d16,An,Dn[.size][*scale]) addressing mode
ggn [Tue, 23 Jan 2018 11:19:50 +0000 (13:19 +0200)]
Fix for addressing mode base value getting clobbered by scale value
ggn [Tue, 23 Jan 2018 11:01:23 +0000 (13:01 +0200)]
FPU instructions debugged and stricter checks enforced
ggn [Tue, 23 Jan 2018 09:33:24 +0000 (11:33 +0200)]
divu.l/divs.l/mulu.l/muls.l debugged and condensed into one function
ggn [Tue, 23 Jan 2018 09:11:21 +0000 (11:11 +0200)]
Add flag -px in alcyon mode which enables extended GST symbol table.
ggn [Tue, 23 Jan 2018 08:57:01 +0000 (10:57 +0200)]
Added optimisation switches -o8 and -o9
Added optimisation switches -o8 (adda.w/l #x,Dy to addq.w/l #x,Dy) and
-o9 (adda.w/l #x,Dy to lea x(Dy),Dy), both off by default.
Shamus Hammons [Mon, 22 Jan 2018 18:04:31 +0000 (12:04 -0600)]
Fixes for slightly broken Motorola extended float generation.
Shamus Hammons [Sun, 21 Jan 2018 14:25:06 +0000 (08:25 -0600)]
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)
Shamus Hammons [Thu, 30 Nov 2017 00:52:47 +0000 (18:52 -0600)]
Small cleanups + version bump for last commit.
Version now at 1.10.2.
ggn [Wed, 29 Nov 2017 19:28:44 +0000 (21:28 +0200)]
Various small fixes and additions to the 680x0 parts:
- New command line switch -m[cpu] enables you to switch to a different cpu from the command line
- BYTESWAP64 macro fix
- New optimisation flags o6 and o7 turn null branches to NOP and convert clr.l Dx to moveq #0,Dx
- Remove tons of FPU/PMMU codegen functions in mech.c. They are now handled in a more smart way. Condition codes now stored in 68ktab - updated 68ktab to reflect that
ggn [Wed, 29 Nov 2017 18:47:38 +0000 (20:47 +0200)]
Modified IMACRO and IREPT to store line numbers during definition - error now correctly prints source line number
Shamus Hammons [Wed, 29 Nov 2017 13:57:58 +0000 (07:57 -0600)]
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.
Shamus Hammons [Tue, 21 Nov 2017 13:54:55 +0000 (07:54 -0600)]
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.
ggn [Thu, 26 Oct 2017 12:24:25 +0000 (15:24 +0300)]
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.
Shamus Hammons [Fri, 13 Oct 2017 23:00:10 +0000 (18:00 -0500)]
Small fix for spurious "out of range" errors (tied to 64-bit eval path).
Shamus Hammons [Sun, 8 Oct 2017 13:40:02 +0000 (08:40 -0500)]
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.
Shamus Hammons [Wed, 4 Oct 2017 16:25:45 +0000 (11:25 -0500)]
Patch to fix lack of WORD sized symbol relocations by SainT.
Version now at 1.8.7.
Shamus Hammons [Tue, 29 Aug 2017 18:49:06 +0000 (13:49 -0500)]
Missed a few double parens in eagen0.c. :-P
Shamus Hammons [Tue, 29 Aug 2017 18:28:18 +0000 (13:28 -0500)]
Added a few more fixes piggybacked on the last one; bump to v1.8.6.
ggn [Mon, 21 Aug 2017 17:48:32 +0000 (20:48 +0300)]
On some occasions elf output would misplace symbols due to the fact that it D_word thought that it would write outside current chunk.
Shamus Hammons [Tue, 29 Aug 2017 17:20:17 +0000 (12:20 -0500)]
Fix for section alignment values in ELF objects.
Thanks to SainT for the patch. :-)
Shamus Hammons [Fri, 11 Aug 2017 00:08:32 +0000 (19:08 -0500)]
Version bump (1.8.4) for last commit.
ggn [Tue, 1 Aug 2017 12:42:34 +0000 (15:42 +0300)]
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.
ggn [Sun, 30 Jul 2017 11:17:27 +0000 (14:17 +0300)]
Fix for reg keyword not working. Apparently it was renumbered (and unused) when the jaguar specific stuff went in and was never tested.