summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* + initial skeleton of the js backendjsflorian2014-04-0626-1/+3831
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/js@27484 3ad0048d-3df7-0310-abae-a5850022a9f2
* * preserve the segment of the reference in tx86vecnode.update_reference_reg_mulnickysn2014-04-051-0/+4
| | | | | | | | on i386 and x86_64 as well git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27481 3ad0048d-3df7-0310-abae-a5850022a9f2
* * override tcgvecnode.update_reference_reg_mul for i8086 and add code thatnickysn2014-04-051-2/+18
| | | | | | | | | preserves the reference segment (because reference_reset_base, which is sometimes used by the base method, kills the segment) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27480 3ad0048d-3df7-0310-abae-a5850022a9f2
* * use the stack segment for SP-relative addresses in Tcgx86.g_concatcopy innickysn2014-04-051-4/+4
| | | | | | | | | the memory models with SS<>DS (necessary, because make_simple_ref isn't called in the copy_string case) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27479 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Moved local label infrastructure into tasmreader, reduces number of global ↵sergei2014-04-055-103/+72
| | | | | | vars. Functionality is not changed. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27477 3ad0048d-3df7-0310-abae-a5850022a9f2
* * tcgx86.make_simple_ref: in i8086 memory models with DS<>SS, add an SS: segmentnickysn2014-04-051-0/+3
| | | | | | | | | override when converting SP-relative references to use a general purpose register git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27473 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Calling tlabelsym.mangledname should not define the label. This was ↵sergei2014-04-052-3/+6
| | | | | | | | | causing "already defined" errors if a label was referenced before it was defined. + Test. + Check duplicate labels in assembler blocks. This was impossible due to above bug and duplicate labels were detected only at assembling stage where no location information could be provided. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27472 3ad0048d-3df7-0310-abae-a5850022a9f2
* * ti8086callnode.extra_call_ref_code: do not change the base register to BX ifnickysn2014-04-041-1/+1
| | | | | | | | it's BP, because that breaks memory models with DS<>SS git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27471 3ad0048d-3df7-0310-abae-a5850022a9f2
* * i8086 far data model fixes in the copying of openarray value paramsnickysn2014-04-042-4/+11
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27470 3ad0048d-3df7-0310-abae-a5850022a9f2
* tstaticvarsym.ppuload: read the section string outside of the symansistr ↵svenbarth2014-04-041-1/+1
| | | | | | define to match the code of ppuwrite git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27467 3ad0048d-3df7-0310-abae-a5850022a9f2
* Fix for Mantis #19697. For this we need to have the internal static var ↵svenbarth2014-04-044-3/+38
| | | | | | | | | | | | | | | | | | | symbol know that it came from a static field var symbol so that we can check that for generic or not. symsym.pas, tfieldvarsym: + add new field fieldvarsym which holds a reference to a tfieldvarsym if the static sym was created based on such a symbol + add necessary methods and code to correctly load from and store to PPU + add new constructor create_from_fieldvar symcreat.pas, make_field_static: * use new create_from_fieldvar constructor instead of the default one hlcgobj.pas, finalize_static_data: * check whether the static var is based on a generic's class var ppu.pas: * increase PPU version + added test git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27466 3ad0048d-3df7-0310-abae-a5850022a9f2
* Fix for Mantis #25915.svenbarth2014-04-042-7/+17
| | | | | | | | | | | * ptype.pas, id_type: generate the "identifier not found" message only if the identifier was really not found and not when the identifier is a non-type * pexpr.pas, statement_syssym: don't generate the "type id expected" error message for Default() anymore; this is already handled by single_type + added test (though this again will not help much as output is not parsed...) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27464 3ad0048d-3df7-0310-abae-a5850022a9f2
* Fix for Mantis #25959.svenbarth2014-04-041-1/+7
| | | | | | | | | * pdecsub.pas, parse_proc_direc: when a hint directive is parsed we need to check whether the new token can still be a directive + added test (though that won't help much as we don't check the compiler output yet... :/ ) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27463 3ad0048d-3df7-0310-abae-a5850022a9f2
* + Tcgx86.g_concatcopy: added support for memory models with DS<>SSnickysn2014-04-041-4/+16
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27461 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Tcgx86.g_concatcopy: use boolean variables saved_ds and saved_es to keep tracknickysn2014-04-041-7/+14
| | | | | | | | whether these segment registers were saved on the stack or not git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27460 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed i8086 far pointer typed constants that are initialized with nilnickysn2014-04-034-2/+93
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27458 3ad0048d-3df7-0310-abae-a5850022a9f2
* + initialize the initialloc for push_addr_param parameters correctly in i8086nickysn2014-04-031-2/+2
| | | | | | far data memory models git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27455 3ad0048d-3df7-0310-abae-a5850022a9f2
* + added size info to the 'Var X located at' comment generated in the asm outputnickysn2014-04-031-1/+2
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27454 3ad0048d-3df7-0310-abae-a5850022a9f2
* + added tcgsize2str functionnickysn2014-04-031-0/+8
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27453 3ad0048d-3df7-0310-abae-a5850022a9f2
* * handle the result of FPC_CATCHES via the high level code generator (which ↵nickysn2014-04-021-7/+10
| | | | | | makes it i8086 far pointer safe) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27451 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Moved fixup_jmps to target-specific classes for powerpc,powerpc64 and ↵sergei2014-04-025-13/+29
| | | | | | MIPS, cleaned out remaining $ifdef's. A slight functionality change is that fixup_jmps is now called before adding the procedure end symbol, not after, but that should not matter. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27450 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Added virtual method tprocinfo.postprocess_code and moved target-specific ↵sergei2014-04-024-13/+28
| | | | | | processing from base class into target-specific descendant classes (ARM and AVR, other targets still to do). git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27449 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed m68k typo in r27438jonas2014-04-011-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27443 3ad0048d-3df7-0310-abae-a5850022a9f2
* * increased ppu version after all symdef changesjonas2014-04-011-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27442 3ad0048d-3df7-0310-abae-a5850022a9f2
* * moved pbestrealtype from symdef to symcpujonas2014-04-0123-64/+78
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27441 3ad0048d-3df7-0310-abae-a5850022a9f2
* - removed no longer used jvmdef unit from uses clausejonas2014-04-011-3/+0
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27440 3ad0048d-3df7-0310-abae-a5850022a9f2
* * moved jvm-specific classdef-related fields from tenumdef to a platform-jonas2014-04-0112-46/+71
| | | | | | specific descendant git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27439 3ad0048d-3df7-0310-abae-a5850022a9f2
* * moved amiga/morphos-specific libsym-related field from tprocdef tojonas2014-04-017-39/+133
| | | | | | | | | cpu-specific descendants (unfortunately causes some duplication, but the code is trivial and there is no easy way to avoid it) * also moved the use of the field in ncal to cpu-specific files (with same caveat) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27438 3ad0048d-3df7-0310-abae-a5850022a9f2
* * moved ARM-specific tprocdef.total_stackframe_size field to cpu-specificjonas2014-04-014-11/+9
| | | | | | descendant git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27437 3ad0048d-3df7-0310-abae-a5850022a9f2
* * moved MIPS-specific tprocdef.total_local_size field to cpu-specificjonas2014-04-013-7/+5
| | | | | | descendant git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27436 3ad0048d-3df7-0310-abae-a5850022a9f2
* - removed no longer used tprocdef.fpu_used field for i386/i8086 (the onejonas2014-04-012-14/+1
| | | | | | place where it was used, we now handle the consequence directly) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27435 3ad0048d-3df7-0310-abae-a5850022a9f2
* - removed storing/loading unused byte for tprocdef.fpu_usedjonas2014-04-011-3/+0
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27434 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix for the regressions caused by r27417florian2014-04-011-4/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27433 3ad0048d-3df7-0310-abae-a5850022a9f2
* + proper i8086 Seg() implementation (i.e. support segments other than DS)nickysn2014-04-011-3/+48
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27432 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Win64 apparently expects records with single field of floating-point type ↵sergei2014-04-011-0/+11
| | | | | | to be passed the same way as that only field, i.e. in xmm register. Fixes tests/cg/tcalext6.pp. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27431 3ad0048d-3df7-0310-abae-a5850022a9f2
* * x86_64-win64: fixed handling of RELOC_RELATIVE_1..RELOC_RELATIVE_5 COFF ↵sergei2014-04-011-5/+5
| | | | | | relocations, they were off by 4 bytes, causing failure in tests/test/tcalext.pp. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27430 3ad0048d-3df7-0310-abae-a5850022a9f2
* * relaxed conditions for floats in int registers, this improved softfloat ↵florian2014-03-311-4/+5
| | | | | | code significantly git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27417 3ad0048d-3df7-0310-abae-a5850022a9f2
* * ARM: Implemented floating-point negation and abs() for softfloat using ↵sergei2014-03-312-2/+40
| | | | | | | | | integer instructions. Fixes webtbs/tw4534.pp, and also yields much faster code than existing implementation. Background: these operations are defined as flipping or clearing the upper bit of number, respectively, and never result in precision loss or raise floating-point exceptions. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27411 3ad0048d-3df7-0310-abae-a5850022a9f2
* + symx86.pas added to ppc8086.lpinickysn2014-03-311-1/+5
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27405 3ad0048d-3df7-0310-abae-a5850022a9f2
* + symx86 unit, forgot to commit (part of r27397)jonas2014-03-301-0/+140
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27399 3ad0048d-3df7-0310-abae-a5850022a9f2
* + added the newly added source files from r27379 to ppc8086.lpinickysn2014-03-301-1/+25
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27398 3ad0048d-3df7-0310-abae-a5850022a9f2
* * moved x86-specific tpointerdef functionality to architecture-specificjonas2014-03-3013-128/+73
| | | | | | descendants git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27397 3ad0048d-3df7-0310-abae-a5850022a9f2
* + added class reference types of the architecture-specific t*def/t*symjonas2014-03-3014-0/+462
| | | | | | classes git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27396 3ad0048d-3df7-0310-abae-a5850022a9f2
* * moved jvm tprocdef name mangling to jvm-specific descendant classjonas2014-03-304-129/+135
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27395 3ad0048d-3df7-0310-abae-a5850022a9f2
* * moved jvm-specific exprasm field from tprocdef to jvm-specific descendantjonas2014-03-306-22/+26
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27394 3ad0048d-3df7-0310-abae-a5850022a9f2
* + tcg8086.g_copyvaluepara_openarray: support source to be in a different segmentnickysn2014-03-301-2/+19
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27393 3ad0048d-3df7-0310-abae-a5850022a9f2
* + support compact, large and huge memory models in ↵nickysn2014-03-301-1/+3
| | | | | | x86/cpubase.segment_regs_equal() git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27392 3ad0048d-3df7-0310-abae-a5850022a9f2
* * load the destination segment in tcg8086.g_copyvaluepara_openarray from SSnickysn2014-03-301-1/+1
| | | | | | | | | instead of DS, because the destination is on the stack, but in some memory models DS may be different than SS git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27391 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed Tcgx86.g_concatcopy not using the correct push instruction size whennickysn2014-03-301-3/+3
| | | | | | | | pushing the source segment git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27389 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed nested access to parent local variables in i8086 far data memory modelsnickysn2014-03-301-2/+29
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27388 3ad0048d-3df7-0310-abae-a5850022a9f2