Commit Graph

78 Commits

Author SHA1 Message Date
Károly Balogh
258b42de26 m68k: added support for FSIN/FCOS. these are software supported on the 68040, so we should have a separate 68040/060 FPU option too, to avoid these in the future.
git-svn-id: trunk@30257 -
2015-03-17 22:52:53 +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
9d6f763d4f m68k: small helpers to determine a given int value fits into a certain size or instruction argument
git-svn-id: trunk@29605 -
2015-02-02 08:25:01 +00:00
Károly Balogh
6070ac3def m68k: some more basic FPU stuff
git-svn-id: trunk@29407 -
2015-01-05 05:26:44 +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
sergei
c79cd3beca * m68k: fixed/completed the inverse_cond function.
git-svn-id: trunk@28052 -
2014-06-25 05:23:30 +00:00
Károly Balogh
7ee09b9620 instead of supporting SP only, have register A7 defined, and have SP as an alias
git-svn-id: trunk@27572 -
2014-04-13 21:02:16 +00:00
Károly Balogh
80b253c111 be consistent in naming. renamed VOLATILE_ADDRESSREGISTER to VOLATILE_ADDRESSREGISTERS
git-svn-id: trunk@26463 -
2014-01-15 01:31:41 +00:00
Károly Balogh
97864d7cbd trying harder to commit compilable code (manual merge fail)
git-svn-id: trunk@25764 -
2013-10-13 18:31:43 +00:00
Károly Balogh
3b99974847 set up register A6 to be saved as well. this will only happen in case A6 is not used as framepointer
git-svn-id: trunk@25759 -
2013-10-13 16:12:32 +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
280ee919b7 removed several debug writeln()s
git-svn-id: trunk@25741 -
2013-10-10 21:20:20 +00:00
svenbarth
c48d572996 Implement support for saving and restoring address registers.
cgobj.pas, tcg:
  * g_save_registers: add the amount of used address registers to size as well
  * g_save_registers: save all used address registers
  * g_restore_registers: restore all stored address registers
m68k/cpubase.pas:
  * rename saved_standard_address_registers to saved_address_registers
all other platform's cpubase.{inc,pas} (except alpha, ia64 and vis which are not up to date):
  * add a saved_address_registers variable with one entry of RS_INVALID

At least a "make fullcycle" did complete.

git-svn-id: trunk@25664 -
2013-10-05 21:43:42 +00:00
Károly Balogh
55be015a4e better version of the ColdFire TST.L 123(dX) fix, fixes regressions in tcnvint1 and 2
git-svn-id: trunk@25651 -
2013-10-05 16:52:39 +00:00
svenbarth
03623c6c1a Forgot to commit that I moved tcgsize2opsize from cgcpu to cpubase.
git-svn-id: trunk@25630 -
2013-10-03 14:34:54 +00:00
masta
e327b4581c Use TRegNameTable instead of array[tregisterindex] of string[10]
TRegNameTable is defined in compiler/rgbase.pas and is an array of
strings, limited to the maximum length of the used register names.

r22792 added a long register name but did not scale the string-size
enough, resulting in the compiler built breaking for arm.

git-svn-id: trunk@22817 -
2012-10-22 10:23:21 +00:00
florian
04543b179f o merge of the branch laksen/arm-embedded of Jeppe Johansen:
fixes a couple of arm-embedded stuff, 
  adds some controllers, start of fpv4_s16 support, for a complete list of
  changes see below:
------------------------------------------------------------------------
r22787 | laksen | 2012-10-20 22:00:36 +0200 (Sa, 20 Okt 2012) | 1 line

Properly do NR_DEFAULTFLAGS detection/allocation/deallocation
------------------------------------------------------------------------
r22782 | laksen | 2012-10-20 07:44:55 +0200 (Sa, 20 Okt 2012) | 1 line

Fixed flags detections code for wide->short optimization code for Thumb-2
------------------------------------------------------------------------
r22778 | laksen | 2012-10-19 20:23:14 +0200 (Fr, 19 Okt 2012) | 1 line

Added coprocessor registers, and support for 6 operands(MCR/MRC instructions, etc)
------------------------------------------------------------------------
r22647 | laksen | 2012-10-14 21:28:08 +0200 (So, 14 Okt 2012) | 1 line

Added register specifications to lpc1768.pp. From Joan Duran
------------------------------------------------------------------------
r22646 | laksen | 2012-10-14 21:10:20 +0200 (So, 14 Okt 2012) | 4 lines

Fixed some minor formating issues
Implemented a small heap mananger
Implemented console IO
Changed default LineEnding to CrLf(to ease console IO parsing)
------------------------------------------------------------------------
r22599 | laksen | 2012-10-09 08:58:58 +0200 (Di, 09 Okt 2012) | 1 line

Added all STM32F1 configurations
------------------------------------------------------------------------
r22597 | laksen | 2012-10-08 22:10:45 +0200 (Mo, 08 Okt 2012) | 1 line

Added initial support for the Cortex-M4F FPv4_S16 FPU
------------------------------------------------------------------------
r22596 | laksen | 2012-10-08 22:04:14 +0200 (Mo, 08 Okt 2012) | 1 line

Added FPv4_d16 FPU instructions, and a few extra registers
------------------------------------------------------------------------
r22592 | laksen | 2012-10-08 16:07:40 +0200 (Mo, 08 Okt 2012) | 2 lines

Added support for IT block merging
Added a peephole pattern check for UXTB->UXTH chains
------------------------------------------------------------------------
r22590 | laksen | 2012-10-08 14:30:00 +0200 (Mo, 08 Okt 2012) | 3 lines

Add CBNZ/CBZ instructions
Create preliminary Thumb-2 PeepHoleOptPass2 code, hacked together from the ARM mode code
Added a number of simple size optimizations for common Thumb-2 instructions
------------------------------------------------------------------------
r22582 | laksen | 2012-10-08 06:49:39 +0200 (Mo, 08 Okt 2012) | 3 lines

Fix optimizations of Thumb-2 code
Fix problem with loading of condition operand for IT instructions
Properly split IT blocks when register allocator tries to spill inside a block.
------------------------------------------------------------------------
r22581 | laksen | 2012-10-08 05:15:40 +0200 (Mo, 08 Okt 2012) | 4 lines

Fixed assembler calling command line for cpus>ARMv5TE. EDSP instructions will generate errors while assembling, due to RTL assembler routines
Updated boot code for all Cortex-M3 controllers, and sc32442b to use weak linking for exception tables.
Cortex-M3 devices now also share initialization routine to simplify maintenance
STM32F10x classes now have specific units which fit the interrupt source names and counts
------------------------------------------------------------------------
r22580 | laksen | 2012-10-08 05:10:44 +0200 (Mo, 08 Okt 2012) | 2 lines

Added support for .section, .set, .weak, and .thumb_set directive for GAS assembler reader
IFDEF'ed JVM specific assembler directives, to prevent ait_* set to exceed 32 elements
------------------------------------------------------------------------
r22579 | laksen | 2012-10-08 02:10:52 +0200 (Mo, 08 Okt 2012) | 3 lines

Remove all traces of the interrupt vector table generation mechanism
Clean up cpuinfo tables
Fixed ARMv7M bug(BLX <label> doesn't exist on that version)

git-svn-id: trunk@22792 -
2012-10-21 08:39:52 +00:00
svenbarth
786e814d49 Use the correct frame pointer register: A6 on Unixes and A5 on everything else. The only
open question is embedded systems (currently it counts as "everything else").

git-svn-id: trunk@22741 -
2012-10-18 20:11:49 +00:00
Jeppe Johansen
0087661fb5 Added FPv4_d16 FPU instructions, and a few extra registers
git-svn-id: branches/laksen/arm-embedded@22596 -
2012-10-08 20:04:14 +00:00
florian
4dee21c60e + NR_DEFAULTFLAGS and RS_DEFAULTFLAGS for all CPUs with flags added
git-svn-id: trunk@22181 -
2012-08-22 19:38:27 +00:00
Jonas Maebe
708a2532fc * consistently define empty saved_mm_registers arrays as containing a single
RS_INVALID superregister (instead of sometimes RS_NO and sometimes
    RS_INVALID)
  * check for RS_INVALID in tcg.g_save_registers() and ignore such entries

git-svn-id: trunk@21622 -
2012-06-15 18:24:25 +00:00
Jonas Maebe
85a3fd3357 + ossinttype/osuinttype defs that correspond to OS_SINT/OS_INT for use in
the high level code generator

git-svn-id: trunk@21279 -
2012-05-12 16:03:15 +00:00
Jonas Maebe
34c985cfa6 * added register type parameter to cgsize2subreg(), as the subreg can
depend on that (and correct a number of cases where this was wrong)
  * set the correct subreg type for xmm x86_64 parameter registers
    (resolved mantis #14067)

git-svn-id: trunk@13410 -
2009-07-19 13:57:23 +00:00
yury
491f0fa1d8 * Replaced all user defined warnings by TODO comments to reduce compiler noise.
git-svn-id: trunk@11443 -
2008-07-23 11:00:03 +00:00
Károly Balogh
14f958682c + first attempt to implement a_call_reg
+ various other changes

git-svn-id: trunk@9127 -
2007-11-04 01:40:02 +00:00
florian
00d6a03b2c + default code now preserves mm registers
* save|restore_standard_registers => save|restore_registers

git-svn-id: trunk@8954 -
2007-10-27 12:02:28 +00:00
florian
3a630340be * fixed m68k compilation and put it in fullcycle
git-svn-id: trunk@8953 -
2007-10-27 11:24:50 +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
Jonas Maebe
90cacb4cf5 * changed result type of dwarf_reg from byte to shortint to avoid
warning about comparison which can never be true

git-svn-id: trunk@4183 -
2006-07-14 17:25:16 +00:00
peter
870be04a3f * use dwarf_reg()
git-svn-id: trunk@3046 -
2006-03-26 20:15:32 +00:00
Károly Balogh
3b2fe2b622 * some more tiny m68k hacks...
git-svn-id: trunk@2804 -
2006-03-07 23:01:55 +00:00
florian
2c1e796f1f * fixed regallocator for m68k
git-svn-id: trunk@2395 -
2006-02-01 20:26:28 +00:00
Károly Balogh
37024dc4d0 + more m68k mess... ignore :)
git-svn-id: trunk@2384 -
2006-01-31 16:58:50 +00:00
Károly Balogh
db07870443 totally messy m68k changes. cleanup in progress
git-svn-id: trunk@2352 -
2006-01-27 14:20:35 +00:00
florian
d7a5ca107b * fixed m68k compilation while sitting bored in the train
git-svn-id: trunk@1823 -
2005-11-25 23:08:46 +00:00
florian
804207239d *c <int64>:=-<longint> fixed (bug 4253)
git-svn-id: trunk@796 -
2005-08-05 19:00:30 +00:00
Károly Balogh
bbfea4d03f an attempt to fix a bit more stuff in m68k
git-svn-id: trunk@794 -
2005-08-04 21:28:25 +00:00
Károly Balogh
94281c5589 few fixes and advancements. 68k cg now compiles empty system unit without crashing.
git-svn-id: trunk@224 -
2005-06-05 23:36:35 +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
04c97cc129 * load jmp_buf_size from system unit 2005-01-20 16:38:45 +00:00
Károly Balogh
6bae9c8f6d * made m68k to compile again 2005-01-08 04:10:36 +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
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
e9bb27df36 * spilling of doubles on sparc fixed 2004-06-20 08:47:33 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
florian
2555cc8496 * register numbers for address registers fixed 2004-05-06 22:01:54 +00:00
florian
5168141540 * m68k compiler compilation fixed 2004-05-06 20:30:51 +00:00