Commit Graph

71 Commits

Author SHA1 Message Date
florian
ae8d2dc69a * omit first not, helps the reg. allocator to find a workable colouring, resolves #36611
git-svn-id: trunk@44005 -
2020-01-20 21:13:34 +00:00
florian
3b1903b430 * simplified fpc_mul_qword so it compiles again on avr, fixes #36236 but does not solve the root of the problem
git-svn-id: trunk@43342 -
2019-10-31 21:02:23 +00:00
florian
f92b8d1681 * changes shift parameter of shift helpers into ALUUInt, as there is an "and" used anyways, this does not change semantics but reduces register pressure on 8 bit targets
git-svn-id: trunk@42200 -
2019-06-09 21:44:18 +00:00
florian
71e71ad267 * fix currency division on non x86 32 bit targets
* disable fix for #33439 during bootstrapping with 3.0.x, as 3.0.x cannot compile the currency division without the fix above

git-svn-id: trunk@38558 -
2018-03-17 22:44:44 +00:00
nickysn
b14f277e8f + use rtl helpers for 64-bit shl/shr/sar/rol/ror modify in place operations, on
platforms that don't have native 64-bit implementation of the corresponding
  64-bit shift/rotate operation

git-svn-id: trunk@35787 -
2017-04-13 15:24:32 +00:00
florian
7213a13081 * split fpc_mul_<64 bit> into separate procedures with and without overflow checking
git-svn-id: trunk@35454 -
2017-02-19 19:15:14 +00:00
florian
590ec0f3e6 * more procedures excluded to avoid internalerrors on avr after the trgobj.conservative fix
git-svn-id: trunk@31440 -
2015-08-28 18:49:07 +00:00
florian
886e3e8d02 * disable several complex procedures for avr with a newly introduced define: EXCLUDE_COMPLEX_PROCS. They
might compile with an improved register allocator in the future

git-svn-id: trunk@30546 -
2015-04-11 14:43:39 +00:00
masta
66aca1b104 Optimize generic 64-bit division code
FPC_{DIV,MOD}_QWORD now check if both inputs have their upper 32bit set
to zero and in that case use 32-bit division instead, which many
plattforms can either do in hardware or have optimized assembly code
for.

git-svn-id: trunk@28279 -
2014-07-30 17:07:29 +00:00
nickysn
34cf432600 * in the generic implementation of fpc_mul_int64, fallback directly to
fpc_mul_qword directly in case overflow checking is not used

git-svn-id: trunk@26483 -
2014-01-17 01:25:41 +00:00
nickysn
c2ba9ebfe5 + added different mul helpers for the 32 to 64-bit muls, since they can usually
be implemented more efficiently than the 64 to 64-bit ones.

git-svn-id: trunk@26386 -
2014-01-05 03:01:18 +00:00
florian
be3749301f * fix possible issues due to new behaviour of constant shifting
git-svn-id: trunk@26310 -
2013-12-29 12:21:25 +00:00
sergei
b99cf8d680 * RTL: Changed 'shift' parameter of 64-bit shift helpers to CPU-native size, it doesn't have to be 64-bit because only its lower 6 bits are used. Not using 64 bit parameter improves code quality a bit.
git-svn-id: trunk@25478 -
2013-09-13 08:32:45 +00:00
sergei
5d5d226487 * Applied a counterpart of r22318 to 64-bit mod/div routines.
git-svn-id: trunk@23643 -
2013-02-21 19:37:31 +00:00
pierre
a311c53167 Replace HandleErrorFrame calls by HandleErrorAddrFrameInd where possible in common code (to allow correct backtrace for mips cpu)
git-svn-id: trunk@21900 -
2012-07-12 11:53:59 +00:00
Jonas Maebe
2722b5b381 * fixed overflow checking for $8000000000000000 in generic int64 mul
routine (constants >high(int64) are currently always interpreted as
    int64 (and thus < 0) by the compiler if there is no explicit typecast)

git-svn-id: trunk@10412 -
2008-03-01 19:38:19 +00:00
Jonas Maebe
bd27a09918 * changed record typecast into shift to avoid q3 becoming not
regable in FPC_MUL_INT64

git-svn-id: trunk@3183 -
2006-04-09 18:21:35 +00:00
michael
93ba0409be + Removed HASCOMPILERPROC define
git-svn-id: trunk@265 -
2005-06-07 21:41:02 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
michael
ffb55c4254 + Removed VER1_0 defines
git-svn-id: trunk@33 -
2005-05-19 21:14:45 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
f77e8ab5a6 * fixed overflow checking for qword 2004-09-26 07:37:49 +00:00
florian
62f8ed92dc * tried to fix overflow checking in qword multiplication 2004-09-26 07:15:34 +00:00
peter
71611dd39d * shr/shl use and 63 for the shift value 2004-05-23 14:09:43 +00:00
peter
cafed35e77 * str() helpers now also use valint/valuint
* int64/qword helpers disabled for cpu64
2004-04-29 18:59:43 +00:00
florian
d18f952c09 * prt0.as exit code handling fixed
* int64 mod int64 for negative numbers fixed
2004-04-24 17:14:09 +00:00
florian
8171ad2e10 + implemented software shl/shr for 64 bit ints 2004-01-23 15:14:04 +00:00
peter
abbc3fa755 * moved int64 asm code to int64p.inc
* save ebx,esi
2003-09-14 11:34:13 +00:00
florian
8d771df2d4 * arm fixes to the common rtl code
* some generic math code fixed
  * ...
2003-09-03 14:09:37 +00:00
florian
b5838be7e0 * fixed my commit, strange, it didn't give any conflicts with Jonas patch 2003-05-12 11:17:55 +00:00
florian
2254dc3e82 * qword division fixed (MSB/LSB problem) 2003-05-12 11:16:21 +00:00
Jonas Maebe
eb9d6d7134 * fixed for big endian systems (since Florian doesn't seem to want to
commit this fix :)
2003-05-12 07:19:04 +00:00
carl
4b11cd11cd - remove FPUInt64 variable 2002-09-07 21:21:42 +00:00
peter
01dfac4a4e * old logs removed and tabs fixed 2002-09-07 15:06:34 +00:00
peter
c003f63790 * renamed conditional to insert optimized mod_qword for i386. The
code is broken
2002-09-01 14:44:01 +00:00
peter
71a1ae2136 * sLineBreak changed to normal constant like Kylix 2002-07-01 16:29:05 +00:00
florian
a931861ce1 * qword div qword for i386 improved 2001-11-15 00:07:42 +00:00
Jonas Maebe
a39cd8a580 * made multiplying, dividing and mod'ing of int64 and qword processor
independent with compilerprocs (+ small optimizations by using shift/and
    where possible)
2001-09-05 15:22:09 +00:00
Jonas Maebe
4716f168dd * renamed some str(x,y) and val(x,y) helpers so the naming scheme is the
same for all string types
  + added the str(x,y) and val(x,y,z) helpers for int64/qword to
    compproc.inc
2001-08-13 12:40:16 +00:00
peter
802acf6940 * m68k updates 2001-04-23 18:25:44 +00:00
peter
e150c46c78 * remove warnings 2001-04-13 22:26:32 +00:00
Jonas Maebe
bf5d803a93 * fixed qword_str for values with bit 63 = 1 2001-03-03 12:39:09 +00:00
florian
5e9dbab759 * val for int64 hopefully works now correct 2000-12-10 15:00:14 +00:00
florian
bd0d141b08 * val for dword and qword didn't handle the max values
correctly
  * val for qword works again
  + val with int64/qword and ansistring implemented
2000-12-09 20:52:40 +00:00
Jonas Maebe
c91a23c27d * new constant handling: from now on, hex constants >$7fffffff are
parsed as unsigned constants (otherwise, $80000000 got sign extended
    and became $ffffffff80000000), all constants in the longint range
    become longints, all constants >$7fffffff and <=cardinal($ffffffff)
    are cardinals and the rest are int64's.
  * added lots of longint typecast to prevent range check errors in the
    compiler and rtl
  * type casts of symbolic ordinal constants are now preserved
  * fixed bug where the original resulttype wasn't restored correctly
    after doing a 64bit rangecheck
2000-12-07 17:19:42 +00:00
Jonas Maebe
0d5167e124 * fixed bug for val when processing -2147483648 and low(int64) (merged) 2000-11-17 17:01:23 +00:00
Jonas Maebe
afec990176 * fixed web bug1069
* fixed similar (and other) problems in val() for int64 and qword
    (both merged from fixes branch)
2000-07-28 12:29:49 +00:00
michael
650fbb86aa + removed logs 2000-07-13 11:32:24 +00:00