Sven/Sarah Barth
e94d02a067
* with all existing RTLs switched over to the atomic intrinsics, the define FPC_SYSTEM_INTERLOCKED_USE_INTRIN can be removed again
2024-12-12 22:05:20 +01:00
Sven/Sarah Barth
a815beea2c
* switch M68k RTL to provide atomic intrinsic helpers instead of Interlocked* functions
2024-12-12 22:05:16 +01:00
Rika Ichinose
ce5a632432
Remove the rest of the VER3_0 conditionals.
2024-09-01 17:13:39 +00:00
Jonas Maebe
0758aa1143
FPU exception mask: generlised system unit interface
2022-10-17 19:43:01 +00:00
Pierre Muller
870d612e15
Fix compilation of m68k-linux rtl with -dFPC_USE_LIBC
2022-06-08 00:20:57 +02:00
Karoly Balogh
ecef61e9c5
* m68k: fix an instruction which doesn't exist on ColdFire
2022-02-12 17:32:59 +01:00
Karoly Balogh
12ef9a4a22
* m68k: some CPUs don't have TAS either (for example some CF)
2022-02-11 01:53:19 +01:00
Karoly Balogh
3c5d6e7224
* m68k: implement basic support for interlocked functions using a TAS based global spinlock on CPUs which don't have the CAS instruction
2022-02-08 04:42:30 +01:00
pierre
3362abb30c
* Set softfloat_rounding_mode indise SetRoundMode function for all CPUs.
...
* SetRoundMode returns previous rounding mode value for all CPUs.
git-svn-id: trunk@48018 -
2021-01-03 21:44:18 +00:00
pierre
90d2982977
Wipe out any pre-existing exception on SetExceptionMask call for m68k cpu
...
git-svn-id: trunk@43908 -
2020-01-10 22:56:03 +00:00
pierre
d8298c9f14
Try to correctly handle m68k exceptions bits inside SetExceptionMask function
...
git-svn-id: trunk@43893 -
2020-01-08 23:08:30 +00:00
Károly Balogh
3a78ff1ee4
m68k: on setjmp/longjmp also save/restore the FPCR register when FPU support is enabled
...
git-svn-id: trunk@38522 -
2018-03-13 23:44:54 +00:00
svenbarth
9240e0c2e6
* fix 32-bit * 32-bit => 64-bit for Coldfire
...
git-svn-id: trunk@38060 -
2018-01-27 14:26:18 +00:00
svenbarth
8522474457
* correctly allocate the space for the 5 registers that are stored
...
git-svn-id: trunk@38054 -
2018-01-26 21:48:07 +00:00
svenbarth
bd57af5b19
* as Coldfire does not support ADD.W save the (original) lower word and restore it after D0 is swapped back (I hope the algorithm still works then O.o)
...
git-svn-id: trunk@38044 -
2018-01-25 20:02:16 +00:00
svenbarth
b7cdec3a2a
* Coldfire does not support EXG, so do it the old fashioned way (but before restoring the stored registers)
...
git-svn-id: trunk@38043 -
2018-01-25 19:59:50 +00:00
svenbarth
9822374680
* Coldfire does not support MOVEM together with pre-decrement or post-increment, so abuse TST for that which is only a single instruction word
...
git-svn-id: trunk@38042 -
2018-01-25 19:58:59 +00:00
svenbarth
00141749d5
* Coldfire does not support sub.w, so use sub.l instead for that CPU
...
git-svn-id: trunk@38041 -
2018-01-25 19:56:28 +00:00
Károly Balogh
c054117870
m68k: an assembly optimized longint to int64 implementation. removed the sarint64 helper from here
...
git-svn-id: trunk@37825 -
2017-12-26 22:41:06 +00:00
Károly Balogh
8326543918
m68k: apparently, the right place for the sar qword helper is still in the CPU include, not the 64bit helper include. this fixes linux m68k build.
...
git-svn-id: trunk@37820 -
2017-12-26 18:05:34 +00:00
Károly Balogh
7659b347cd
m68k: assembly optimized helper for the SarInt64 intrinsic
...
git-svn-id: trunk@37819 -
2017-12-26 16:34:01 +00:00
florian
ff86c80176
* cpu specific header file for the system unit: cpuh.inc, moved several declarations into it
...
git-svn-id: trunk@37542 -
2017-11-01 16:33:30 +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
f4a8a29aea
m68k: try to restore compilability with a 3.0 compiler
...
git-svn-id: trunk@37026 -
2017-08-22 09:05:20 +00:00
svenbarth
2c628e983d
* fix define so that m68k for Coldfire builds correctly again
...
git-svn-id: trunk@36688 -
2017-07-08 20:29:25 +00:00
Károly Balogh
17e85c4a09
m68k: rewritten FillChar from scratch. does aligned word and dword writes on large block fills. depending on the host CPU it's up to 5x faster on medium and large block fills
...
git-svn-id: trunk@36631 -
2017-07-03 19:22:51 +00:00
Károly Balogh
2d8313165d
m68k: support FFU exception settings, also reworked FPU initalization
...
git-svn-id: trunk@36618 -
2017-06-30 02:38:14 +00:00
Károly Balogh
30176f3116
m68k: enable inlined get_frame for m68k
...
git-svn-id: trunk@36577 -
2017-06-22 17:43:24 +00:00
Károly Balogh
238f423c71
m68k: implement the interlocked family of functions, to be used on Linux and BSDs
...
git-svn-id: trunk@36557 -
2017-06-21 01:02:49 +00:00
Károly Balogh
50812415d8
m68k: add a modified version of the generic fpc_round_real, which takes some m68k FPU oddities into account
...
git-svn-id: trunk@36531 -
2017-06-19 01:12:00 +00:00
Károly Balogh
f1ee65610d
m68k: added support for setting the rounding mode on hardware FPUs
...
git-svn-id: trunk@36523 -
2017-06-18 19:06:34 +00:00
Károly Balogh
a635f435b9
m68k: replaced fpc_longword_to_double function with a working and branchless version. fixes tcnvint4 test among others with FPU enabled.
...
git-svn-id: trunk@36503 -
2017-06-15 02:22:49 +00:00
Károly Balogh
35ddac66fc
m68k: fix frame pointer register on atari, and a few other non-amiga systems
...
git-svn-id: trunk@35204 -
2016-12-27 17:09:06 +00:00
Károly Balogh
7d2360eb0c
m68k: Test68000/Test68881 support boilerplate and special support for Amiga
...
git-svn-id: trunk@35194 -
2016-12-24 21:11:06 +00:00
Károly Balogh
6a856f109e
m68k: made setjmp and longjmp code work when register calling convention is the default
...
git-svn-id: trunk@34826 -
2016-11-06 19:10:47 +00:00
marcus
e54fdc3853
m68k: fixed compilation without FPU after 34785
...
git-svn-id: trunk@34803 -
2016-11-06 08:42:41 +00:00
Károly Balogh
7293bb7fdb
m68k: reworked setjmp/longjmp to also save the FPU registers (when compiled with HW FPU support), and to only save the nonvolatile registers
...
git-svn-id: trunk@34785 -
2016-11-05 22:02:50 +00:00
Károly Balogh
391a79aebf
m68k: a bunch of tweaks and improvements to assembly functions. higher move() speed on coldfire, disabled fillword implementation on CPUs not supporting unaligned access
...
git-svn-id: trunk@33805 -
2016-05-25 22:44:18 +00:00
Károly Balogh
846dd6b57b
m68k: use the Amiga-specific atomic ops on Amiga
...
git-svn-id: trunk@30903 -
2015-05-24 21:44:51 +00:00
Károly Balogh
49f3473735
fixed the define around the FPU code
...
git-svn-id: trunk@30695 -
2015-04-21 17:05:43 +00:00
Károly Balogh
7758ad9313
m68k: clear the FPU Control Register at program start. This fixes some testcode randomly failing on AmigaOS, where the FPCR state is inherited from the parent task. Also added the FPCR layout and rounding modes info, based on the Motorola 68k PRMm68k.inc
...
git-svn-id: trunk@30060 -
2015-03-02 00:51:23 +00:00
Károly Balogh
f2c7a3efbf
m68k: some assembler SwapEndian() implementations I did a while back. disabled for now, because they weren't extensively tested and benchmarked
...
git-svn-id: trunk@29380 -
2015-01-04 01:39:49 +00:00
sergei
38d5be4182
+ Comment about behavior of DBRA instruction
...
git-svn-id: trunk@29321 -
2014-12-25 09:32:10 +00:00
sergei
6bcaa88c3a
* m68k: "or" without suffix is not accepted, must be "or.l"
...
git-svn-id: trunk@28184 -
2014-07-08 18:48:57 +00:00
sergei
cfe13734e0
* m68k: Fixed damage caused by r27573 and r28177:
...
* longjmp: restored loading of function result (d0) which got removed in r28177.
* While at the point, added test for zero, because longjmp must never return zero values.
* Assembler reader: 'fp' refers to frame pointer, not the stack pointer.
git-svn-id: trunk@28183 -
2014-07-08 15:04:54 +00:00
Károly Balogh
f98cd634fb
m68k: reworked/cleaned setjmp/longjmp code to use the movem instruction with register lists
...
git-svn-id: trunk@28177 -
2014-07-06 13:18:56 +00:00
sergei
e232dd5066
+ m68k: default implementation of fpc_cpuinit, provides correct masking of floating-point exceptions and fixes test/testv8.pp.
...
git-svn-id: trunk@28128 -
2014-07-02 16:23:40 +00:00
sergei
23a20f0e50
* m68k: fixed setjmp/longjmp:
...
* Data registers have to be saved/restored using 'move.l', because 'move' without suffix assumes 16-bit size.
* setjmp must behave as a regular function w.r.t. removing its argument from the stack.
git-svn-id: trunk@28103 -
2014-07-01 11:46:10 +00:00
sergei
acd3ea8750
* m68k: Fixed parameter passing to conform to ABI:
...
* records are passed by value
* records with size of 1,2 or 4 are returned in registers
* parameters with size<4 are justified on the stack according to big-endian target
Now everything except floating-point parameters is compatible with C code compiled with "-malign-int -mrtd".
Compatibility with "-mno-align-int" is achievable by changing target_info.maxCrecordalign to 2, but doings so causes a lot more troubles because RTL (incorrectly) assumes that records declared with {$PACKRECORDS C} are aligned to pointer size.
+ Reuse parameter locations. Since everything is passed on stack, it reduces code size quite a bit.
- tm68kparamanager.getintparaloc removed, generic implementation has been tested and works as expected.
git-svn-id: trunk@28083 -
2014-06-27 06:58:39 +00:00
sergei
217ab9879c
* Enabled internal handling of Abs(longint) for all targets. It has been implemented in cross-platform way ages ago (see tcginlinenode.second_abs_long), but not enabled on MIPS,SPARC and m68k.
...
- RTL: removed MIPS,SPARC and m68k-specific implementations of Abs(longint), and marked the generic one as required for bootstrapping purposes only.
git-svn-id: trunk@27857 -
2014-06-05 10:35:51 +00:00