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
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
353fc13257
m68k: cleanup of the ancient mess from cgsize2subreg
...
git-svn-id: trunk@42949 -
2019-09-08 13:55:19 +00:00
Károly Balogh
fa1203029f
m68k: use cpu_capabilities when deciding to inject scaling into a ref. also allow scaling in more cases.
...
git-svn-id: trunk@42947 -
2019-09-08 13:37:22 +00:00
Károly Balogh
50fe8f70f5
m68k: make sure we're not trying to allocate a subregister for float paras when R_SUBWHOLE <> R_SUBNONE
...
git-svn-id: trunk@42946 -
2019-09-08 13:34:39 +00:00
Károly Balogh
16fc8c8d9a
m68k: added some handling for the explicit precision FPU instructions in the spilling and optimizer. fixed a_fsabs and a_fdabs names
...
git-svn-id: trunk@42943 -
2019-09-08 09:21:17 +00:00
Károly Balogh
fd1d227175
m68k: more refactoring for fpu_capabilities instead of hardwired fpu types. 68040 and 68060 fpu types should now work
...
git-svn-id: trunk@42929 -
2019-09-06 07:56:06 +00:00
Károly Balogh
db2875ceba
m68k: added the remaining instructions with explicit rounding precision. fixed fsflmul to be fsglmul (this is also typo in the original 68k PRM)
...
git-svn-id: trunk@42928 -
2019-09-06 07:25:45 +00:00
Károly Balogh
2a87b885b1
m68k: added the most important FPU instructions with explicit rounding precision (eg. FSADD/FDADD)
...
git-svn-id: trunk@42927 -
2019-09-05 21:51:36 +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
de095c4631
m68k: refactoring to use fpu_capabilities at more places instead of hardwiring certain fpu types
...
git-svn-id: trunk@42925 -
2019-09-05 21:43:51 +00:00
Károly Balogh
36286441b2
m68k: try to optimize realconst operands into B/W/L sized integer operands. these are shorter to encode - which almost always means faster on m68k
...
git-svn-id: trunk@42923 -
2019-09-05 19:32:57 +00:00
florian
69786ffe73
somehow committing went wrong, second part of last commit:
...
+ AArch64: support for vX.8b/vX.16b register names
+ support for more than 256 registers in the register dat files
- removed totherregisterset
+ AArch64: use vmov to load immediates if possible
+ AArch64: use eor to clear mm registers
git-svn-id: trunk@42917 -
2019-09-03 21:07:33 +00:00
Károly Balogh
0ef47f6426
m68k: tabs 2 spaces, no functional changes
...
git-svn-id: trunk@42829 -
2019-08-26 13:08:39 +00:00
Károly Balogh
d29f44e1c7
m68k: rework of the inline nodes to use fpu_capabilities. added fast path for round/trunc (enabled for fastmath only)
...
git-svn-id: trunk@42814 -
2019-08-25 12:12:15 +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
Károly Balogh
90bab63e51
m68k/vasm: remove bits of Linux support. this combination has never really been tested or supported, and got broken recently. m68k-elf-linux has good enough GNU binutils anyway
...
git-svn-id: trunk@42597 -
2019-08-07 09:04:57 +00:00
Jonas Maebe
ce598c15ec
* factored out the conditions under which add nodes need to perform
...
overflow checks
o in particular ensure that cpu-specific overrides don't perform overflow
checks when nf_internal is set
git-svn-id: trunk@42573 -
2019-08-03 12:19:50 +00:00
Jonas Maebe
3fee990218
* on Mach-O, PECOFF and ELF platforms, write local symbols as hidden/
...
private_extern (or plain global in case of PECOFF, as the effect is
the same there): visible across object files, but they become local
when linked into a binary/library. This enables cross-unit inlining
of functions accessig implementation-only symbols.
git-svn-id: trunk@42340 -
2019-07-07 21:33:43 +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
Jonas Maebe
a0e35fd1bc
* synchronised with trunk till r42118
...
git-svn-id: branches/debug_eh@42119 -
2019-05-25 13:19:06 +00:00
Jonas Maebe
77658b925b
* disable regular array -> dynamic array type coversion support unless
...
{$modeswitch arraytodynarray} is active (mantis #35576 )
o changed compiler to compile without this modeswitch
o added the modeswitch to a test that depends on it
git-svn-id: trunk@42118 -
2019-05-25 12:31:32 +00:00
Jonas Maebe
a7bd37d17a
* synchronised with trunk till r40776
...
git-svn-id: branches/debug_eh@41867 -
2019-04-13 15:16:09 +00:00
Károly Balogh
5358851f84
* clean up some things regarding explicit paraloc handling. this should fix m68k-amiga and powerpc-morphos builds after r41716
...
git-svn-id: trunk@41730 -
2019-03-18 01:19:18 +00:00
Jonas Maebe
ac883969a9
* synchronised with trunk till r41423
...
git-svn-id: branches/debug_eh@41424 -
2019-02-23 17:08:03 +00:00
Jonas Maebe
8b9e90dc7a
* keep track of whether a routine has a C-style variadic parameter in the
...
procoptions even when it's through an array-of-const parameter
* always call create_varargs_paraloc_info() instead of create_paraloc_info()
in the former case, even when no varargs parameters are specified (because
on some platforms even some non-variadic parameters need to be passed
differently, such as on ARM with gnueabihf)
git-svn-id: trunk@41420 -
2019-02-23 15:42:45 +00:00
Jonas Maebe
882d676bc9
* synchronised with trunk till r40635
...
git-svn-id: branches/debug_eh@40636 -
2018-12-24 22:12:19 +00:00
Jonas Maebe
acf02ab64b
* when creating wrappers, add a prefix to parameter names to prevent them
...
hiding the method name of the wrapped routine
o also add a few more '&' prefixes to the generated wrapper code to
prevent issues when keywords are used as identifiers
git-svn-id: trunk@40634 -
2018-12-24 22:10:06 +00:00
Jonas Maebe
9630eb7ce9
* synchronised with trunk till r40466
...
git-svn-id: branches/debug_eh@40467 -
2018-12-04 19:54:31 +00:00
Jonas Maebe
122d0d36d6
+ volatile() expression that marks an expression as volatile
...
* disable matching volatile references in the assembler optimisers, so they
can't be removed (more conservative than needed, but better than removing
too many)
o the CSE optimiser will ignore them by default, because they're an unknown
inline node for it
* also removed no longer used fpc_in_move_x and fpc_in_fillchar_x inline node
identifiers from rtl/inc/innr.inc, and placed fpc_in_unaligned_x at the
right place
git-svn-id: trunk@40465 -
2018-12-04 19:53:20 +00:00
Károly Balogh
6629e72d79
m68k: reinstate the inc/dec tempregister type hack again in an isolated way (it was removed in r40385, as it was breaking llvm target)
...
git-svn-id: trunk@40453 -
2018-12-02 18:54:04 +00:00
Jonas Maebe
4cd6f59bc3
* changed create_hlcodegen into a procvar, so that we don't have to insert
...
hlcgllvm in the uses clause of every unit that calls create_hlcodegen
o prevents dependency cycles that can cause llvm codegen units to init
before the cpu variants, which is bad since the llvm versions have to
override the cpu variants in their init code (+ added checks in the
init code that they are in fact initialised later)
git-svn-id: branches/debug_eh@40410 -
2018-11-29 21:31:15 +00:00
Jonas Maebe
bfc7c58a69
* synchronised with trunk till r40348
...
git-svn-id: branches/debug_eh@40349 -
2018-11-18 12:01:50 +00:00
pierre
2761448f44
* Disable range check for m68k/aoptcpu unit
...
* Add missing change of var parameter p to next instruction
in TryToOptimizeMove method after instruction removal.
git-svn-id: trunk@40324 -
2018-11-16 10:27:42 +00:00
pierre
53a27fe7b3
Disable range check in m68k:tiscv32 and riscv64 cgcpu units
...
git-svn-id: trunk@40319 -
2018-11-15 16:58:40 +00:00
florian
9b0ff05ee8
- get rid of MaxOps, it is redundant with max_operands
...
* MatchOpType with three operands is only available of max_operands>2
git-svn-id: trunk@40190 -
2018-11-02 21:32:29 +00:00
pierre
96460b70b2
Remove another wrong typecast when testing that a tai is an instruction
...
git-svn-id: trunk@40131 -
2018-11-01 07:01:02 +00:00
pierre
a015c779ff
Remove unneeded typecasts in TryTOptimizeMove
...
git-svn-id: trunk@40123 -
2018-10-31 23:19:39 +00:00
Jonas Maebe
8555ec1438
+ fpc_eh_return_data_regno() intrinsic to get the return register numbers
...
for the Dwarf EH exception handler result
git-svn-id: branches/debug_eh@40070 -
2018-10-28 18:16:38 +00:00
pierre
0bcf9a51d9
Avoid range check error when compiled with -CR
...
git-svn-id: trunk@40000 -
2018-10-20 18:49:53 +00:00
pierre
3715dbdf41
Avoid run time error if compiled with -CR option
...
git-svn-id: trunk@39999 -
2018-10-20 18:44:05 +00:00
pierre
92acd38f40
Fix for bug report #34380
...
git-svn-id: trunk@39986 -
2018-10-18 20:21:54 +00:00
Jonas Maebe
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
Károly Balogh
ddf8788c7a
m68k: try to generate better code from some pointermath - when the left is an address register and we do add/sub, also allocate an address register as temp, also only require that left and right sizes are same, when right is not a const
...
git-svn-id: trunk@39174 -
2018-06-05 16:45:02 +00:00
Jonas Maebe
4686f61002
* keep track of the temp position separately from the offset in references,
...
so that they can still be freed after the reference has been changed
(e.g. in case of array indexing or record field accesses) (mantis #33628 )
git-svn-id: trunk@38814 -
2018-04-22 17:03:16 +00:00
nickysn
518cdf9674
* replaced the saved_XXX_registers arrays with virtual methods inside
...
tcpuparamanager, very similar to the existing get_volatile_registers_XXX. The
new methods are called get_saved_registers_XXX, where XXX is the register
type ("int", "address", "fpu" or "mm")
git-svn-id: trunk@38794 -
2018-04-19 21:22:16 +00:00
Károly Balogh
66d180187a
m68k: fix build after r38206
...
git-svn-id: trunk@38210 -
2018-02-11 18:20:51 +00:00
Károly Balogh
64e7c90147
m68k: some quickhacks to support PalmOS reg-relative globals and quick-n-dirty small code PIC. needs some cleanup, but the basic idea will be useful a potential for MacOS and Amiga .library support as well, among others
...
git-svn-id: trunk@37900 -
2018-01-04 08:33:43 +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
9f974369a1
palmos: for C and syscall functions, expect return values in A0. mark D2 and A2 as volatile during function calls
...
git-svn-id: trunk@37896 -
2018-01-04 07:52:11 +00:00
Károly Balogh
58d98d8cd7
m68k: made the PIC_OFFSET_REGs runtime changeable, and applied some defaults
...
git-svn-id: trunk@37895 -
2018-01-04 07:50:50 +00:00
Károly Balogh
4c0e6980db
atari: workaround/silence of a vlink warning, when it merges ro sections into rw ones. there are no ro sections on atari anyway
...
git-svn-id: trunk@37878 -
2017-12-30 06:51:32 +00:00
Károly Balogh
e6aed467b5
renamed script unit to cscript to avoid namespace conflict with univint package on Darwin. this makes it possible to build the textmode IDE on Darwin
...
git-svn-id: trunk@37598 -
2017-11-17 11:27:19 +00:00
florian
4cf2a2672a
changes to fix #32043
...
* changed most of the variables in the assembler readers used to store constants from aint to tcgint
as aint has only the size of the accumular while some CPUs (AVR) allow larger constants in instructions
+ allow access to absolute symbols with address type in inline assembler
* allow absolute addresses in avr inline assembler
+ tests
git-svn-id: trunk@37411 -
2017-10-06 21:07:19 +00:00
pierre
8b63f97173
Call ungetregister for NR_D2 at m68k-palmos syscall exit
...
git-svn-id: trunk@37351 -
2017-09-28 14:55:41 +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
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
1d78e73ed8
m68k: there are now cross-binutils for old MacOS, so based on the old/existing bits, fix the support in the compiler
...
git-svn-id: trunk@37028 -
2017-08-22 10:41:02 +00:00
Károly Balogh
addc3a2f94
m68k-palmos: fixed the syscall generation, and improved it to support the dispatch-selector-in-reg-D2 traps
...
git-svn-id: trunk@36892 -
2017-08-13 01:19:19 +00:00
Károly Balogh
8a71a70d3c
m68k-palmos: sketched up some entirely untested syscall support, but it's probably close to what we need
...
git-svn-id: trunk@36891 -
2017-08-12 21:45:01 +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
358f8eb85d
m68k: do not internalerror on localsize < 0. this condition is handled elsewhere in the compiler properly, so we just let it through
...
git-svn-id: trunk@36612 -
2017-06-29 00:11:19 +00:00
Károly Balogh
0370d52f20
m68k: support longword to double conversions with the FPU, without a helper, better code for some other cases
...
git-svn-id: trunk@36609 -
2017-06-28 01:27:02 +00:00
Károly Balogh
02ed753fab
m68k: yet another attempt to fix small struct alignments on stack
...
git-svn-id: trunk@36605 -
2017-06-27 02:36:55 +00:00
Károly Balogh
8a8753eb79
m68k: reenabled some safety checks and removed obsolete TODO comment
...
git-svn-id: trunk@36604 -
2017-06-26 19:45:11 +00:00
Károly Balogh
d5e1b391f9
m68k: when calling g_concatcopy for para copy, still only copy cgpara.intsize amount of bytes
...
git-svn-id: trunk@36603 -
2017-06-26 19:40:13 +00:00
Károly Balogh
22ae3cd186
m68k: revert the r36568 and the followup fix attempts altogether, as they broke Amiga support entirely. there will be a cleanup before another fixing attempt
...
git-svn-id: trunk@36598 -
2017-06-26 16:02:26 +00:00
Károly Balogh
a14b2fd80a
m68k: modify some alignment calculations in the register calling convention code, hopefully it fixes some Amiga regressions introduced in r36568
...
git-svn-id: trunk@36596 -
2017-06-25 19:33:21 +00:00
Károly Balogh
41f72a0e6d
m68k: some initial support for C ABIs which use an address register to return structs by address
...
git-svn-id: trunk@36592 -
2017-06-24 19:03:58 +00:00
Károly Balogh
b481129f4e
m68k: for cdecls with the SVR4 ABI return results both in A0 and D0
...
git-svn-id: trunk@36588 -
2017-06-23 19:21:20 +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
26d5500b7c
m68k: one more alignment fix, hopefully fixes regressions not fixed by r36569
...
git-svn-id: trunk@36570 -
2017-06-22 02:41:36 +00:00
Károly Balogh
8ed84afdd4
m68k: try to fix some breakages caused by r36568
...
git-svn-id: trunk@36569 -
2017-06-22 02:11:42 +00:00
Károly Balogh
23f4304881
m68k: hopefully fix passing of smaller-than-alignment sized records/structs for stdcall/cdecl
...
git-svn-id: trunk@36568 -
2017-06-22 01:14:02 +00:00
Károly Balogh
c5222d7199
m68k: map sec_rodata as read-write in the vasm writer, to silence some vlink warnings, when it writes the relocations in a rodata section
...
git-svn-id: trunk@36501 -
2017-06-14 18:07:36 +00:00
Károly Balogh
3f3c4808ee
m68k: add support register calling convention properly in the interface wrapper generation
...
git-svn-id: trunk@36499 -
2017-06-14 02:26:40 +00:00
Károly Balogh
e0cbd48785
m68k: always check the V flag after MUL/DIV overflows, because MUL/DIV never sets the C flag. note that this fix is full 68k only. on CF, MUL doesn't set any of V or C flags
...
git-svn-id: trunk@36496 -
2017-06-12 23:56:05 +00:00
Károly Balogh
90b1c8e5ed
m68k: the previous attempt in r36480 broke more tests than it fixed, so lets revert to previous version and disable MOVE+OP+MOVE optimizations instead
...
git-svn-id: trunk@36484 -
2017-06-11 11:22:49 +00:00
Károly Balogh
40fb45aef6
m68k: attempt to make MOVE+OP+MOVE optmization more robust. this fixes random exceptions in tfmtbcd test among others
...
git-svn-id: trunk@36480 -
2017-06-10 21:54:48 +00:00
Károly Balogh
fe0bc52dc6
m68k: fixed some cases where comparing smallsets was broken, because the compare size was hardwired to 32bit
...
git-svn-id: trunk@36470 -
2017-06-09 17:27:06 +00:00
Károly Balogh
f7488f2bd8
m68k: don't try to inline NaN and InF values as consts into FPU operands
...
git-svn-id: trunk@36351 -
2017-05-27 20:51:05 +00:00
Károly Balogh
b3157aa5ea
m68k: generate MUL helpers for CPUs without 32bit MUL already in pass 1
...
git-svn-id: trunk@36348 -
2017-05-26 18:46:19 +00:00
Károly Balogh
6ca8b1374b
m68k: quickfix the 68000 builds of the compiler after r36344
...
git-svn-id: trunk@36346 -
2017-05-26 18:26:58 +00:00
Károly Balogh
87e8010f05
m68k: support 32x32 to 64bit MUL generation when targeting CPUs which support this instruction
...
git-svn-id: trunk@36339 -
2017-05-25 22:35:12 +00:00
Károly Balogh
63b3304374
m68k: instead of calling a helper, generate inlined code for 64 bit multiplications, when applicable
...
git-svn-id: trunk@36336 -
2017-05-25 20:59:12 +00:00
Károly Balogh
829b2fc3b3
m68k: enable 68020 codepaths to all CPUs supporting '020 features
...
git-svn-id: trunk@36335 -
2017-05-25 20:54:18 +00:00
Károly Balogh
e9ff684ff0
m68k: handle operand type correctly for 3 operand mul/div
...
git-svn-id: trunk@36334 -
2017-05-25 20:52:57 +00:00
Károly Balogh
aa87e911d7
m68k: fixed some copypaste error in a disabled debug string. no functional changes.
...
git-svn-id: trunk@36329 -
2017-05-25 15:12:28 +00:00
Károly Balogh
1f7b6fbd9a
m68k: implement frac inline nodes
...
git-svn-id: trunk@36290 -
2017-05-21 21:13:02 +00:00
Károly Balogh
7ed9b9f188
m68k: instead of the FPU, use CPU instructions to copy cgparas to stack
...
git-svn-id: trunk@36289 -
2017-05-21 21:09:47 +00:00
Károly Balogh
94b684daee
m68k: reworked flags2reg, so it generates shorter code for the most common case.
...
git-svn-id: trunk@36233 -
2017-05-16 23:15:05 +00:00
Károly Balogh
2d8f56597e
m68k: reenabled the 68k-specific n68kset node
...
git-svn-id: trunk@36211 -
2017-05-15 00:45:06 +00:00
Károly Balogh
ca1ec0435d
m68k: fixed the signedness of conditional jumps while creating the jump list for case statements
...
git-svn-id: trunk@36210 -
2017-05-14 22:27:09 +00:00
Károly Balogh
fbbe2981ca
m68k: disable the cpu specific set node, until we fix some of the recently found problems with it
...
git-svn-id: trunk@36208 -
2017-05-14 20:52:18 +00:00
Károly Balogh
6d795df166
m68k: removed silly debug writeln accidentally left in r35671
...
git-svn-id: trunk@35673 -
2017-03-28 11:57:17 +00:00
Károly Balogh
eeb660017e
m68k: improve floating point compares against memory references by swapping sides when left is a reference and right is a register
...
git-svn-id: trunk@35672 -
2017-03-28 11:50:39 +00:00
Károly Balogh
21468861d4
m68k: handle more reg_ref and ref_reg operations more flexibly on the cg level. these OPs should get utilized better with some of the upcoming inline nodes
...
git-svn-id: trunk@35671 -
2017-03-28 09:57:14 +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
a4b096e9da
m68k: added the embedded target
...
git-svn-id: trunk@35589 -
2017-03-15 13:37:56 +00:00
Károly Balogh
07cfb2f43a
m68k: removed unused 3 ops taicpu constructors
...
git-svn-id: trunk@35494 -
2017-02-28 22:10:59 +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
94ec8ad854
m68k: added BSD targets, this means NetBSD, still under development
...
git-svn-id: trunk@35315 -
2017-01-16 21:30:39 +00:00
Károly Balogh
2e9d0543df
m68k: do not generate copy loops for single byte copies on a plain '000
...
git-svn-id: trunk@35281 -
2017-01-13 15:41:21 +00:00
Károly Balogh
78a7710192
m68k: with the register calling convention, pass records by reference
...
git-svn-id: trunk@35279 -
2017-01-12 18:06:13 +00:00
Károly Balogh
3e4c905813
m68k: make vasm to use ELF objects on amiga, enabled smartlink sections
...
git-svn-id: trunk@35240 -
2017-01-05 22:29:08 +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
Jonas Maebe
880d438704
* renamed t<cpuname>procinfo to tcpuprocinfo for all targets, so we can
...
inherit from it for LLVM without a thousand ifdefs
git-svn-id: trunk@35141 -
2016-12-16 22:41:21 +00:00
Károly Balogh
026f0e99f3
m68k: made the vasm writer use the right section attributes, but disabled named sections until some vlink issues are sorted out
...
git-svn-id: trunk@35116 -
2016-12-12 22:46:47 +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
Károly Balogh
66e651bed0
m68k: build fix
...
git-svn-id: trunk@35111 -
2016-12-11 16:49:03 +00:00
Károly Balogh
df38fd18e0
m68k/powerpc: improved version of int_to_bool casting. now both also passes the improved version of tb0625
...
git-svn-id: trunk@35108 -
2016-12-11 15:43:58 +00:00
Károly Balogh
288a39d86e
m68k: indentation fixes. no functional changes.
...
git-svn-id: trunk@35106 -
2016-12-11 03:58:41 +00:00
Károly Balogh
15f67e6f5b
m68k: in int to bool conversion, only try to zero/sign extend the value, if the destination is actually larger than the source
...
git-svn-id: trunk@35105 -
2016-12-11 03:57:55 +00:00
Károly Balogh
0cb555c07c
syscalls: move the reference implementation of parseparaloc to paramgr. removes two identical copies from CPU specific code and enables basereg convention for AROS/x86_64. also, other minor fixes and cleanups in related code.
...
git-svn-id: trunk@35047 -
2016-12-03 19:00:41 +00:00
Károly Balogh
74c1f2aec9
m68k: cosmetics (less C-ism)
...
git-svn-id: trunk@35001 -
2016-11-27 20:31:11 +00:00
Jonas Maebe
a25ebbba3e
+ added volatility information to all memory references
...
o separate information for reading and writing, because e.g. in a
try-block, only the writes to local variables and parameters are
volatile (they have to be committed immediately in case the next
instruction causes an exception)
o for now, only references to absolute memory addresses are marked
as volatile
o the volatily information is (should be) properly maintained throughout
all code generators for all archictures with this patch
o no optimizers or other compiler infrastructure uses the volatility
information yet
o this functionality is not (yet) exposed at the language level, it
is only for internal code generator use right now
git-svn-id: trunk@34996 -
2016-11-27 18:17:37 +00:00
Károly Balogh
4ee06e7bec
m68k: implemented in_int_real support
...
git-svn-id: trunk@34993 -
2016-11-27 17:50:10 +00:00
Károly Balogh
c4e954c9a5
m68k: added fint and fintrz instructions
...
git-svn-id: trunk@34991 -
2016-11-27 17:42:24 +00:00
Károly Balogh
975dd13dcb
m68k: fixed a copy paste error, which broke cos node on a coldfire fpu, effectively turning it into a sin node
...
git-svn-id: trunk@34987 -
2016-11-27 15:59:16 +00:00
Károly Balogh
a595877da3
m68k: in fmove + op + fmove optimizations, allow the ops precision to be different to the fmoves
...
git-svn-id: trunk@34985 -
2016-11-27 15:17:58 +00:00
Károly Balogh
98d4c426cb
m68k: some groundwork for an improved optimizer, now tries to optimize away MOVE/FMOVE based unnecessary register shuffling around ops when possible (with room for further improvements)
...
git-svn-id: trunk@34979 -
2016-11-27 11:23:11 +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
4ee4099fca
m68k: introduce a register calling convention, inspired by VBCC. volatile registers are used to pass arguments
...
git-svn-id: trunk@34821 -
2016-11-06 18:00:29 +00:00
pierre
89c1b68b14
* Delete regvars unit.
...
This unit was empty unless OLDREGVARS macro was set,
but this does not compile and no change has been made since 2011.
* Remove regvars from all _USES clauses.
git-svn-id: trunk@34808 -
2016-11-06 14:01:39 +00:00
Károly Balogh
37f43d3604
m68k: cleanup of the BuildRefExpression method in the assembler reader
...
git-svn-id: trunk@34784 -
2016-11-05 19:58:06 +00:00
Károly Balogh
64650261d1
m68k: refactor of the reglist and the regpair support in the assembler reader. also added support for float register lists for FMOVEM
...
git-svn-id: trunk@34783 -
2016-11-05 18:53: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
57e6cef18b
m68k: enabled the mul to shift+sub/add optimizations for 68000
...
git-svn-id: trunk@34762 -
2016-10-23 23:46:32 +00:00
Károly Balogh
4620d9b22c
m68k: when loading from a reference with zero extend, clear the register first, then load, instead of clearing with AND later, because this is faster on slow 68ks and also shorter
...
git-svn-id: trunk@34761 -
2016-10-23 23:16:03 +00:00
Károly Balogh
41776e9608
m68k: on a '000, optimize CLR.L Dx to MOVEQ #0,Dx which is slightly faster
...
git-svn-id: trunk@34760 -
2016-10-23 23:10:39 +00:00
Károly Balogh
660432685a
m68k: review and some cleanup of the shlshrnode, also add a special case for shifting 64bit values by 1
...
git-svn-id: trunk@34757 -
2016-10-23 16:46:34 +00:00
Károly Balogh
51cb5aefbe
m68k: use target_info.stackalign to align the stack instead of expecting a hardwired longword alignment. this is required for atari, and beneficial on all '000 targets
...
git-svn-id: trunk@34666 -
2016-10-08 14:01:32 +00:00
Károly Balogh
003487baab
m68k: code generation for atari syscalls
...
git-svn-id: trunk@34611 -
2016-10-03 23:39:36 +00:00
Károly Balogh
def4df9791
m68k: fixed a bug, where during during unaligned stores, the base address was preinitalized to a temp address register from the wrong reference, causing havoc
...
git-svn-id: trunk@34584 -
2016-10-01 14:43:47 +00:00
Károly Balogh
ed13f4d0d1
m68k: add a function to optimize const MUL cases to sequences of shifts + ADD/SUB. mainly for '000 and other low end 68ks with slow/limited MUL capabilities. inactive for now, as it wasn't that extensively tested
...
git-svn-id: trunk@34560 -
2016-09-25 19:46:00 +00:00
Jonas Maebe
aa1be3276f
- removed default value of _typ parameter of TAsmData.(Weak)RefAsmSymbol():
...
it was AT_NONE, which is invalid and should never be used
* explicitly pass the correct value for all calls to those methods elsewhere
in the compiler
git-svn-id: trunk@34250 -
2016-08-05 07:09:16 +00:00
Jonas Maebe
a0efde8167
* automatically generate necessary indirect symbols when a new assembler
...
symbol is defined
o removed all places where AB_INDIRECT symbols were explicitly generated
o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
o for some symbols an indirect symbol is always required (because they are
dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type
git-svn-id: trunk@34165 -
2016-07-20 20:53:03 +00:00
Jonas Maebe
1cb8c0d00c
* specify the def of assembler level symbols defined via
...
tasmdata.DefineAsmSymbol() and all routines that call it
o will be used to automatically generate AB_INDIRECT sybols when
necessary
git-svn-id: trunk@34164 -
2016-07-20 20:52:59 +00:00
Károly Balogh
2eeb078f3e
m68k: removed obsolete and wrong comment. the '881 extended type is actually 12 bytes during load/store, not 10, which means longword alignment is fine. no functional changes.
...
git-svn-id: trunk@33910 -
2016-06-05 07:11:23 +00:00
Károly Balogh
77318be022
m68k: fix build errors with some assemblers on modulo calculation on 020+
...
git-svn-id: trunk@33867 -
2016-06-01 10:50:22 +00:00
Károly Balogh
a561ffe836
m68k: fixed initial offset adjustment for the unaligned store
...
git-svn-id: trunk@33860 -
2016-05-31 00:47:57 +00:00
Károly Balogh
b4fd85f19c
m68k: unaligned handling for math and typeconv nodes
...
git-svn-id: trunk@33854 -
2016-05-29 18:48:24 +00:00
Károly Balogh
2d6736e40e
m68k: fixed unaligned stores' predecrement addressing. also removed an unnecessary sign-extension of the tmpreg for 16bit stores
...
git-svn-id: trunk@33853 -
2016-05-29 18:25:33 +00:00
Károly Balogh
a8ad51e96f
m68k: unaligned access support in add nodes
...
git-svn-id: trunk@33852 -
2016-05-29 18:12:36 +00:00