Commit Graph

69 Commits

Author SHA1 Message Date
florian
ff5f311b34 - removed no more used constants
git-svn-id: trunk@18199 -
2011-08-13 20:54:01 +00:00
florian
98d3007580 + support to parse hi8/lo8(...) in inline assembler
git-svn-id: trunk@18009 -
2011-07-17 16:26:57 +00:00
florian
04e2321724 * avr cpuflags renames
+ cpuflagsstr

git-svn-id: trunk@18007 -
2011-07-17 08:55:16 +00:00
florian
b0cef1693a * compilation of system unit was broken
git-svn-id: trunk@17972 -
2011-07-10 21:03:55 +00:00
pierre
37b98917e0 * Handle invalid register correctly
git-svn-id: trunk@17894 -
2011-07-01 11:52:37 +00:00
florian
26850e3425 * fix full cycle after adding new boolean types
git-svn-id: branches/pasboolxx@17847 -
2011-06-27 20:11:08 +00:00
florian
5231d109ba * fullcycle fixed
git-svn-id: trunk@17475 -
2011-05-15 19:13:49 +00:00
florian
eb2a2a5ea0 + implements tavraddnode.second_cmpsmallset
git-svn-id: branches/avr@17295 -
2011-04-10 18:52:56 +00:00
florian
8cfbb70326 + generic a_cmp_const_reg_label
git-svn-id: branches/avr@17294 -
2011-04-10 18:52:37 +00:00
florian
ebe8078263 * compilation fixed
git-svn-id: branches/avr@17293 -
2011-04-10 18:43:44 +00:00
florian
7b8f3a61d3 + implemented tcgavr.g_flags2reg
git-svn-id: branches/avr@17290 -
2011-04-10 18:39:51 +00:00
florian
ed8d652398 + implemened a_cmp_reg_reg_label
git-svn-id: branches/avr@17289 -
2011-04-10 18:39:07 +00:00
florian
5fd4bb70de * started to implement ref.base parameter for normalize_ref
git-svn-id: branches/avr@17288 -
2011-04-10 18:38:06 +00:00
florian
a0b0b43d0c + implemented tcgavr.a_jmp_name
* updated todos

git-svn-id: branches/avr@17287 -
2011-04-10 18:37:26 +00:00
florian
8d960cb608 + implementation of shifting operations for avr
* handle shl/shr operand size correctly

git-svn-id: branches/avr@17109 -
2011-03-09 19:48:01 +00:00
florian
d4ff3b2eb6 * forgotten file in previous commit
git-svn-id: branches/avr@17107 -
2011-03-09 19:46:42 +00:00
florian
c7e6d07ff0 * fix tavraddnode.second_cmp
* optimized register usage
+ implemented concatcopy for len<16

git-svn-id: branches/avr@17106 -
2011-03-09 19:46:05 +00:00
florian
8f343078fa * optimize moves into movw if possible
* use ldd instruction if possible

git-svn-id: branches/avr@17105 -
2011-03-09 19:42:15 +00:00
florian
de2d504f15 + dedicated getaddressregister so address registers are allocated with size OS_ADDR
* allocate volatile register first
* start with R8 so allocation might be pair wise

git-svn-id: branches/avr@17103 -
2011-03-09 19:40:57 +00:00
florian
a6464c36e3 * push reads the register
* concatcopy for len>=16 implemented

git-svn-id: branches/avr@17102 -
2011-03-09 19:40:07 +00:00
florian
1cc956afc8 + implements tcgavr.a_loadaddr_ref_reg
git-svn-id: branches/avr@17101 -
2011-03-09 19:38:59 +00:00
florian
0302c7181e * AVR: use LDS/LD and STS/ST depending on the reference
git-svn-id: branches/avr@17052 -
2011-02-27 21:13:25 +00:00
florian
a178f34ab3 + avr processor type information
git-svn-id: branches/avr@17051 -
2011-02-27 21:13:07 +00:00
florian
86f587b02f + added more avr instructions
git-svn-id: branches/avr@17050 -
2011-02-27 21:12:19 +00:00
florian
e95bf26148 * avr stackframe generation improved
git-svn-id: branches/avr@17048 -
2011-02-27 21:11:40 +00:00
florian
53ee505d84 * fixed spilling
* fixed register assignment for instructions requiring a register>R15

git-svn-id: branches/avr@17046 -
2011-02-27 21:10:31 +00:00
florian
93e72b7e8a * fixed normalize_ref
git-svn-id: branches/avr@17045 -
2011-02-27 21:09:41 +00:00
florian
d060e199f4 * 64 bit comparisations fixed
git-svn-id: branches/avr@17043 -
2011-02-27 21:08:44 +00:00
florian
b6530f253a * fixed reference writing for avr
git-svn-id: branches/avr@17042 -
2011-02-27 21:07:25 +00:00
florian
b870a6eff5 * started to fix parameter passing
* fixed entry/exit code generation

git-svn-id: branches/avr@17041 -
2011-02-27 21:05:53 +00:00
florian
26415e9903 * as avr doesn't like $ in symbols, use ReplaceForbiddenChars to replace them
git-svn-id: branches/avr@17040 -
2011-02-27 21:04:18 +00:00
florian
dc0638c4d2 * corrected volatile registers for avr
git-svn-id: branches/avr@17039 -
2011-02-27 21:03:28 +00:00
florian
7b9276ae8a + implementation of avr rtl helpers
+ avr: fixed writing of constants in assembler
* avr: fixed reading of constants in assembler
* avr: determine used registers at procedure exit properly
* changed project name to ppavr

git-svn-id: branches/avr@17032 -
2011-02-26 21:04:56 +00:00
florian
acac3ce37c * dummy fix for concatcopy
git-svn-id: branches/avr@17028 -
2011-02-26 21:00:58 +00:00
florian
f419966f06 + generic second_int_to_bool, depends on OP_OR setting flags
git-svn-id: branches/avr@17024 -
2011-02-26 20:58:48 +00:00
florian
27f1abb58b * clean up and nicer todos
git-svn-id: branches/avr@17023 -
2011-02-26 20:58:13 +00:00
florian
d5455cf6ac + software multiplication support for OS_16,OS_S16,OS_32,OS_S32
git-svn-id: branches/avr@17020 -
2011-02-26 20:33:01 +00:00
florian
ef699b1864 + avr flag and condition handling
git-svn-id: trunk@17016 -
2011-02-26 20:15:03 +00:00
florian
db2600d40b + first primitive concatcopy implementation
+ implemented op_const_reg and load_const_reg
+ implemented op_reg_reg
* set register info values correctly

git-svn-id: trunk@17014 -
2011-02-26 20:13:19 +00:00
florian
fd97ce0109 * removed some arm overlefts
git-svn-id: trunk@17010 -
2011-02-26 20:09:21 +00:00
florian
26ce3cef00 * compilation fixes
* completed a_load_ref_reg
+ implemented procedure entry/exit code generation
+ implemented a_load_reg_ref

git-svn-id: trunk@17009 -
2011-02-26 20:08:23 +00:00
florian
8b245369e1 + implemented normalize_ref
git-svn-id: trunk@17008 -
2011-02-26 20:03:39 +00:00
florian
4cfc5693c5 * fix compilation for avr
* some ideas for avr register management
+ initial implementation of a_load_reg_reg

git-svn-id: trunk@17007 -
2011-02-26 20:02:45 +00:00
joost
07bf44517c * Merged XPCom branch into trunk, added support for constref and changed
the IInterface implementation to be XPCom-compatible
--- Merging r15997 through r16179 into '.':
U    rtl/inc/variants.pp
U    rtl/inc/objpash.inc
U    rtl/inc/objpas.inc
U    rtl/objpas/classes/persist.inc
U    rtl/objpas/classes/compon.inc
U    rtl/objpas/classes/classesh.inc
A    tests/test/tconstref1.pp
A    tests/test/tconstref2.pp
A    tests/test/tconstref3.pp
U    tests/test/tinterface4.pp
A    tests/test/tconstref4.pp
U    tests/webtbs/tw10897.pp
U    tests/webtbs/tw4086.pp
U    tests/webtbs/tw15363.pp
U    tests/webtbs/tw2177.pp
U    tests/webtbs/tw16592.pp
U    tests/tbs/tb0546.pp
U    compiler/sparc/cpupara.pas
U    compiler/i386/cpupara.pas
U    compiler/pdecsub.pas
U    compiler/symdef.pas
U    compiler/powerpc/cpupara.pas
U    compiler/avr/cpupara.pas
U    compiler/browcol.pas
U    compiler/defcmp.pas
U    compiler/powerpc64/cpupara.pas
U    compiler/ncgrtti.pas
U    compiler/x86_64/cpupara.pas
U    compiler/opttail.pas
U    compiler/htypechk.pas
U    compiler/tokens.pas
U    compiler/objcutil.pas
U    compiler/ncal.pas
U    compiler/symtable.pas
U    compiler/symsym.pas
U    compiler/m68k/cpupara.pas
U    compiler/regvars.pas
U    compiler/arm/cpupara.pas
U    compiler/symconst.pas
U    compiler/mips/cpupara.pas
U    compiler/paramgr.pas
U    compiler/psub.pas
U    compiler/pdecvar.pas
U    compiler/dbgstabs.pas
U    compiler/options.pas
U    packages/fcl-fpcunit/src/testutils.pp

git-svn-id: trunk@16180 -
2010-10-17 20:58:22 +00:00
Jonas Maebe
57bd6d2685 + merged nestedprocvars branch
+ support for nested procedural variables:
    o activate using {$modeswitch nestedprocvars} (compatible with all
      regular syntax modes, enabled by default for MacPas mode)
    o activating this mode switch changes the way the frame pointer is
      passed to nested routines into the same way that Delphi uses (always
      passed via the stack, and if necessary removed from the stack by
      the caller) -- Todo: possibly also allow using this parameter
      passing convention without enabling nested procvars, maybe even
      by default in Delphi mode, see mantis #9432
    o both global and nested routines can be passed to/assigned to a
      nested procvar (and called via them). Note that converting global
      *procvars* to nested procvars is intentionally not supported, so
      that this functionality can also be implemented via compile-time
      generated trampolines if necessary (e.g. for LLVM or CIL backends
      as long as they don't support the aforementioned parameter passing
      convention)
    o a nested procvar can both be declared using a Mac/ISO Pascal style
      "inline" type declaration as a parameter type, or as a stand-alone
      type (in the latter case, add "is nested" at the end in analogy to
      "of object" for method pointers -- note that using variables of
      such a type is dangerous, because if you call them once the enclosing
      stack frame no longer exists on the stack, the results are
      undefined; this is however allowed for Metaware Pascal compatibility)

git-svn-id: trunk@15694 -
2010-08-02 22:20:36 +00:00
Jonas Maebe
283018a3bf * changed tprocdef.funcretloc[] from a tlocation into a tcgpara so it can
represent complex locations (required for full x86-64 ABI support,
    which is not yet implemented) -> lots of special result handling
    code has been removed and replaced by the parameter handling
    routines
  + added support for composite parameters (and hence function
    results) to tcg.a_load_ref_cgpara() (so it can be used for
    handling, e.g., 64 bit parameters on 32 bit platforms)
  * the above fixed writing past the end of allocated memory when
    handling records returned in registers on x86-64 whose size is
    not a multiple of 8 bytes (mantis #16357)
  - removed the x86-64 and PPC specific versions of a_load_ref_cgpara(),
    as they are now handled correctly by the generic version
  * moved the responsibility of allocating tcgpara cpu registers
    (using paramanager.allocparaloc()) from the callers of
    cg.a_load*_cgpara() to the cg.a_load*_cgpara() methods
    themselves (so the register allocation can be done efficiently
    when dealing with function results)
  * for the above, renamed paramanager.alloc/freeparaloc() to
    paramanager.alloc/freecgpara(), and use paramanager.allocparaloc()
    to allocate individual pcgparalocations instead
  * fixed the register size of SSE2 function result registers for
    x86-64 (when used for floating point), which results in removing
    a few superfluous "movs? %xmm0,%xmm0" instructions
  * fixed compilation of paramanagers of avr, m68k and mips after r13695
    and also updated them for these new changes

git-svn-id: trunk@15350 -
2010-05-30 21:12:57 +00:00
Jonas Maebe
9bc15a5f61 * renamed a_param_* to a_load_*_cgpara
git-svn-id: trunk@15305 -
2010-05-22 09:07:21 +00:00
florian
5acf377e31 * enable node cse for all cpus as level 2 optimization
git-svn-id: trunk@14703 -
2010-01-17 12:28:28 +00:00
florian
515774b864 * merged armthum branch
-- Zusammenführen der Unterschiede zwischen Projektarchiv-URLs in ».«:
U    rtl/arm/setjump.inc
A    rtl/arm/thumb2.inc
U    rtl/arm/divide.inc
A    rtl/embedded/arm/stm32f103.pp
U    rtl/inc/system.inc
U    compiler/alpha/cgcpu.pas
U    compiler/sparc/cgcpu.pas
U    compiler/i386/cgcpu.pas
U    compiler/ncgld.pas
U    compiler/powerpc/cgcpu.pas
U    compiler/avr/cgcpu.pas
U    compiler/aggas.pas
U    compiler/powerpc64/cgcpu.pas
U    compiler/x86_64/cgcpu.pas
U    compiler/cgobj.pas
U    compiler/psystem.pas
U    compiler/aasmtai.pas
U    compiler/m68k/cgcpu.pas
U    compiler/ncgutil.pas
U    compiler/rautils.pas
U    compiler/arm/raarmgas.pas
U    compiler/arm/armatts.inc
U    compiler/arm/cgcpu.pas
U    compiler/arm/armins.dat
U    compiler/arm/rgcpu.pas
U    compiler/arm/cpubase.pas
U    compiler/arm/agarmgas.pas
U    compiler/arm/cpuinfo.pas
U    compiler/arm/armop.inc
U    compiler/arm/narmadd.pas
U    compiler/arm/aoptcpu.pas
U    compiler/arm/armatt.inc
U    compiler/arm/aasmcpu.pas
U    compiler/systems/t_embed.pas
U    compiler/psub.pas
U    compiler/options.pas

git-svn-id: trunk@13801 -
2009-10-04 09:03:44 +00:00
Jonas Maebe
cc5aeb09de * fixed handling the result value of functions where the result type is
forced to something else by the compiler (internal rtl functions etc),
    necessary for the objc branch
  * fixed adding all used function result registers to the list of
    registers that may need to be saved before a function call

git-svn-id: trunk@13695 -
2009-09-12 12:21:34 +00:00