Commit Graph

89 Commits

Author SHA1 Message Date
Yuriy Sydorov
b78761efd3 * Removed obsolete OLDREGVARS ifdefs. 2021-11-02 17:08:08 +02:00
florian
637976e83f * patch by Marģers to unify internal error numbers, resolves #37888
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
Jonas Maebe
ce598c15ec * factored out the conditions under which add nodes need to perform
overflow checks
   o in particular ensure that cpu-specific overrides don't perform overflow
     checks when nf_internal is set

git-svn-id: trunk@42573 -
2019-08-03 12:19:50 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
pierre
89c1b68b14 * Delete regvars unit.
This unit was empty unless OLDREGVARS macro was set,
    but this does not compile and no change has been made since 2011.

  * Remove regvars from all _USES clauses.

git-svn-id: trunk@34808 -
2016-11-06 14:01:39 +00:00
Jonas Maebe
1850cb4ccc * don't look at the resultdef, but at the defs of the operands to decide
whether a multiplication needs to be signed or unsigned (can be different
    in case of a 32x32->64 multiplication) (mantis #30035)

git-svn-id: trunk@33539 -
2016-04-20 22:17:15 +00:00
Jonas Maebe
0fc1fd6ac1 * replaced current_procinfo.currtrue/falselabel with storing the true/false
labels of LOC_JUMP in the node's location. This generates some extra jumps
    for short circuit boolean and/or-expressions if optimizations are off, but
    with optimisations enabled the generated code is the same (except for JVM
    because the jump threading optimisation isn't enabled there yet).

git-svn-id: trunk@31431 -
2015-08-27 18:28:57 +00:00
Károly Balogh
6122db7d40 * fix warnings when compiling the compiler with DFA optimizer enabled on PowerPC
git-svn-id: trunk@28501 -
2014-08-20 14:31:36 +00:00
Jonas Maebe
edd42aa42a * moved subsetref/reg and bit_set/test support from cgobj to hlcgobj for
future use by high level code generator targets
   o this in turn required that all a_load*_loc* methods are called via
     hlcg rather than via cg, since a location can be a subsetref/reg and
     and those are no longer handled in tcg
   o that then required moving several force_location_* routines into
     thlcg because they use a_load_loc*, but did not take tdef size
     parameters (which are required by the thlcg a_load_loc* routines)
   o the only practical consequence is that from now on, you have to
     use hlcg.location_force_mem/reg() (fpureg not yet) and
     hlcg.gen_load_loc_cgpara() instead of the removed versions from ncgutil,
     and hlcg.a_load*loc*() instead of cg.a_load*loc* if a subsetref/reg
     might be involved

git-svn-id: trunk@21287 -
2012-05-13 12:33:10 +00:00
Jonas Maebe
3fc1a274c8 - removed ifdefed/inactive "ti386addnode.second_addmmx" from ppc code
generator

git-svn-id: trunk@21049 -
2012-04-25 20:28:14 +00:00
Jonas Maebe
a23630260b + "weakexternal" support for imported procedures and variables.
the syntax is exactly the same as for "external", except for
    the keyword. It is currently only active for Darwin targets.
    It should also work at least for Linux targets, but only with
    the GNU assembler (which is why it is not activated there)
  + test for this functionality

git-svn-id: trunk@12009 -
2008-11-01 18:38:32 +00:00
peter
8f239d04b6 * cleanup and simplify the set type handling
git-svn-id: trunk@10432 -
2008-03-02 17:48:27 +00:00
florian
efb025310d * tried to restore old set behaviour for big endian targets
git-svn-id: trunk@6702 -
2007-03-03 17:52:55 +00:00
Jonas Maebe
d0b6292137 * disable overflow checking when performing pointer arithmetic
(mantis 8049)

git-svn-id: trunk@5822 -
2007-01-05 21:52:31 +00:00
Jonas Maebe
1d96dcc50d * renamed nf_swaped to nf_swapped
git-svn-id: trunk@5818 -
2007-01-05 12:47:22 +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
Jonas Maebe
9e825bdc76 * moved common code for ppc32/ppc64 from nppcadd to shared unit
git-svn-id: trunk@4930 -
2006-10-15 15:43:29 +00:00
Jonas Maebe
e9c5049275 * use single precision fpu ops in case of single precision operands
git-svn-id: trunk@4784 -
2006-10-04 15:26:10 +00:00
Jonas Maebe
c261068ab5 * use generic second_addboolean for short circuit and/or (since that code
is the same as what was in nppcadd)

git-svn-id: trunk@4600 -
2006-09-10 15:14:03 +00:00
Jonas Maebe
03302dc7c4 * fixed support for macpas & and | operators: they only work on booleans
now, and always perform short circuit boolean evaluation (also in {$b+})

git-svn-id: trunk@3745 -
2006-05-30 13:02:36 +00:00
Jonas Maebe
a20f211811 * don't try to reuse registers from left/right, impedes optimal register
allocation

git-svn-id: trunk@3669 -
2006-05-25 11:31:32 +00:00
Jonas Maebe
a3cb1b1523 + support for "exotic" locations in load_left_right()
git-svn-id: trunk@3556 -
2006-05-17 19:12:00 +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
Jonas Maebe
07ce826be0 + added ability for (mainly 32bit) code generators to directly handle
32bit*32bit->64bit          
  + implemented the above for ppc32 (note: does not happen very often
    in practice, at least not in the compiler and rtl)       
  + test for the above

git-svn-id: trunk@2735 -
2006-03-04 15:09:09 +00:00
Jonas Maebe
8f6b52d482 * don't set high register of 64 bit result for comparisons in case
one of the operands is a constant (missing begin/end after "if")

git-svn-id: trunk@2733 -
2006-03-04 14:14:39 +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
Jonas Maebe
d27fa6d0b3 * fixed another missing swapleftright for subn
git-svn-id: trunk@557 -
2005-07-02 12:22:04 +00:00
Jonas Maebe
2b4d3312f7 * fixed web bug #4058 (missing swapleftright for subtraction if overflow
checking is turned on)

git-svn-id: trunk@327 -
2005-06-09 20:17:40 +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
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
22d9294ab3 + overflow checking for the arm 2005-02-13 18:55:19 +00:00
Jonas Maebe
067c588089 - removed unused variables 2004-12-24 11:58:33 +00:00
Jonas Maebe
26ab4ead33 * fixed intermittent bug in overflow checking of subtractions 2004-11-26 12:30:47 +00:00
Jonas Maebe
fff0683902 * fixed overflow checking of unsigned multiplications 2004-11-26 12:17:04 +00:00
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
Jonas Maebe
e737e39888 * fixed bugs due to change of the value field of tlocation from aword to
aint
2004-10-26 18:22:31 +00:00
peter
d19663f3a8 * save standard registers moved to tcgobj 2004-10-25 15:36:47 +00:00
peter
65c3ba277c * ungetregister is now only used for cpuregisters, renamed to
ungetcpuregister
  * renamed (get|unget)explicitregister(s) to ..cpuregister
  * removed location-release/reference_release
2004-09-25 14:23:54 +00:00
Jonas Maebe
c2210f01b9 * only specially handle 64bit operations on ordinals 2004-08-30 09:28:40 +00:00
Jonas Maebe
50dfc8f5a7 * do a resulttypepass of left in the overloaded pass_1 before checking
its resulttype
2004-07-21 15:09:10 +00:00
Jonas Maebe
6dc5cfdb8d - removed useless maybe_pushfpu code for ppc 2004-07-17 14:47:16 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
peter
54cb433625 * powerpc compiles again 2004-06-17 16:55:46 +00:00
peter
6b96b70118 * fixed operator overload allowing for pointer-string
* replaced some type_e_mismatch with more informational messages
2004-03-18 16:19:03 +00:00
peter
b4159755d2 * fixed too long ie number 2004-01-06 21:37:41 +00:00
Jonas Maebe
da6a3d28c8 * hopefully fixed tb0454 2003-12-29 11:35:19 +00:00
Jonas Maebe
8c11916462 * forgot call to cg.g_overflowcheck() in nppcadd
* fixed overflow flag definition
  * fixed cg.g_overflowcheck() for signed numbers (jump over call to
    FPC_OVERFLOW if *no* overflow instead of if overflow :)
2003-12-09 20:39:43 +00:00