Commit Graph

99 Commits

Author SHA1 Message Date
pierre
87b6bb5053 + Add .cpXXX pseudo-instruction for PIC code
git-svn-id: trunk@21772 -
2012-07-04 16:23:16 +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
Jonas Maebe
c3ea451aea * set tcgpara.vardef when creating parameter info
git-svn-id: trunk@21693 -
2012-06-24 15:01:54 +00:00
Jonas Maebe
587244c088 * factored out common code from get_funcretloc()
* set tcgpara.def for the function return location (field introduced for and
    already used by the JVM code generator, required for future hlcg
    functionality)

git-svn-id: trunk@21691 -
2012-06-24 15:01:42 +00:00
pierre
74eb121d1c Fix big endian issues
git-svn-id: trunk@21672 -
2012-06-21 11:52:57 +00:00
pierre
aa8747f5c9 Add more information to TMipsProcInfo class
git-svn-id: trunk@21671 -
2012-06-21 11:52:08 +00:00
pierre
f9930e3f46 Use ldc1 and sdc1 for big endian mips CPU directly
git-svn-id: trunk@21670 -
2012-06-21 11:51:07 +00:00
Jonas Maebe
0fc422f244 * moved definition of maxcpuregister and tcpuregisterset from cgbase to
cgutils, and define them so they are no larger than what is required by
    the current target platform
  * added cgutils to the uses clause of several units that use the
    tcpuregisterset type

git-svn-id: trunk@21624 -
2012-06-15 18:24:35 +00:00
Jonas Maebe
708a2532fc * consistently define empty saved_mm_registers arrays as containing a single
RS_INVALID superregister (instead of sometimes RS_NO and sometimes
    RS_INVALID)
  * check for RS_INVALID in tcg.g_save_registers() and ignore such entries

git-svn-id: trunk@21622 -
2012-06-15 18:24:25 +00:00
pierre
46d98a1f4e * Fix mips compiler compilation failure
git-svn-id: trunk@21620 -
2012-06-15 14:26:51 +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
72d310a8a4 Partial merge of 21562 by Foxsen, adapted.
git-svn-id: trunk@21613 -
2012-06-14 15:09:14 +00:00
pierre
c87ee7f100 Merge of 21562 by Foxsen
git-svn-id: trunk@21612 -
2012-06-14 15:08:12 +00:00
pierre
a3184d7ff5 Merge of 21562 by Foxsen, needs_frame_pointer field added to TMIPSProcInfo
git-svn-id: trunk@21611 -
2012-06-14 15:06:40 +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
495a6cfebf Merge of rev21558-59-60 by Foxsen
21558:
use inherited first_int_to_real to avoid mixing doubles and singles
it fixes the failure of test/cg/taddcurr.pp

21559:
set default round mode to round nearest instead of round to zero
it fix test/cg/taddcurr.pp

21560:
enable softfpu, default first_int_to_real depends on int64_to_float64/32 etc.
It is needed by the patch of r21558

git-svn-id: trunk@21601 -
2012-06-13 22:39:00 +00:00
pierre
600dd162af Merge of rev21557 by Foxsen
Make macro MIPS/CPUMIPS/MIPS32 common for big endian and little endian mips processors
use MIPSEL* for little endian systems
use MIPSEB* for big endian systems

git-svn-id: trunk@21599 -
2012-06-13 22:25:38 +00:00
pierre
90fd8d8962 Merge of revision 21554 by Foxsen.
correct constant for mipsel.

git-svn-id: trunk@21598 -
2012-06-13 22:07:31 +00:00
pierre
2e4703d454 Merge of revision 21553 by Foxsen.
make clear what registers might need to be saved

git-svn-id: trunk@21597 -
2012-06-13 22:03:29 +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
9453b1bb1e Merge of revision 21551 by Foxsen.
use cpu64bitaddr instead of cpu64bit
fix wrong order of 64BIT return register(now for little endian mips)

git-svn-id: trunk@21593 -
2012-06-13 21:50:11 +00:00
pierre
550bbb0186 + computed_local_size new longint field in TMIPSProcInfo
to check that LocalSize stays constant.

   New function mips_extra_offset (needed for stabs debugging)

git-svn-id: trunk@21585 -
2012-06-12 22:53:19 +00:00
pierre
b21198a14a * Fix error in comment in previous commit
git-svn-id: trunk@21539 -
2012-06-07 23:23:52 +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
pierre
22eae1b337 * Stack setup for MIPS and MIPSEL
git-svn-id: trunk@21537 -
2012-06-07 23:19:33 +00:00
pierre
4d8ebe5d1e Do not modify $sp inside function body for mipscpu
git-svn-id: trunk@21536 -
2012-06-07 23:17:52 +00:00
florian
0fa1bf27c1 + tmipsaddnode.pass_1 setting expectloc correctly
git-svn-id: trunk@21420 -
2012-05-28 16:24:21 +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
Jonas Maebe
edd42aa42a * moved subsetref/reg and bit_set/test support from cgobj to hlcgobj for
future use by high level code generator targets
   o this in turn required that all a_load*_loc* methods are called via
     hlcg rather than via cg, since a location can be a subsetref/reg and
     and those are no longer handled in tcg
   o that then required moving several force_location_* routines into
     thlcg because they use a_load_loc*, but did not take tdef size
     parameters (which are required by the thlcg a_load_loc* routines)
   o the only practical consequence is that from now on, you have to
     use hlcg.location_force_mem/reg() (fpureg not yet) and
     hlcg.gen_load_loc_cgpara() instead of the removed versions from ncgutil,
     and hlcg.a_load*loc*() instead of cg.a_load*loc* if a subsetref/reg
     might be involved

git-svn-id: trunk@21287 -
2012-05-13 12:33:10 +00:00
Jonas Maebe
85a3fd3357 + ossinttype/osuinttype defs that correspond to OS_SINT/OS_INT for use in
the high level code generator

git-svn-id: trunk@21279 -
2012-05-12 16:03:15 +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
366e2027fc * rename TMIPSELParaManager into TMIPSParaManager
git-svn-id: trunk@21124 -
2012-04-29 21:32:52 +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
Jonas Maebe
834026bfb5 * synchronised with trunk up to r21067
git-svn-id: branches/jvmbackend@21068 -
2012-04-26 21:24:20 +00:00
florian
c7974fe119 * mipsel-linux uses also a dollar sign as separator in assembler names
git-svn-id: trunk@20955 -
2012-04-21 18:19:38 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
Jonas Maebe
ac43eb9b70 + generic implementation of ReplaceForbiddenAsmSymbolChars() instead
of the AVR-specific ifdef'ed variant
   o since the only special character we use in mangled names on all platforms
     is $, added a new field to tasminfo called "dollarsign" that holds the
     character $'s should be replaced with (if it doesn't have to be replaced,
     leave it at $)

git-svn-id: trunk@20801 -
2012-04-11 18:01:57 +00:00
florian
2f5ce095ce * RefsHaveIndexReg -> cpurefshaveindexreg
* cpurefshaveindexreg defined properly in fpcdefs.inc

git-svn-id: trunk@20504 -
2012-03-10 19:43:52 +00:00
pierre
c453baf0b9 + Enable stabs debuginfo, dwarf disabled for now
git-svn-id: trunk@20361 -
2012-02-16 14:25:03 +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
f927198c2a + gas for mips is by default little endian, so pass the endianess
git-svn-id: trunk@20280 -
2012-02-08 21:28:22 +00:00
florian
6be7b08b8e * gas reader fixed
git-svn-id: trunk@20272 -
2012-02-06 21:50:05 +00:00
florian
ae37b9f5b9 * fix floating point registers gas name
git-svn-id: trunk@20271 -
2012-02-06 20:33:12 +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
3d2a27c66c * fix fpu register type
git-svn-id: trunk@20261 -
2012-02-05 09:14:55 +00:00
florian
f2ee5da112 * fix gas mips integer register naming
git-svn-id: trunk@20260 -
2012-02-05 08:24:51 +00:00