Commit Graph

13925 Commits

Author SHA1 Message Date
pierre
46d98a1f4e * Fix mips compiler compilation failure
git-svn-id: trunk@21620 -
2012-06-15 14:26:51 +00:00
Jonas Maebe
f79aff553e - removed duplicate RS_INVALID declaration (with moreover a different
value than in cgbase)

git-svn-id: trunk@21619 -
2012-06-15 13:48:05 +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
ca497405b8 Avoid double call to set_source_info for mipsel
git-svn-id: trunk@21614 -
2012-06-14 15:51:49 +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
261538f9c2 Fix bug report 22265
git-svn-id: trunk@21609 -
2012-06-14 14:00:44 +00:00
svenbarth
d87b203a0a Do not call ret_in_param of the current parameter manager when parsing a generic method/function. This fixes Mantis #21921.
* pparautl.pas, insert_funcret_para:
    assume that the result in a generic function/method can not be passed in a param
* pparautl.pas, insert_funcret_local: 
    don't call ret_in_param, but create the symbol as we need a valid funcretsym
* pstatmnt.pas, assembler_block:
    don't modify the framepointer for a generic method/function
* rautils.pas, TOperand.SetupResult:
    don't assume that we can't use the result for a generic function/method

git-svn-id: trunk@21608 -
2012-06-14 12:11:11 +00:00
pierre
41248ea4f7 Hopefully correct fix for ReplayToken TSettings record writes
git-svn-id: trunk@21605 -
2012-06-14 10:14:24 +00:00
pierre
1d4862f3c1 * Remove obsolete size check leading to failure for generics tests
git-svn-id: trunk@21604 -
2012-06-14 07:28:55 +00:00
svenbarth
d2fabd2a22 Fix for Mantis #21350
+ pgenutil.pas: 
    add a procedure which adds a type symbol to a non-Delphi-mode generic class or record which has the same name as the unit global dummy symbol for that generic. I don't know why I had that idea earlier as this will simplify some of the conditions in the parser again (I haven't changed these yet, but I hope to do that at least when I start working on generic functions).
* pgenutil.pas, generate_specialization:
    correctly handle "specialize TSomeGeneric<T>" as method parameter in a generic with the newly added rename symbol
* pdecobj.pas, object_dec & ptype.pas, record_dec: 
    call the procedure to add the rename symbol (the procedure checks whether the mode is correct)
* ppu.pas: 
    increase PPU version so that we don't use non-Delphi mode units with generics, but without the rename symbol
+ added tests:
    the one in webtbs are for classes/objects and those in test are for records

git-svn-id: trunk@21603 -
2012-06-14 07:07:28 +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
a805259761 + Increase CurrentPPUVersion following removal of packed attribute for tsettings type
git-svn-id: trunk@21595 -
2012-06-13 21:53:37 +00:00
pierre
d67d1abcba * Use field by field write of current_settings for replaytoken and remove packed attribute for tsettings type
git-svn-id: trunk@21594 -
2012-06-13 21:51:59 +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
sergei
85f6062e05 * Reworked writing ELF symbols into a separate class, TElfSymtab, which is also suitable for creating symbol tables in executable and dynamic ELF files.
* Do not write ELF symbols for internal sections (symbol/string table, relocation sections and alike).

git-svn-id: trunk@21592 -
2012-06-13 16:40:50 +00:00
pierre
8698357d6c Makefile regenerazted after change to Makefile.fpc:
+ Add CYCLELEVEL variable, whose value can be from 1 to 3
  to be able to modify used options at a specific level,
  using OPTLEVELX, LOCALOPTLEVELX and RTLOPTLEVELX
  with X being the current value of CYCLELEVEL.
  extcycle: Append to value of OPT variable instead of overwriting it.
  fullcycle: Remove i386 target for x86_64 source cpu
  as this does not work for windows-64bit.

git-svn-id: trunk@21590 -
2012-06-13 08:05:36 +00:00
pierre
f369069965 + Add CYCLELEVEL variable, whose value can be from 1 to 3
to be able to modify used options at a specific level,
  using OPTLEVELX, LOCALOPTLEVELX and RTLOPTLEVELX
  with X being the current value of CYCLELEVEL.
  extcycle: Append to value of OPT variable instead of overwriting it.
  fullcycle: Remove i386 target for x86_64 source cpu
  as this does not work for windows-64bit.

git-svn-id: trunk@21589 -
2012-06-13 08:04:44 +00:00
pierre
84214d1249 * Use mips_extra_offset function to give offsets expected by GDB for MIPS cpu
git-svn-id: trunk@21588 -
2012-06-12 22:57:19 +00:00
pierre
a52699cf98 MIPS packed record are not working yet, so do not use them for TSEttings record
git-svn-id: trunk@21587 -
2012-06-12 22:55:37 +00:00
pierre
ae7dd3a930 tprocdef.total_local_size field added for MIPS cpu
git-svn-id: trunk@21586 -
2012-06-12 22:54:42 +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
svenbarth
7dfaec7a05 Fix for Mantis #21457
* pdecsub.pas, parse_proc_dec & pdecobj.pas, constructor_head: 
    correctly set the return type of the constructor of a class helper to the extended def
* psub.pas, generate_bodyentry_block:
    call the NEWINSTANCE of the extended class for constructors of class helpers

git-svn-id: trunk@21582 -
2012-06-12 09:42:22 +00:00
sergei
d0df2b247b * ogelf.pas: pass objdata into TElfObjSection.create_ext, so sections created via create_ext are 'owned' the same way as ones created via objData.CreateSection.
* cpu_soft -> fpu_soft

git-svn-id: trunk@21581 -
2012-06-11 13:02:35 +00:00
sergei
cc5fda2a1e + ogelf.pas: added definitions for program headers and .dynamic section, and reformatted existing ones to reduce line count.
git-svn-id: trunk@21580 -
2012-06-11 12:41:48 +00:00
sergei
4e95b50344 * Improved performance of COFF object reader: handle string table as array of chars instead of stream, use Pos instead of Copy to determine if name starts with the given chars.
git-svn-id: trunk@21577 -
2012-06-10 17:50:49 +00:00
florian
64ac48c815 * patch by Nico Erfurth: Better support for PLD on ARM
git-svn-id: trunk@21572 -
2012-06-09 17:28:05 +00:00
florian
3db61ae52d * patch by Nico Erfurth: Reworked regLoadedWithNewValue
Added better support for A_STR, A_LDR, A_STM, A_LDM.

Reworked the code the use a case statement for better readability.

git-svn-id: trunk@21571 -
2012-06-09 17:27:30 +00:00
florian
03a30ff036 * patch by Nico Erfurth: Remove STRH and STRB from instructionLoadsFromReg
STRH and STRB are not handled as sperate instructions by the code
generator.

git-svn-id: trunk@21570 -
2012-06-09 17:26:06 +00:00
florian
7599de416d * patch by Nico Erfurth: Reworked MatchOperand in ARM Peephole Optimizers
Added top_ref comperator which uses RefsEqual.
Reworked the code for easier readability by using a case statement.

git-svn-id: trunk@21569 -
2012-06-09 17:25:32 +00:00
sergei
e0deb4cc99 * Fixed building with OPT="-dTEST_WIN64_SEH -O2" after r21454. It is not yet possible to omit rbp-based stack frames if using SEH on Win64.
git-svn-id: trunk@21556 -
2012-06-08 18:29:10 +00:00
pierre
2b90b444bf Differentiate mips/mipsel default system macros
git-svn-id: trunk@21546 -
2012-06-08 10:08:24 +00:00
pierre
9fc6f91cd0 Set correct source info for mips/mipsel
git-svn-id: trunk@21545 -
2012-06-08 10:07:46 +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
pierre
c1269b0305 * Patch from Fuxin Zhang: po_assembler special code also disabled for mips and mipsel CPUs
git-svn-id: trunk@21535 -
2012-06-07 23:13:16 +00:00
pierre
ac38901d2a * Patch from Fuxin Zhang: set first_pram_offset to 0 for mips and mipsel CPUs
git-svn-id: trunk@21534 -
2012-06-07 23:11:16 +00:00
pierre
1e1e0f969e * Patch from Fuxin Zhang: remove cpuflags define for mips and mipsel CPUs
git-svn-id: trunk@21533 -
2012-06-07 23:08:18 +00:00
pierre
d6d237d688 * Patch from Fuxin Zhang: FPC_HAS_INTERNAL_SAR set for mips and mipsel CPUs
git-svn-id: trunk@21532 -
2012-06-07 23:07:32 +00:00
Jonas Maebe
50659b7e7f * give an error if a routine definition defines default values for
parameters that do not appear in forward/interface definitions
    (mantis #19434)
  * added test for #17136 already works

git-svn-id: trunk@21524 -
2012-06-07 22:36:39 +00:00
sergei
807a2f243f * Fixed control flow after r21492, was causing IE 200602252 if compiling with "-g -Xg" (Mantis #22224)
- Also removed accidentally committed debug code.

git-svn-id: trunk@21522 -
2012-06-07 22:30:50 +00:00
florian
6e8594a9af * patch by Nico Erfurth: Minor fix for FoldShiftProcess peephole optimizer on ARM
Use UpdateUsedRegs and drop the check for reloading of the register, as
this is done in RegUsedAfterInstruction now.

git-svn-id: trunk@21520 -
2012-06-07 18:21:46 +00:00