Commit Graph

38 Commits

Author SHA1 Message Date
pierre
15f4e1279b Add RS_GP to list of saved registers if pi_needs_got flag is set
git-svn-id: trunk@22450 -
2012-09-24 21:01:47 +00:00
pierre
c72f27e53e Remove more TABs in source
git-svn-id: trunk@22334 -
2012-09-06 08:07:38 +00:00
pierre
80b0891c7c Remove TABs in source
git-svn-id: trunk@22333 -
2012-09-06 08:06:08 +00:00
pierre
9ad6285fe2 * Fix 64-bit OP_ADD and OP_SUB operations (no overflow support yet)
git-svn-id: trunk@22225 -
2012-08-23 22:05:41 +00:00
pierre
05a326a83e Make sure f2X+1 is also considered used if f2X is used
git-svn-id: trunk@22196 -
2012-08-22 22:49:53 +00:00
pierre
ffd01794fb Reserve R25 () register for PIC function calling
git-svn-id: trunk@21857 -
2012-07-10 21:36:00 +00:00
pierre
bc0c94c204 fpcdefs.inc: Set fpc_compiler_has_fixup_jmps for powerpcXX and mips CPUs.
psub.pas: Use new fpc_compiler_has_fixup_jmps conditional.
 mips/aasmcpu.pas: MIPS specific fixup_jmps function,
   The insttruction distance calculation is not exact as
   some pseudo-instruction can be expanded to a variable number of real instructions
   real calculation would only be possible if we first 
   convert pseudo-instuctions to real instructions before calling fixup_jmps.

 ncgutil.pas: Revert commit r21791
 ncgcon.pas: Revert commit r21786
 mips/cgcpu.pas: Partial revert of commit r21798, no need to always use A_J,
 as fixup_jmps now handles out of range branches.

git-svn-id: trunk@21822 -
2012-07-09 08:59:13 +00:00
pierre
6f12197d3b Fix set of frame poointer value for big local stack size
git-svn-id: trunk@21802 -
2012-07-06 13:32:13 +00:00
pierre
a771b32097 Use R9 instead of AT for big local stack size to avoid error due to AT being changed by pseudo-instructions
git-svn-id: trunk@21800 -
2012-07-06 12:05:58 +00:00
pierre
2e4c704f06 Use A_J instead of A_BA for a_jmp_XXX unless we generate PIC code to avoid branch out of range error (like for packages/fpmake compilation)
git-svn-id: trunk@21798 -
2012-07-05 21:24:22 +00:00
pierre
7982b34416 Start of PIC code support
git-svn-id: trunk@21777 -
2012-07-04 16:28:55 +00:00
pierre
7492f196f8 * Handle OS_F32 <-> OS_F64 float conversions
git-svn-id: trunk@21762 -
2012-07-03 16:16:21 +00:00
Jonas Maebe
7a0ae38700 + also specify the parameter def when allocating a parameter via
getintparaloc + adapted all call sites of getintparaloc. This
    led to a number of additional, related changes:
   o corrected the type information for some getintparaloc parameters
   o don't allocate some intparalocs in cases they aren't used
   o changed "const tvardata" parameter into "constref tvardata" for
     fpc_variant_copy_overwrite to make pass-by-reference semantics
     explicit
   o moved a number of routines that now have to call find_system_type()
     from cgobj to hlcgobj so that cgobj doesn't have to start depending
     on the symtable unit
   o added versions of the cpureg alloc/dealloc methods to hlcgobj that
     call through to their cgobj counter parts, so we can call save/restore
     the cpu registers before/after calling system helpers from hlcgobj
     (not implemented in hlcgobj itself, because all basic register
      allocator functionality is still part of cgobj/cgcpu)

git-svn-id: trunk@21696 -
2012-06-24 15:02:12 +00:00
pierre
74eb121d1c Fix big endian issues
git-svn-id: trunk@21672 -
2012-06-21 11:52:57 +00:00
pierre
0462dc3ca7 * Use A_NEGU (without overflow check) for OP_NEG op_reg_reg
git-svn-id: trunk@21615 -
2012-06-14 23:05:15 +00:00
pierre
c87ee7f100 Merge of 21562 by Foxsen
git-svn-id: trunk@21612 -
2012-06-14 15:08:12 +00:00
pierre
e8c7635d49 Merge of rev21561 by Foxsen
fix short/smallint operations
without this test/cg/tcnvint6.pp failed at 31 

git-svn-id: trunk@21602 -
2012-06-13 22:49:05 +00:00
pierre
d6828965fd Merge of revision 21552 by Foxsen.
use NR_R1 instead of NR_R3 for big stack adjustment temp register(R1 is $at, more suitable)
use A_JR for register operands, although the assembler can translate J to JR when necessary, it is more clear

git-svn-id: trunk@21596 -
2012-06-13 21:57:43 +00:00
pierre
93e0dd9c2f * Patch from Fuxin Zhang: other mips and mipsel CPUs changes
git-svn-id: trunk@21538 -
2012-06-07 23:20:06 +00:00
florian
1b3dd8eefe * patch by Jeppe Johansen: fixes TCGMIPS.getfpuregister
git-svn-id: trunk@21419 -
2012-05-28 16:23:11 +00:00
Jonas Maebe
11968c4261 * use A_J instead of A_B (without explicitly defined condition) to jump to
wrapped interface methods

git-svn-id: trunk@21389 -
2012-05-25 14:50:50 +00:00
florian
edbb826521 * generate correct entry code on mips for subroutines with a stack frame >2^15-1
git-svn-id: trunk@21238 -
2012-05-05 18:34:31 +00:00
florian
25e82bb1af * fix stack frame generation on mips(el)
git-svn-id: trunk@21121 -
2012-04-29 21:29:06 +00:00
florian
aadeba4d1a * started to fix stack frame generation on MIPS(EL)
git-svn-id: trunk@21118 -
2012-04-29 16:58:19 +00:00
florian
b19b8badf9 * fix volatible integer register set on mips
* fix available registers on mips

git-svn-id: trunk@20346 -
2012-02-13 21:37:22 +00:00
florian
e79f3a6930 * range check error fixed
git-svn-id: trunk@20283 -
2012-02-08 21:30:31 +00:00
florian
de4a96f96d * fixes several register allocation related mips issues
* fixes range check error in mips code

git-svn-id: trunk@20266 -
2012-02-05 21:58:45 +00:00
florian
a2009af76e * updated MIPS code so the compiler gets through the system unit
git-svn-id: trunk@20259 -
2012-02-05 08:14:46 +00:00
florian
28036ed068 * fix some mips compiler issues, system unit compilation is getting forward
git-svn-id: trunk@20258 -
2012-02-04 22:53:52 +00:00
pierre
531d3808fc Override abstract method to abvoid warning at compilation time
git-svn-id: trunk@19582 -
2011-11-03 10:10:40 +00:00
sergei
9608c4eabe * Interface wrappers must be global when linking smart, Mantis #19462. Other targets already have this condition in place.
git-svn-id: trunk@17631 -
2011-06-02 10:49:28 +00:00
florian
77f2d6cc0d * introduce usage of TCGInt in the code generator units
git-svn-id: trunk@17459 -
2011-05-14 17:58:23 +00:00
svenbarth
96116a6c3a Several adjustments because virtual methods in helpers are just normal methods and a VMT isn't generated for them either.
* $CPU/cgcpu.pas: disable the generation of VMT loading code
* dbgstabs.pas, dbgdwarf.pas: treat virtual methods of helpers as normal methods
* ncgcal.pas: don't register virtual helper methods for WPO 
* ncgrtti.pas: write virtual helper methods as normal methods to RTTI
* nobj.pas: correctly handle final and override cases in helpers
* pdecvar.pas: property getters
* rautils.pas: no VMT offset in records

git-svn-id: branches/svenbarth/classhelpers@17150 -
2011-03-20 10:41:45 +00:00
paul
b317139006 compiler: fix compilation problems caused by tprocdef._class -> tprocdef.struct rename which was found by make fullcycle
git-svn-id: branches/paul/extended_records@16530 -
2010-12-10 06:50:58 +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
0c8546f94c * more MIPS code of David Zhang integrated
git-svn-id: trunk@14228 -
2009-11-20 14:46:45 +00:00
florian
e5ebb2a26e * started to integrate the code of David Zhang's MIPS code from fpc-mips on sf into fpc trunk
git-svn-id: trunk@14219 -
2009-11-19 22:07:10 +00:00