Commit Graph

42 Commits

Author SHA1 Message Date
Károly Balogh
19a6964088 m68k: add subregisters. on 68k, these are not as universal as on x86 and work differently, but the compiler needs this infrastructure to do 16bit math (which is a massive improvement on '000) or word-size indexes on CPUs which support it
git-svn-id: trunk@43043 -
2019-09-20 11:35:35 +00:00
Károly Balogh
5eee29e5d1 m68k: refactor some code to not fail when the tasmop set will be bigger than 256 elements
git-svn-id: trunk@42926 -
2019-09-05 21:49:27 +00:00
Károly Balogh
57b2064cdd m68k/palmos: support the prc-tools specific @END hack for globals when writing data symbols
git-svn-id: trunk@37897 -
2018-01-04 07:57:29 +00:00
Károly Balogh
d115b0e8dc m68k: changed the internal name of 68k MacOS from system_m68k_mac to system_m68k_macos, so it's consistent with the PowerPC version. suggestion/request by Sven :)
git-svn-id: trunk@37035 -
2017-08-22 11:22:15 +00:00
Károly Balogh
e3ffeed1b2 m68k: removed traces of the never obsolete/ancient openbsd-m68k and never existed freebsd-m68k ports
git-svn-id: trunk@36877 -
2017-08-12 08:52:44 +00:00
pierre
225c4f33e9 Use old -m68020 architecture option for m68k-palmos assembler (version 2.14 from PRC tools)
git-svn-id: trunk@36865 -
2017-08-09 13:37:17 +00:00
Károly Balogh
a405b5a150 m68k: improve getreferencestring function a bit
git-svn-id: trunk@35634 -
2017-03-20 23:48:28 +00:00
Károly Balogh
2dc1d681c2 m68k: inherit the aout assembler writer instead of the normal one for amiga and atari. this allows to remove some of the previously added hacks in the generic writer
git-svn-id: trunk@35114 -
2016-12-12 22:41:53 +00:00
Károly Balogh
4e51dc2298 m68k: enable named sections for vasm generated objects. have a separate as_m68k_as_aout for a.out objects which doesn't have named sections. amiga and atari gas defaults to a.out, so have it default on these systems. finally enable section smartlinking for amiga and atari, which will be used with vasm assembler
git-svn-id: trunk@35112 -
2016-12-11 23:27:24 +00:00
Jonas Maebe
74a49b5f91 * restructured the the TExternalAssembler constructors so that the
hack for the Jasmin descendent is no longer needed

git-svn-id: trunk@34852 -
2016-11-09 19:51:20 +00:00
Károly Balogh
5237a4d5e2 m68k: support register pair operands in assembler reader and writer, as used by some instructions (mainly DIVS/DIVU and friends) so we don't have to hack them as three operand instructions
git-svn-id: trunk@34782 -
2016-11-05 17:07:18 +00:00
Károly Balogh
c509036c11 m68k: added REMS/REMU to the special formatting requirements list in the assembler writer
git-svn-id: trunk@33840 -
2016-05-28 15:30:48 +00:00
Károly Balogh
e7838dad39 m68k: initial asm-level infrastructure to let the codegenerator output float consts as operands, which is supported on 88x/040/060
git-svn-id: trunk@33667 -
2016-05-10 13:47:46 +00:00
Károly Balogh
3e2319ff3a m68k: do not allocate/free the regset dynamically having it as a normal field is perfectly fine
git-svn-id: trunk@33665 -
2016-05-10 13:03:17 +00:00
Károly Balogh
2f23b5f0fd m68k: output some GAS specific pseudo instructions in the GNU as writer, so the assembler can do branch size optimization for us
git-svn-id: trunk@33559 -
2016-04-26 01:34:26 +00:00
Károly Balogh
b799ca40f8 m68k: various cleanups and improvements in the GAS assembler writer: pass operands to the helpers by reference, removed a few extra shortstring copies, cleanups
git-svn-id: trunk@32849 -
2016-01-05 04:12:00 +00:00
Károly Balogh
aa424fc81f m68k: use R_SUBNONE instead of R_SUBWHOLE for FPU regs, indentation fixes of some old code and various cleanups
git-svn-id: trunk@32659 -
2015-12-13 19:24:44 +00:00
Jonas Maebe
991e1f49bd * store a pointer to the used tasminfo record in every assembler writer, so
that we can use assembler writers with different conventions from the
    currently set target_asm (e.g. an x86 assembler writer for inline assembly
    in LLVM IR)

git-svn-id: trunk@31628 -
2015-09-12 23:32:13 +00:00
Jonas Maebe
b3d0197f98 * factored out the output file handling (mostly writing data) from the
external assembler writer, so we can reuse the archtecture-specific
    writers to write inline assembly in LLVM IR files

git-svn-id: trunk@31625 -
2015-09-12 23:32:01 +00:00
Károly Balogh
c062e55aa2 m68k: after a compare on the FPU, move the condition flags back to the CPU. this should make floating point compare actually working
git-svn-id: trunk@29704 -
2015-02-15 13:41:40 +00:00
Károly Balogh
a99c9c29b6 m68k: basic 68881 FPU register save/restore support. probably still needs some work here and there.
git-svn-id: trunk@29644 -
2015-02-07 22:13:07 +00:00
pierre
6d4a9aad66 pass new asm extra opt using -ao option
git-svn-id: trunk@26539 -
2014-01-21 00:16:26 +00:00
Károly Balogh
275031a0dd fix a bogus R_INTREGISTER to be R_ADDRESSREGISTER in getopstr()
git-svn-id: trunk@25744 -
2013-10-10 22:24:56 +00:00
Károly Balogh
fe3d11118c add string version of the new instructions to the right place. removed one more duplicate table.
git-svn-id: trunk@25743 -
2013-10-10 22:12:40 +00:00
Károly Balogh
dfe2f253f9 added 68040 CPU type, MOVE16 and ColdFire V4 extra instructions
git-svn-id: trunk@25742 -
2013-10-10 22:01:58 +00:00
Károly Balogh
bcab04538c removed unused table, cleanups
git-svn-id: trunk@25740 -
2013-10-10 21:19:15 +00:00
florian
babbc21afd * fix handling of register sets on m68k: it is required that they are stored as two tcpuregistersets because address registers and data registers have different register types
git-svn-id: trunk@25726 -
2013-10-09 18:15:06 +00:00
pierre
080034982f Use GasCpuTypeStr array: GAS uses different names for cpu variants
git-svn-id: trunk@23177 -
2012-12-18 15:04:57 +00:00
Jonas Maebe
6497d3c994 - removed no longer used/supported af_allowdirect flag (direct assembler
reader support)

git-svn-id: trunk@22794 -
2012-10-21 13:42:58 +00:00
svenbarth
0217efc398 m68k/ag68kgas.pas, getreferencestring:
It seems that GNU as needs the syntax "offset(register.size*scale)" if the base address
  register is ommited instead of "offset(,register.size*scale)". Now the System unit
  assembles and nearly the complete RTL can be built.

git-svn-id: trunk@22734 -
2012-10-18 20:11:15 +00:00
Jonas Maebe
ac43eb9b70 + generic implementation of ReplaceForbiddenAsmSymbolChars() instead
of the AVR-specific ifdef'ed variant
   o since the only special character we use in mangled names on all platforms
     is $, added a new field to tasminfo called "dollarsign" that holds the
     character $'s should be replaced with (if it doesn't have to be replaced,
     leave it at $)

git-svn-id: trunk@20801 -
2012-04-11 18:01:57 +00:00
Jonas Maebe
b1c3f76ff9 * changed the supported targets for assembler writers to a set, and
(hopefully correctly) limited all assembler writers to only the
    OSes they support (mantis #11801)

git-svn-id: trunk@12622 -
2009-01-28 15:12:43 +00:00
florian
bd4bb505b3 * put Charlie's writeln debugger between DEBUG_CHARLIE conditional compilation symbols
git-svn-id: trunk@8503 -
2007-09-16 11:43:04 +00:00
Károly Balogh
e5249a8b56 + some messy m68k changes (first attempt to implement a_param_*)
git-svn-id: trunk@5782 -
2007-01-02 00:11:52 +00:00
Károly Balogh
d6844efccc + fixed dbra errors
git-svn-id: trunk@5544 -
2006-12-05 19:03:20 +00:00
Károly Balogh
119cdbb772 - fixed bra #.label assembler errors hopefully
git-svn-id: trunk@5492 -
2006-11-26 16:19:54 +00:00
florian
4cbb67aa00 * some fpu emulation code from arm to generic code generator moved
* several m68k fixes

git-svn-id: trunk@5218 -
2006-11-04 10:23:35 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
Károly Balogh
314e1672b7 + fixed m68k for latest changes
git-svn-id: trunk@2834 -
2006-03-10 14:23:08 +00:00
Károly Balogh
3b2fe2b622 * some more tiny m68k hacks...
git-svn-id: trunk@2804 -
2006-03-07 23:01:55 +00:00
carl
5c6c9c0499 - remove no longer used files 2002-08-05 17:20:59 +00:00
peter
d93a445b58 * moved into m68k subdir 2000-11-30 20:30:33 +00:00