Commit Graph

103 Commits

Author SHA1 Message Date
Jonas Maebe
931aef4daa * make result of not(constant) (with constant type <= sinttype)
equal to sinttype (Delphi-compatible, fixes #10966)
  * changed not(cardinal_constant) into sinttype on 64 bit
    platforms for consistency with other similar rules (and with
    the above change)

git-svn-id: trunk@10455 -
2008-03-07 16:33:15 +00:00
Jonas Maebe
0ae33aeab0 * the result of not(dword(ordconst)) has to be dword as well for Delphi
compatibility (and to avoid range errors like in mantis #10931)

git-svn-id: trunk@10451 -
2008-03-06 21:36:32 +00:00
Jonas Maebe
761f2e5c93 * fixed constant evaluation of not(byte/word/long/quadbool) + test
git-svn-id: trunk@10450 -
2008-03-06 20:29:27 +00:00
Jonas Maebe
db34ed44e4 * fixed an {$ifndef cpu64bitalu} which had to be {$ifndef cpu64bitaddr}
git-svn-id: trunk@10371 -
2008-02-20 20:08:03 +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
Jonas Maebe
8349cde7db * changed byte/word/longbool to be Delphi-compatible (+ similar changes
for qwordbool) + test:
    o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
    o these types are now all signed
    o converting an integer type to a byte/word/long/qwordbool using an
      explicit type cast keeps the integer's original value stored in the
      bool, instead of forcing it to ord(true)/ord(false)
    (mantis #10233 and #10613, implemented for all architectures, testsuite
     tested for ppc32, sparc and x86)
  * fixed some places where the rtl depended on longbool(true) having the
    value 1
  * extended several boolean tests (and adapted some to no longer assume
    that byte/word/long/qwordbool(true)=1)
  + support for converting to qwordbool in second_int_to_bool for x86, ppc
    and sparc

git-svn-id: trunk@9898 -
2008-01-24 21:30:55 +00:00
Jonas Maebe
67431891e0 * fixed resulttype of unaryminusn for qwords on 32 bit platforms (was
qword, now is int64)
  * simplified currency checking in unaryminusn pass_typecheck

git-svn-id: trunk@9524 -
2007-12-25 23:43:07 +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
cc0bd74ea0 - removed unused variable after div-by-zero simplify patch
git-svn-id: trunk@8359 -
2007-09-02 21:06:50 +00:00
Jonas Maebe
ac22ff09da * detect division by zero in tmoddiv.simplify (mantis #9499)
git-svn-id: trunk@8341 -
2007-08-30 17:21:29 +00:00
peter
8bd95f4dd4 * keep signess of orginal variable in shl/shr operation
git-svn-id: trunk@8143 -
2007-07-22 22:56:35 +00:00
Jonas Maebe
28bab3fb4f - removed some unused variables
* fixed some (harmless) ptrint warnings
  - removed some commented code in agppcmpw
  * added one missing field in a typed constant in cp1251

git-svn-id: trunk@8081 -
2007-07-17 13:57:15 +00:00
yury
afdd053172 * fixed unary minus in softfloat mode (bug #8737).
git-svn-id: trunk@8047 -
2007-07-14 10:09:37 +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
7bd8d0200e * handle mod/div between a cardinal/qword and a smaller unsigned variable
(byte, word, postive subrange) as an unsigned operation (mantis #8870)

git-svn-id: trunk@7334 -
2007-05-14 19:24:33 +00:00
tom_at_work
89257f94c6 * do not convert input of unaryminusnode to sint if the original is currency; fixes tfloattostr for 64 bit platforms which use int64 as currency type
git-svn-id: trunk@6110 -
2007-01-21 22:09:32 +00:00
Jonas Maebe
7f24462fcb * warn when doing not(uninitialised_variable)
git-svn-id: trunk@6000 -
2007-01-16 16:34:44 +00:00
yury
bcd86ef782 * added support for very big/small currency constants for non x86 CPUs.
git-svn-id: trunk@5937 -
2007-01-13 12:12:20 +00:00
florian
e3f37f98ae * correct handling of -<currency> on non x86 CPUs
git-svn-id: trunk@5896 -
2007-01-11 19:34:10 +00:00
Jonas Maebe
4ae9ac969a * implicitly call procvars in tp/delphi modes for divmodn, shlshrn
and notn (mantis 7200)

git-svn-id: trunk@5724 -
2006-12-27 14:29:23 +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
florian
67aa148602 * fixed softfpu support
+ softfpu enabled for arm-gba

git-svn-id: trunk@4939 -
2006-10-15 21:31:27 +00:00
florian
9e66674ff9 + first part of qwordbool implementation
git-svn-id: trunk@4462 -
2006-08-19 23:16:17 +00:00
Jonas Maebe
d75b19e484 * removed/conditionalised several unused variables
git-svn-id: trunk@4194 -
2006-07-14 19:44:54 +00:00
florian
6387c36346 * fixed make cycle
git-svn-id: trunk@3871 -
2006-06-15 16:46:07 +00:00
Jonas Maebe
5fa53a1a8c * optimize away "x mod 1" and "x div 1" + test (ppc code generator handled
"div 1" wrongly)

git-svn-id: trunk@3868 -
2006-06-15 15:53:43 +00:00
florian
281d6907d2 * fixed overloading of div operator
git-svn-id: trunk@3513 -
2006-05-13 21:37:54 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
42ec76598c * new categories for vs_*: vs_declared, vs_initialised, vs_read,
vs_written, vs_readwritten. vs_initialised is the old vs_assigned;
    vs_used has been replaced by vs_read, vs_written and vs_readwritten
  * the valid_for_*() routines in htypechk now get an extra parameter to
    decide whether or not errors should be reported

git-svn-id: trunk@1913 -
2005-12-10 16:51:26 +00:00
florian
a53c9e2666 * fixed stupid copy/paste which turned softfloat always off
* fixed wince softfloat compiler proc. to be correctly named also when used outside the system unit

git-svn-id: trunk@966 -
2005-08-28 21:08:23 +00:00
florian
adb193497d + softfloat support for wince
* more units are build for wince

git-svn-id: trunk@959 -
2005-08-28 12:40:43 +00:00
florian
e920b10d7a + nmat refactored to have simplify
git-svn-id: trunk@142 -
2005-05-29 16:00:51 +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
peter
3f9d6ab32f * add hint when passing an uninitialized variable to a var parameter 2005-03-25 22:20:18 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
peter
07c67967cf * fixed div qword 2004-05-28 21:14:34 +00:00
peter
c25228226d * don't change sign for unsigned shl/shr operations
* cleanup for u32bit
2004-05-19 23:29:25 +00:00
peter
e661df03ee * fixes to previous constant integer commit 2004-03-29 14:44:10 +00:00
peter
e46cdcea48 * constants ordinals now always have a type assigned
* integer constants have the smallest type, unsigned prefered over
    signed
2004-03-23 22:34:49 +00:00
peter
05e0d83348 * operator overload chooses rewrite
* overload choosing is now generic and moved to htypechk
2004-02-24 16:12:39 +00:00
daniel
d735071838 * Rtti generation moved to ncgutil
* Assmtai usage of symsym removed
  * operator overloading cleanup up
2004-02-04 22:15:15 +00:00
peter
8012731ede *** empty log message *** 2004-02-04 19:22:27 +00:00
peter
ecfbbeffc3 * renamed xNNbittype to xNNinttype
* renamed registers32 to registersint
  * replace some s32bit,u32bit with torddef([su]inttype).def.typ
2004-02-03 22:32:53 +00:00
florian
d7786f6246 * fixed generic shl/shr operations
+ added register allocation hook calls for arm specific operand types:
    register set and shifter op
2004-01-23 15:12:49 +00:00
Jonas Maebe
e9eff10134 + support for evaluating qword constant expressions (both arguments have
to be a qword, constants have to be explicitly typecasted to qword)
2003-12-09 21:17:04 +00:00