Commit Graph

60 Commits

Author SHA1 Message Date
Karoly Balogh
832b566097 m68k: add a CPU capability to signal the CPU has no 48 bit encodiing limits 2022-08-26 18:42:24 +02:00
florian
27fb9086aa * cleanup: cs_opt_loopunroll is a generic optimization for a long time already 2022-03-08 23:03:18 +01:00
florian
ff3acfb8cd * cleanup of 2.7.0 defines 2021-10-31 13:20:28 +01:00
Károly Balogh
6190258f5d m68k: new CPU capability - the LINK instruction supports LONG displacements (68020+)
git-svn-id: trunk@47849 -
2020-12-26 00:21:31 +00:00
Károly Balogh
2c8db3bb9e m68k: add support for bitfield instructions as CPU capability
git-svn-id: trunk@45383 -
2020-05-16 13:47:18 +00:00
Jonas Maebe
592df7fa59 * disable cs_opt_regvar on all platforms when compiled for LLVM (LLVM does
that itself, our LLVM code generator can't handle it, and if it did then
    afterwards we would have to spill 90% of those register variables again
    to make them SSA)

git-svn-id: trunk@44062 -
2020-01-29 22:21:07 +00:00
Károly Balogh
aea0f3e667 m68k: build fix (premature commits are the root of all evil too)
git-svn-id: trunk@42966 -
2019-09-09 07:47:34 +00:00
Károly Balogh
d25820b830 m68k: added CPUM68K_HAS_BYTEWORDMATH and CPUM68K_HAS_INDEXWORD capabilities
git-svn-id: trunk@42964 -
2019-09-08 22:43:34 +00:00
Károly Balogh
3662afe93b m68k: added more cpu capabilities. changed the CG at a few places to actually use them
git-svn-id: trunk@42763 -
2019-08-22 15:38:08 +00:00
Károly Balogh
4936358bee m68k: fpu capabilities support
git-svn-id: trunk@42739 -
2019-08-19 15:07:22 +00:00
pierre
828a248287 Systematically include fpcdefs.inc at sart of all units used by compiler
git-svn-id: trunk@42322 -
2019-07-03 13:35:05 +00:00
Károly Balogh
e1501c86bf m68k: fix no FPU support
git-svn-id: trunk@37227 -
2017-09-16 18:13:57 +00:00
Károly Balogh
cf8aebf00f m68k: enabled safecall exception wrappers with linux
git-svn-id: trunk@36575 -
2017-06-22 15:31:32 +00:00
Károly Balogh
a34b6c7c53 m68k: atari also uses syscalls, so update the comment for that too
git-svn-id: trunk@35375 -
2017-01-31 14:43:25 +00:00
svenbarth
4d41decd5d * since m68k has a working implementation for the register calling convention and it's in fact used as default calling convention it should also be possible to explicitely declare routines as that calling convention
git-svn-id: trunk@35351 -
2017-01-28 14:54:31 +00:00
svenbarth
d35e9a69fa * update comment regarding pocall_syscall in supported_calling_conventions
git-svn-id: trunk@35350 -
2017-01-28 14:53:17 +00:00
Károly Balogh
2bfa1b995a m68k: added division/remainder cpu capabilities
git-svn-id: trunk@33816 -
2016-05-26 14:41:00 +00:00
Károly Balogh
7fbae10515 m68k: added more cpu capabilities (unaligned access, long addressing, various MULx), and the 68060 cpu target
git-svn-id: trunk@33804 -
2016-05-25 22:14:58 +00:00
Károly Balogh
bd17976cf1 m68k: added Coldfire CPU capability MVS/MVZ instructions. also fixed CFv4e capabilities
git-svn-id: trunk@33655 -
2016-05-05 23:54:37 +00:00
Károly Balogh
9d2dad2463 m68k: added cpu type cfv4e, which is the only ColdFire with FPU, and GNU AS needs this to actually allow CF FPU code
git-svn-id: trunk@33556 -
2016-04-25 22:04:05 +00:00
Károly Balogh
bd564b8933 m68k: some code to support the ColdFire v4e FPU. not functional yet.
git-svn-id: trunk@33533 -
2016-04-18 03:25:32 +00:00
Károly Balogh
4e964c2ed7 m68k: rewrote fixref and a_load_ref_ref, fixing a bunch of problems on ColdFire, unifying and simplifying the code a lot, and hopefully not killing anything in the process
git-svn-id: trunk@33446 -
2016-04-08 03:27:19 +00:00
Jeppe Johansen
3cb9be73bc Moved tcontrollerdatatype out into cpuinfo.
Added cputype and fputype info to tcontrollerdatatype arrays.

git-svn-id: trunk@31574 -
2015-09-07 20:36:54 +00:00
florian
5c67fcc43f + change always floating point divisions into multiplications if they are a power of two,
this is an exact operation so it is always allowed
* change only divisions by normal numbers into multiplications

git-svn-id: trunk@29085 -
2014-11-16 20:47:38 +00:00
Tomas Hajny
3ee3542744 * boolean constant instead of IFDEFs for detection of microcontroller support
git-svn-id: trunk@29052 -
2014-11-10 12:34:59 +00:00
Károly Balogh
8acc260a09 m68k: added the byterev and ff1 CF ISAA+/ISAC instructions, also added byterev as a CPU capability
git-svn-id: trunk@28679 -
2014-09-16 01:39:02 +00:00
Károly Balogh
f91ae2700c m68k: added CPUM68K_HAS_ROLROR capability flag
git-svn-id: trunk@28616 -
2014-09-07 23:45:51 +00:00
Károly Balogh
7093efe4c4 fixed comment, no functional changes
git-svn-id: trunk@27266 -
2014-03-24 16:53:29 +00:00
Károly Balogh
6bd062b59f according to the M68K PRM and also GNU AS, plain 68000 has no BRA.L
git-svn-id: trunk@27083 -
2014-03-10 18:36:10 +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
svenbarth
6f5a648516 Improve the cpu type handling for M68k just in case we should branch 2.8.0 before I can start working on M68k again.
Therefor the cpu type (-Cp...) "coldfire" was split up into "isaa", "isaa+", "isab" and "isac". The Linux RTL can currently compiled for "68020", "isab" and "isac". For the other three Bcc.L must be handled differently (only Bcc.B/W supported) and for "68000" also EXT.L needs to be handled differently.

fpcdefs.inc:
  + define CPUCAPABILITIES if capabilities can be set for a certain CPU type (currently ARM, AVR and M68k)
options.pas:
  * check for CPUCAPABILITIES instead of specific CPUs
assemble.pas:
  - the handling of the CPU type is already done in m68k/ag68kgas.pas, Tm68kGNUAssembler.MakeCmdLine (and thereby already using the gascputypestr array!)
m68k/cpuinfo.pas:
  - tcputype: remove "cpu_coldfire"
  + tcputype: add "cpu_isa_a", "cpu_isa_a_p", "cpu_isa_b" and "cpu_isa_c"
  + add "cpu_coldfire" constant which contains all Coldfire specific cpu types
  * adjust "cputypestr" and  "gascputypestr"
  + add tcpuflags and cpu_capabilities (DBRA restriction was checked with CPUCOLDFIRE, CAS/TAS will be needed for atomic operations and BRAL restriction was discovered during testing of new cpu types)
m68k/cgcpu.pas:
  * adjust checks for "cpu_coldfire"
m68k/n68kadd.pas:
  * don't use a BRA.L if it is not supported, but (at least for now) a BRA.W
aggas.pas:
  * adjusted check for Coldfire

git-svn-id: trunk@25457 -
2013-09-11 17:07:32 +00:00
pierre
0af0da69b1 New GasCpuTypeStr array: GAS uses different names for cpu variants
git-svn-id: trunk@23176 -
2012-12-18 15:00:38 +00:00
florian
4d86d25c6c * -O4 switch for optimizations which are correct but which might have unexpected effects
like field reordering (possible problems cracker classes) or using ebp as normal register (broken
      stack traces from dump_stack)
    + niln is also valid in a cse domain
    * parameters passed by reference shall have a complexity >1
    * load nodes from outer scopes shall have a complexity >1
    * better cse debugging
    + more node types added to cse
    * consider parameters passed by reference in cse
    * take care of cse in parameters in simple cases

git-svn-id: trunk@22050 -
2012-08-09 18:58:54 +00:00
florian
b330bba0bc + introduce -Oofastmath
* limit the application of the tree transformation introduced in r21986 to safe cases and -Oofastmath

git-svn-id: trunk@22040 -
2012-08-08 19:35:45 +00:00
Jonas Maebe
3798b79fd7 + optimization that (re)orders instance fields of Delphi-style classes in
order to minimise memory losses due to alignment padding. Not yet enabled
    by default at any optimization level, but can be (de)activated separately
    via -Oo(no)orderfields
   o added separate tdef.structalignment method that returns the alignment
     of a type when it appears in a record/object/class (factors out
     AIX-specific double alignment in structs)
   o changed the handling of the offset of a delegate interface
     implemented via a field, by taking the field offset on demand
     rather than at declaration time (because the ordering optimization
     causes the offsets of fields to be unknown until the entire
     declaration has been parsed)

git-svn-id: trunk@21947 -
2012-07-22 16:47:19 +00:00
florian
5acf377e31 * enable node cse for all cpus as level 2 optimization
git-svn-id: trunk@14703 -
2010-01-17 12:28:28 +00:00
florian
abfdda6129 * small m68k cleanups
git-svn-id: trunk@8500 -
2007-09-16 10:21:17 +00:00
florian
2a54d957b2 * fixed two small errors
* supported_optimizerswitches now takes generic flags also into account

git-svn-id: trunk@4865 -
2006-10-11 21:14:47 +00:00
florian
a61abb25cb * reorganized optimizer switch sets
git-svn-id: trunk@4862 -
2006-10-11 18:16:10 +00:00
Jonas Maebe
8a6ebdf274 - disabled loop unrolling for level 3 optimizations since it only causes
crashes (and even if it didn't, on its own it mainly causes code
    bloat)

git-svn-id: trunk@2941 -
2006-03-17 17:42:39 +00:00
peter
2888a21593 * list supported optimization options in -i
* support $OPTIMIZATION and $O+

git-svn-id: trunk@2904 -
2006-03-13 11:17:56 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
8bc4e0a32f * inline and compilerproc are now procoptions instead of proccall types
(so both can be combined with each other, as well as with other calling
     conventions)
  * defined COMPPROCINLINEFIXED so SYSTEMINLINE is again activated

git-svn-id: trunk@658 -
2005-07-18 15:27:14 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
6c9c4c686c * small m68k updates to bring it up2date
* give better error for external local variable
2004-11-09 22:32:59 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
florian
71f80e8bef * continued to fix m68k compiler compilation 2004-05-01 23:29:01 +00:00