Jonas Maebe
fa3b0ca312
* support marking defs created via the getreusable*() class methods as
...
"don't free even if not registered"; use for defs that may not be written
to a ppu file, but that must nevertheless survive the compilation of the
current module
* mark all defs created for para locations as "don't free even if not
registered", because we don't discard and recalculate all para locations
after a module has been compiled (since that's not needed)
o solves issues if the paralocations for a routine in the interface of
unit A are calculated while the implementation of unit B gets
compiled, and a new reusable type is allocated at that point which
is not used anywhere else (after r32160)
git-svn-id: trunk@32235 -
2015-11-04 20:46:18 +00:00
yury
35ff024f03
* mips: Fixed internal error 2014061703 when optimization are enabled.
...
git-svn-id: trunk@32112 -
2015-10-21 12:14:49 +00:00
yury
11a9ff4a43
* Removed unused vars for mipsel compiler.
...
git-svn-id: trunk@31745 -
2015-09-17 15:46:30 +00:00
Jonas Maebe
991e1f49bd
* store a pointer to the used tasminfo record in every assembler writer, so
...
that we can use assembler writers with different conventions from the
currently set target_asm (e.g. an x86 assembler writer for inline assembly
in LLVM IR)
git-svn-id: trunk@31628 -
2015-09-12 23:32:13 +00:00
Jonas Maebe
b3d0197f98
* factored out the output file handling (mostly writing data) from the
...
external assembler writer, so we can reuse the archtecture-specific
writers to write inline assembly in LLVM IR files
git-svn-id: trunk@31625 -
2015-09-12 23:32:01 +00:00
Jeppe Johansen
3cb9be73bc
Moved tcontrollerdatatype out into cpuinfo.
...
Added cputype and fputype info to tcontrollerdatatype arrays.
git-svn-id: trunk@31574 -
2015-09-07 20:36:54 +00:00
Jonas Maebe
0fc1fd6ac1
* replaced current_procinfo.currtrue/falselabel with storing the true/false
...
labels of LOC_JUMP in the node's location. This generates some extra jumps
for short circuit boolean and/or-expressions if optimizations are off, but
with optimisations enabled the generated code is the same (except for JVM
because the jump threading optimisation isn't enabled there yet).
git-svn-id: trunk@31431 -
2015-08-27 18:28:57 +00:00
nickysn
919cc8377a
+ added class type property CObjSymbol to TExeOutput as well
...
git-svn-id: trunk@31426 -
2015-08-25 16:07:59 +00:00
nickysn
046a4e4114
* allow using a TObjSymbol subclass via using a "class of" type
...
git-svn-id: trunk@31424 -
2015-08-25 14:32:08 +00:00
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
687bb15299
* renamed getdatalabel() to getglobaldatalabel
...
git-svn-id: branches/hlcgllvm@30336 -
2015-03-27 21:25:34 +00:00
Jonas Maebe
bd203a5b57
* synchronised with trunk till r30240
...
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Jeppe Johansen
914e9e7b49
Merged from trunk
...
git-svn-id: branches/laksen/armiw@30146 -
2015-03-08 12:33:46 +00:00
sergei
a709a9b637
* MIPS peephole: check that operand is present before accessing its fields, also check that it's not a branch target. Mantis #27608 .
...
git-svn-id: trunk@30110 -
2015-03-06 00:04:06 +00:00
Jonas Maebe
67b8aceaee
* synchronized with privatetrunk till r30095
...
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Jeppe Johansen
47dbec3111
Rebase to trunk revision
...
git-svn-id: branches/laksen/armiw@29708 -
2015-02-15 16:08:18 +00:00
pierre
cc537a2e76
Try to avoid uncorrect optimization
...
git-svn-id: trunk@29373 -
2015-01-02 23:00:22 +00:00
Jeppe Johansen
7390acc426
Merged from recent trunk.
...
git-svn-id: branches/laksen/armiw@29369 -
2015-01-01 23:54:40 +00:00
sergei
b46ce6b70e
* Fixed condition to output div/divu having R0 as first operand as non-macros.
...
git-svn-id: trunk@29359 -
2014-12-29 23:19:01 +00:00
sergei
57094d495b
+ MIPS: implement inline full 64-bit multiplication, for cases when overflow checking is off and CPU is set to mips32r2.
...
git-svn-id: trunk@29354 -
2014-12-28 22:03:15 +00:00
Jeppe Johansen
901275b4a1
Switch back to emitting BLX instructions and fix calculation of constant offsets(should rarely/never happen).
...
Add missing fields to other elf targets.
git-svn-id: branches/laksen/armiw@29286 -
2014-12-14 16:28:35 +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
sergei
a4053370fc
* ELF linker: track relocation style (REL or RELA) of each input section and use it instead of global default on MIPS targets. This fixes internal linking of tests/test/units/system/tres*.pp.
...
git-svn-id: trunk@29070 -
2014-11-13 22:10:53 +00:00
Tomas Hajny
dc1446d32a
* fixed misplaced constant definition
...
git-svn-id: trunk@29053 -
2014-11-10 13:51:50 +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
sergei
06ee500352
* MIPS: improved code generation in make_simple_ref
...
* Clean up the peephole optimizer
+ More peephole optimizations.
git-svn-id: trunk@28892 -
2014-10-21 21:05:46 +00:00
sergei
f85a8159ef
* compiler/mips/cpuinfo.pas: removed "FPU_" prefixes from FPU names, not necessary because compiler inserts one itself.
...
* rtl/embedded/system.pp: removed (commented out) FPU initialization from initialization of system unit, was dead code anyway because FPC_HAS_FEATURE_FPU is never defined and "feature FPU" does not exist.
* rtl/mips/*.inc: don't compile FPU instructions if compiling RTL with -CfNONE or -CfSOFT (however, handling these switches for MIPS targets in compiler needs further fixing).
git-svn-id: trunk@28670 -
2014-09-15 18:24:23 +00:00
sergei
84245a6e0c
* MIPS: doing progress with peephole optimizer.
...
git-svn-id: trunk@28628 -
2014-09-08 23:24:43 +00:00
sergei
3ede5ec99b
* MIPS peephole: refactored/simplified and added (another) couple of optimizations.
...
git-svn-id: trunk@28591 -
2014-09-03 20:00:42 +00:00
sergei
ac64c4600f
+ MIPS: make use of instructions MUL,SEB and SEH that are available in modern cores.
...
git-svn-id: trunk@28590 -
2014-09-03 19:59:00 +00:00
sergei
4e2fb9d28b
* MIPS: fixed O_MOVE_SOURCE and O_MOVE_DEST constants (they were swapped, amazing that it ever worked with such a mistake).
...
+ Spilling for SEB and SEH
* Another attempt to get spilling of 3-operand form DIV/DIVU be done correctly.
git-svn-id: trunk@28588 -
2014-09-03 19:57:46 +00:00
sergei
406a678223
* MIPS: MOVE instruction cannot be changed into conditional move (MOVZ/MOVN) if it overwrites register used as condition.
...
git-svn-id: trunk@28587 -
2014-09-03 11:59:16 +00:00
sergei
02f39c667a
* MIPS: added a couple of important capabilities and made them available for big-endian targets as well.
...
git-svn-id: trunk@28581 -
2014-09-02 12:51:48 +00:00
sergei
768e090006
- MIPS: don't create reg.allocator for MM registers.
...
git-svn-id: trunk@28579 -
2014-09-01 21:55:03 +00:00
sergei
1e11e34f42
+ MIPS: implemented more peephole optimizations.
...
git-svn-id: trunk@28536 -
2014-08-29 18:20:49 +00:00
sergei
d9a7d28838
+ MIPS: support floating point conditions in its emulated flags, on MIPS4+ convert such flags to registers using conditional move instructions (i.e. without branching). For older cores generated code remains the same.
...
git-svn-id: trunk@28535 -
2014-08-29 18:18:17 +00:00
sergei
3b06465322
+ MIPS: support replacement spilling for mov.s, mov.d and (partially) mtc1 instructions.
...
git-svn-id: trunk@28530 -
2014-08-27 21:26:38 +00:00
sergei
5655baa23a
* MIPS: optimized conversion of unsigned 32-bit integers to float, now uses one integer register instead of two and does not generate redundant move.
...
git-svn-id: trunk@28529 -
2014-08-27 21:23:47 +00:00
sergei
f0496001fb
- MIPS: removed allocation of stack/frame pointer registers in prologue, hacks like this are no longer needed since r27104.
...
git-svn-id: trunk@28505 -
2014-08-21 19:36:00 +00:00
Károly Balogh
d22dc68fda
* fixed DFA warnings for MIPS and AVR
...
git-svn-id: trunk@28502 -
2014-08-20 15:05:43 +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
Jonas Maebe
5c75b6dd6b
* synchronised with trunk up till r28402
...
git-svn-id: branches/hlcgllvm@28403 -
2014-08-13 16:04:30 +00:00
sergei
482e61dafa
* MIPS, TCpuAsmOptimizer.GetNextInstructionUsingReg: test that returned item is actually an instruction, because GetNextInstruction can sometimes stop on labels.
...
+ Try to eliminate register move after instructions that load from memory.
git-svn-id: trunk@28380 -
2014-08-10 21:31:13 +00:00
sergei
f1d1fd4f24
* Inserted explicit typecasts in order to prevent range check errors at some places where signed and unsigned types are assigned to each other (mostly MIPS-specific, but one was necessary in generic code).
...
git-svn-id: trunk@28379 -
2014-08-10 21:26:14 +00:00
sergei
e4fea2ebc8
* Dummy implementations of a_bit_scan_reg_reg and g_stackpointer_alloc in tcg, removes the need to override these methods in every descendant code generator solely to avoid "constructing a class with abstract method" warning.
...
git-svn-id: trunk@28175 -
2014-07-06 11:34:04 +00:00
Jonas Maebe
7949bebb8d
* synchronised with r28168 of trunk
...
git-svn-id: branches/hlcgllvm@28169 -
2014-07-05 21:30:28 +00:00
Jonas Maebe
1516661249
+ new chlcgobj class reference variable that can be used to call thlcg*
...
virtual methods even when hlcg doesn't contain a valid instance
git-svn-id: branches/hlcgllvm@28143 -
2014-07-03 22:28:31 +00:00