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