Commit Graph

155 Commits

Author SHA1 Message Date
Jonas Maebe
242b335531 * fixed widestring range checking on win64 (mantis #10450, fix also
depends on r10505)

git-svn-id: trunk@10506 -
2008-03-18 23:09:12 +00:00
Jonas Maebe
f36e5411af * split cpu64bit compiler define into
a) cpu64bitaddr, which means that we are generating a compiler which
       will generate code for targets with a 64 bit address space/abi
    b) cpu64bitalu, which means that we are generating a compiler which
       will generate code for a cpu with support for 64 bit integer
       operations (possibly running in a 32 bit address space, depending
       on the cpu64bitaddr define)
   All cpus which had cpu64bit set now have both the above defines set,
   and none of the 32 bit cpus have cpu64bitalu set (and none will
   compile with it currently)
  + pint and puint types, similar to aint/aword (not pword because that
    that conflicts with pword=^word)
  * several changes from aint/aword to pint/pword
  * some changes of tcgsize2size[OS_INT] to sizeof(pint)

git-svn-id: trunk@10320 -
2008-02-13 20:44:00 +00:00
florian
ae79ef2cb5 * don't range pointers converted to arrays, resolves #8191
git-svn-id: trunk@8900 -
2007-10-21 19:05:06 +00:00
peter
6b8aed593f * remove registers{int/mmx/fpu} from firstpass
* small cleanups of unused variables in firstpass
  * node_resources_fpu() created to get an approximation of the
    required fpu registers
  * for the moment use node_complexity in the CG until the
    node_resource_int() is created

git-svn-id: trunk@8655 -
2007-09-26 21:12:01 +00:00
Jonas Maebe
b02fd37fbe * removed some unused variables
git-svn-id: trunk@8399 -
2007-09-08 08:45:12 +00:00
Jonas Maebe
b99c1e9fed * fixed calculation of offset of constant indexing of bitpacked arrays of
non-ordinal types (mantis #9174)

git-svn-id: trunk@7847 -
2007-06-29 15:34:11 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
Jonas Maebe
de75b34dba * fixed another IE with indexing bitpacked arrays of composite types,
this time with constant rather than variable indices

git-svn-id: trunk@7599 -
2007-06-08 13:53:01 +00:00
Jonas Maebe
65e35ac401 * fixed internal error with bitpacked arrays of composite types whose
size is not a power of two

git-svn-id: trunk@7596 -
2007-06-08 09:11:08 +00:00
Jonas Maebe
4ce4742bc8 * mark invisible high parameters of open arrays/arrays of const
of parent procedures which are implicitly accessed from within
    nested procedures for range checking purposes as non-regable in
    the resulttype pass of the nested procedure (as opposed to in its
    pass1/pass2, because by then the regvar assignment of the parent
    procedure is already finished) (mantis #8975)
  * related fix regarding checking whether the high parameter actually
    exists (must check calling convention of the procedure to which the
    high parameter belongs, which is not the same as checking that of
    the current procedure in case of nested procedures)

git-svn-id: trunk@7512 -
2007-05-29 13:42:49 +00:00
florian
eb8b2fb138 * be more carefull with unaligned load optimization
git-svn-id: trunk@6356 -
2007-02-07 17:43:56 +00:00
florian
84726ed76c * copy unique return value to address register on m68k
git-svn-id: trunk@5554 -
2006-12-07 20:10:00 +00:00
Jonas Maebe
e04e668640 * give internalerror if trying to take the address of something else
than a LOC_REFERENCE or LOC_CREFERENCE

git-svn-id: trunk@5408 -
2006-11-16 20:23:55 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
3078a1927f * remove ttype
* rename old ttype variables *type to *def
  * rename resulttypepass to pass_typecheck
  * rename pass_2 to pass_generate_code

git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
daniel
068c0f7952 * Cleaner implementation of pointer index to open array, codegen changes
no longer necessary and therefore reverted.

git-svn-id: trunk@5037 -
2006-10-27 20:57:51 +00:00
daniel
2450f5a778 + First working concept of open_array_procedure(Pbyte_var[0..9]);
git-svn-id: trunk@5028 -
2006-10-26 20:30:16 +00:00
Jonas Maebe
25059eb03d * only potentially change size of vecn results in case of packed arrays
git-svn-id: trunk@4681 -
2006-09-22 09:24:42 +00:00
Jonas Maebe
6be389e954 * fixed bug in r4674
git-svn-id: trunk@4678 -
2006-09-21 20:34:18 +00:00
Jonas Maebe
cc6a91a9bc * fixed packed arrays of enums in case of packenum 2/4
git-svn-id: trunk@4674 -
2006-09-21 14:46:32 +00:00
Jonas Maebe
6997121c18 * also perform "SSA" for certain loads (currently derefn, righthand side of
assignmentn and callparan), reduces number of long lived conflicts.
    Mainly helpful on register-starved cpus such as i386.

git-svn-id: trunk@4606 -
2006-09-10 16:21:50 +00:00
Jonas Maebe
1f42ee201b + support for bitpacked records, except for:
* rtti
    * typed constants

git-svn-id: trunk@4489 -
2006-08-23 15:44:13 +00:00
Jonas Maebe
1ab3d81541 * also use LOC_CSUBSETREF
* set expectloc properly for packed arrays

git-svn-id: trunk@4480 -
2006-08-20 19:28:10 +00:00
florian
8102053adc * fixed compilation on 64 bit CPUs
git-svn-id: trunk@4464 -
2006-08-20 09:25:37 +00:00
Jonas Maebe
eccbc78e04 + support for bitpacked arrays:
+ use {$bitpacking on/+} to change the meaning of "packed"
      into "bitpacked" for arrays. This is the default for MacPas.
      You can also define individual arrays as "bitpacked", but
      this is not encouraged since this keyword is not known by
      other compilers and therefore makes your code unportable.
    + pack(unpackedarray,index,packedarray) to pack
      length(packedarray) elements starting at
      unpackedarray[index] into packedarray.
    + unpack(packedarray,unpackedarray,index) to unpack
      packedarray into unpackedarray, with the first
      element being stored at unpackedarray[index]
  * todo:
    * "open packed arrays" and rtti for packed arrays are not
      yet supported
    * gdb does not properly support bitpacked arrays

git-svn-id: trunk@4449 -
2006-08-19 12:54:12 +00:00
Jonas Maebe
c25aba7592 * cleaned up subsetreg support (put everything in a record)
* prepared support for elements with arbitrary bit length (as opposed
    to a multiple of 8)

git-svn-id: trunk@4324 -
2006-08-01 20:39:53 +00:00
Jonas Maebe
df973fa1de * fixed issue #6977 (add regvars occupied by the invisible high parameter
of "open array" and "array of const" parameters to the used regvars
    for their array accesses if range checking is turned on)

git-svn-id: trunk@3914 -
2006-06-21 18:24:01 +00:00
Jonas Maebe
84d1fc929f * properly set regvarability of parameters and local variables of inlined
functions
  * fixed setting of expectloc for fields of regvar'ed records

git-svn-id: trunk@3607 -
2006-05-20 23:37:55 +00:00
Jonas Maebe
e344ee3cd7 + support for register variables which contain records
git-svn-id: trunk@3580 -
2006-05-19 15:49:07 +00:00
florian
5e4ff16934 * access packed records with unaligned data accesses
git-svn-id: trunk@3365 -
2006-04-29 17:44:27 +00:00
peter
0ec2921bbe * split newasmsymbol to refasmsymbol and defineasmsymbol
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +00:00
Jonas Maebe
2e41b63710 * support subscripting record function results on ABI's that return
(some) records in registers (+ internalerror if unsupported
    record location). Fixes "make all" in top dir on darwin/x86.

git-svn-id: trunk@2973 -
2006-03-19 20:01:11 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
e668ef560a * fixed bug in r2738
git-svn-id: trunk@2743 -
2006-03-04 21:37:19 +00:00
Jonas Maebe
b063d47aa1 * fixed web bug #4872
git-svn-id: trunk@2738 -
2006-03-04 20:04:35 +00:00
Jonas Maebe
1b8baa3bce * set resultloc for interfacecom in subscriptn
git-svn-id: trunk@2537 -
2006-02-12 15:38:56 +00:00
Jonas Maebe
9f8753c6c0 * fixed web bug #4669 (usage of location.loc instead of expectloc)
git-svn-id: trunk@2236 -
2006-01-08 21:11:04 +00:00
Jonas Maebe
ea89d8a881 * don't move addresses in a LOC_CREGISTER to another register for
derefnodes

git-svn-id: trunk@2190 -
2006-01-05 20:46:20 +00:00
peter
95879fe8a7 * basic support for generic classes
git-svn-id: trunk@2020 -
2005-12-21 10:11:15 +00:00
peter
89297d2c39 * move all stabs ($ifdef gdb) code to dbgstabs
git-svn-id: trunk@1255 -
2005-10-02 11:17:05 +00:00
peter
2f0fdd1847 * cleaner fix for tb0496 (r1185)
git-svn-id: trunk@1196 -
2005-09-25 19:23:37 +00:00
peter
a3ab2053c9 * support multiple asmlabel types, renamed getlabel to
getjumplabel and added type para to getlabel for specific types
  * moved lineinfo generation from assemble and aggas to dbgstabs

git-svn-id: trunk@1120 -
2005-09-18 21:16:10 +00:00
peter
05a628447f * put typedconsts in own asmlist to prevent mixing
array and string data
  * added al_rodata
  * renamed tasmlist enum names to include al_ prefix

git-svn-id: trunk@899 -
2005-08-17 08:42:52 +00:00
florian
1f8d6aa678 * psizeint($1234)^ for generic cg fixed
git-svn-id: trunk@570 -
2005-07-03 15:08:04 +00:00
florian
355aaa69c8 + before calling a helper procedure, all register classes are now saved, this patch is subject to being merged back
git-svn-id: trunk@201 -
2005-06-05 08:12:33 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
florian
e33bf907d8 * fixed previous commit 2005-04-06 19:39:04 +00:00