Commit Graph

491 Commits

Author SHA1 Message Date
Jonas Maebe
f402b0d7df * changed getpointerdef() into a tpointerdef.getreusable() class method
o allows removing the ugly x86 hacks

git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
florian
b222d0b663 * correctly handle LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF in second_int_to_bool, resolves issue #28007
git-svn-id: trunk@30765 -
2015-05-02 13:52:50 +00:00
florian
7dd1d6aa77 o fixes handling of iso i/o parameters/program parameters:
* explicit reset is needed
  * variable must be declared again

git-svn-id: trunk@30757 -
2015-05-01 20:58:31 +00:00
Jonas Maebe
61e4a1b811 + added tasmlist parameter to getintparaloc() (needed for llvm)
git-svn-id: trunk@30429 -
2015-04-04 14:29:16 +00:00
Jonas Maebe
201121d7c9 * synchronised with trunk till r30345
git-svn-id: branches/hlcgllvm@30349 -
2015-03-28 12:28:15 +00:00
Károly Balogh
87deec105d m68k: implemented 68k specific a_bit_set_const_ref and a_bit_set_reg_ref, using BSET/BCLR
git-svn-id: trunk@30278 -
2015-03-22 17:44:59 +00:00
Károly Balogh
c49c8210a3 m68k: some initial HLCG, use BSET/BCLR instructions for simple bit manipulation
git-svn-id: trunk@30275 -
2015-03-22 14:01:14 +00:00
Károly Balogh
ad301f8fa1 m68k: implemented t68kvecnode.update_reference_reg_packed. same as the generic one, but allocates int registers instead of address registers, because on 68k IMUL,SHR/SHL and AND can't work on address registers, which results in a lot of register shuffling
git-svn-id: trunk@30267 -
2015-03-21 20:09:35 +00:00
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
b617345e43 m68k: disabled premature MOVEA #0,Ax to SUBA Ax,Ax in the CG, because it breaks with spilling temp replacement and moved it to the optimizer, where it belongs. this fixes some code with potentially heavy address register pressure, like the IDE.
git-svn-id: trunk@30245 -
2015-03-16 02:04:58 +00:00
Jonas Maebe
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Károly Balogh
2555f12394 m68k: improved handling of moves and sign/zero extensions targeting address regs
git-svn-id: trunk@30232 -
2015-03-15 01:44:43 +00:00
Károly Balogh
918c4add06 m68k: in do_spill_replace, exclude the case where the source register would be an address and the destination is a reference
git-svn-id: trunk@30191 -
2015-03-14 17:19:14 +00:00
Károly Balogh
935820293c m68k: in tm68ktypeconvnode.int_to_real, fix the reference before using it, and if the source is a register, make sure it's a data register
git-svn-id: trunk@30190 -
2015-03-14 17:14:10 +00:00
Károly Balogh
1121c2e6ce m68k: before doing a reg->ref operation, make sure the source is a datareg
git-svn-id: trunk@30189 -
2015-03-14 16:36:02 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Károly Balogh
106056f462 m68k: more FMOVEM.X store/load size fixes
git-svn-id: trunk@30062 -
2015-03-02 02:55:23 +00:00
Károly Balogh
acaf382ea0 m68k: FMOVEM.X stores/loads each reg as 12 bytes (96 bits) not 10 bytes (80 bits), see 68k PRM, page 5-86
git-svn-id: trunk@30061 -
2015-03-02 02:48:35 +00:00
Károly Balogh
5f66d63335 m68k: disabled comment generation
git-svn-id: trunk@30045 -
2015-03-01 15:49:57 +00:00
Károly Balogh
997ec578e0 m68k: added a simple unaryminusnode which can utilize FNEG instruction for floats on 68881
git-svn-id: trunk@30044 -
2015-03-01 15:00:07 +00:00
Jonas Maebe
d6de2c03cb * generic part of r26050 from the hlcgllvm branch: made tcgvecnode hlcg-safe
o in particular, add tdef size information to the update_reference*()
     methods, and factored out offset adjustments into its own method
   o also make sure the passed size to update_reference*() corresponds to the
     actual size of the index, as it's no longer guaranteed to be ptruint
     since the previous commit

git-svn-id: trunk@29967 -
2015-02-23 22:56:00 +00:00
Károly Balogh
d85b49755c m68k: some ideas for a future second_abs_long implementation. no functional changes.
git-svn-id: trunk@29806 -
2015-02-23 03:37:51 +00:00
Károly Balogh
c72f58bcc5 m68k: implemented sqrt_real and abs_real inlines
git-svn-id: trunk@29805 -
2015-02-23 02:41:33 +00:00
Károly Balogh
db50666b3b n68kinl: added inline nodes for 68k. implemented first_sqr_real and second_sqr_real for 68881 FPU
git-svn-id: trunk@29799 -
2015-02-22 23:11:16 +00:00
Károly Balogh
3650991d90 m68k: support LOC_REFERENCE/LOC_CREFERENCE for floating point instructions where possible
git-svn-id: trunk@29714 -
2015-02-15 20:15:21 +00:00
Károly Balogh
fdb09365ba m68k: instead of trying to mess with LOC_FLAGS, use LOC_REGISTER to return a boolean result of the compare. idea by Florian. fixes several issues with optimizer enabled and also results in better code in some cases.
git-svn-id: trunk@29709 -
2015-02-15 17:15:15 +00:00
Károly Balogh
9693b37c1a m68k: actually,overwrite the resflags with F_E, because only that would be valid after the FSxx/TST combination
git-svn-id: trunk@29705 -
2015-02-15 14:04:11 +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
a526b0e5d6 m68k: implemented some missing bits of FPU cgpara handling, functions with float arguments seem to work much better now
git-svn-id: trunk@29650 -
2015-02-08 10:26:47 +00:00
Károly Balogh
06dfa4d30c m68k: also alloc FPU registers during RTL helper calls
git-svn-id: trunk@29646 -
2015-02-07 23:31:46 +00:00
Károly Balogh
a99c9c29b6 m68k: basic 68881 FPU register save/restore support. probably still needs some work here and there.
git-svn-id: trunk@29644 -
2015-02-07 22:13:07 +00:00
Károly Balogh
05d38053f7 m68k: optimize a few more trivial cases
git-svn-id: trunk@29606 -
2015-02-02 08:52:19 +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
3c2031c9c6 m68k: added RegModifiedByInstruction implementation, enabled RefsHaveScale define
git-svn-id: trunk@29597 -
2015-02-01 16:33:26 +00:00
Károly Balogh
460c4acaee m68k: implement taicpu.spilling_get_operation_type_ref, supports predecrement/postincrement addressing
git-svn-id: trunk@29593 -
2015-02-01 15:28:54 +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
7a91d5f495 m68k: oops, unbroke the build with softfpu
git-svn-id: trunk@29372 -
2015-01-02 16:00:53 +00:00
Károly Balogh
d000b1bc7c m68k: basic 68881 fpu support. probably still broken at umpzillion places, and mostly untested, but at least it builds the RTL and all packages successfully with -Cp68020 -Cf68881 instead of dying with random internalerrors() and now even emits actual FPU opcodes.
git-svn-id: trunk@29370 -
2015-01-02 05:29:45 +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
pierre
aa6b62cf4c Add new procedure option: po_syscall_has_libsym,
include this option only of libsym field
 is non NIL.
 Use this option to only write redef of libsym if needed.
 Adapt ppudump source to this new procedure option.

git-svn-id: trunk@28732 -
2014-10-03 19:26:16 +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
3b205742b6 m68k: also try to optimize a special case of OP_SAR using the SWAP instruction
git-svn-id: trunk@28657 -
2014-09-14 12:47:07 +00:00
Károly Balogh
d561e8ab57 m68k: generate smarter shifting/rotation code on 68k, for example by utilizing the SWAP instruction
git-svn-id: trunk@28617 -
2014-09-07 23:46:46 +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
9991ee4165 m68k: support loading of refs to data registers, also when explicit paraloc is set and it's a register, use that directly, this fixes several syscall-related corner cases on Amiga
git-svn-id: trunk@28582 -
2014-09-02 17:38:34 +00:00
sergei
a5958d6e5f * m68k: do not emit moves between same register, they end up in wrong code in some cases when register needs to be spilled (and entirely useless otherwise).
git-svn-id: trunk@28545 -
2014-08-30 22:00:54 +00:00
Károly Balogh
392da9e43f * fix warnings when compiling the compiler with DFA optimizer enabled on m68k
git-svn-id: trunk@28499 -
2014-08-20 13:49:47 +00:00
Jonas Maebe
b18ba8e85b * syncrhonised with trunk up till r28471
git-svn-id: branches/hlcgllvm@28495 -
2014-08-19 20:23:11 +00:00
Jonas Maebe
b745dcc64c * moved g_external_wrapper() to the hlcg, and also g_intf_wrapper() because
for some platforms it depends on that routine

git-svn-id: branches/hlcgllvm@28492 -
2014-08-19 20:22:54 +00:00