are used for parameter passing as it is might happen on avr, resolves#36079
git-svn-id: trunk@43390 -
(cherry picked from commit fabe4cc067)
# Conflicts:
# .gitattributes
checks for fpu exceptions for arm and aarch64.
------------------------------------------------------------------------
r42525 | florian | 2019-07-28 21:06:36 +0000 (Sun, 28 Jul 2019) | 2 lines
+ software handling of exceptions on arm
* reworked software handling of exceptions so they can be check lazily
------------------------------------------------------------------------
--- Merging r42525 into '.':
U compiler/arm/cgcpu.pas
U compiler/arm/narmadd.pas
U compiler/arm/narminl.pas
U compiler/arm/narmmat.pas
U compiler/ncgcal.pas
U compiler/procinfo.pas
U rtl/arm/arm.inc
--- Recording mergeinfo for merge of r42525 into '.':
U .
Summary of conflicts:
Tree conflicts: 1
------------------------------------------------------------------------
r42891 | florian | 2019-09-01 17:26:11 +0000 (Sun, 01 Sep 2019) | 1 line
+ support for software floating point exception handling on AArch64 (-CE)
------------------------------------------------------------------------
--- Merging r42891 into '.':
U compiler/aarch64/cgcpu.pas
U compiler/aarch64/ncpuadd.pas
U compiler/aarch64/ncpuinl.pas
U compiler/aarch64/ncpumat.pas
U rtl/aarch64/aarch64.inc
U rtl/aarch64/math.inc
U rtl/aarch64/mathu.inc
--- Recording mergeinfo for merge of r42891 into '.':
G .
git-svn-id: branches/fixes_3_2@46225 -
U compiler/i386/cpupi.pas
U compiler/ncgcal.pas
U compiler/ncgutil.pas
U compiler/systems/i_bsd.pas
U compiler/systems/i_linux.pas
U compiler/systems.inc
git-svn-id: branches/fixes_3_2@43683 -
G .
-- Aufzeichnung der Informationen für Zusammenführung von r43006 in ».«:
G .
-- Aufzeichnung der Informationen für Zusammenführung von r43007 in ».«:
G .
-- Aufzeichnung der Informationen für Zusammenführung von r43008 in ».«:
G .
-- Zusammenführen von r43000 in ».«:
U compiler/pp.pas
-- Aufzeichnung der Informationen für Zusammenführung von r43000 in ».«:
G .
-- Zusammenführen von r43011 in ».«:
U rtl/inc/system.inc
-- Aufzeichnung der Informationen für Zusammenführung von r43011 in ».«:
G .
-- Zusammenführen von r43012 in ».«:
U rtl/i386/i386.inc
-- Aufzeichnung der Informationen für Zusammenführung von r43012 in ».«:
G .
-- Zusammenführen von r43013 in ».«:
U rtl/linux/i386/si_c21.inc
-- Aufzeichnung der Informationen für Zusammenführung von r43013 in ».«:
G .
-- Zusammenführen von r43014 in ».«:
U compiler/systems/i_linux.pas
-- Aufzeichnung der Informationen für Zusammenführung von r43014 in ».«:
G .
-- Zusammenführen von r43176 in ».«:
U compiler/i386/cpupi.pas
U compiler/i386/n386cal.pas
U compiler/ncgcal.pas
U compiler/ncgutil.pas
G compiler/systems/i_linux.pas
U compiler/systems.inc
C compiler/systems.pas
G tests/webtbs/tw7808.pp
-- Aufzeichnung der Informationen für Zusammenführung von r43176 in ».«:
G .
Konfliktübersicht:
Textkonflikte: 1
Konfliktübersicht:
Textkonflikte: 1
git-svn-id: branches/fixes_3_2@43434 -
so that they can still be freed after the reference has been changed
(e.g. in case of array indexing or record field accesses) (mantis #33628)
git-svn-id: trunk@38814 -
o separate information for reading and writing, because e.g. in a
try-block, only the writes to local variables and parameters are
volatile (they have to be committed immediately in case the next
instruction causes an exception)
o for now, only references to absolute memory addresses are marked
as volatile
o the volatily information is (should be) properly maintained throughout
all code generators for all archictures with this patch
o no optimizers or other compiler infrastructure uses the volatility
information yet
o this functionality is not (yet) exposed at the language level, it
is only for internal code generator use right now
git-svn-id: trunk@34996 -
in ncnv
* handle the fact that we overwrite the open array resultdef of a parameters'
left node with the original resultdef (i.e., also for dynamic arrays) with
regards to LLVM type rules
o use the parameter's formal type (open array) instead of the value's type
(dynamic array) when loading/using its value, since that's the type the
value has been converted to
o this change is not really nice since it adds several independent checks in
different places, but I can't find a way to nicely unify the code to work
around this (nor one to get rid of that hack in the first place)
git-svn-id: trunk@34515 -
tasmdata.DefineAsmSymbol() and all routines that call it
o will be used to automatically generate AB_INDIRECT sybols when
necessary
git-svn-id: trunk@34164 -
o made the method non-virtual, as there is no reason to override it
anymore (it was virtual to be able to override it with a typesafe
LLVM-specific version)
git-svn-id: trunk@32597 -
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 -
that don't use a fixed stack (mantis #28454)
o moved the code to finalise managed out parameters from ncgcal to ncal,
and add it to the init code of the call node (so it's evaluated before
any parameters are processed, ensuring that mantis #28390 stays fixed)
git-svn-id: trunk@31328 -
type-safe way (for LLVM, and also internal consistency checking between
the VMT as generated in nobj.pas and ncgvmt.pas)
o also converted the VMT validity checking to the node level
git-svn-id: trunk@30950 -
* generate code to load the TOC register if it's required, and
emit the the ".localentry" directive to indicate to the linker
where the actual function body starts
* support the ".localentry" directive in the ppc64 assembler reader
o disable the fpc_qword_to_double() assembler implementation for
ELFv2, because we can't manually insert the .localentry directive
before the stack allocation code
* perform indirect calls on ppc64 via R12 in ncgcal, as R12 needs to
contain the function address on entry on ppc64/ELFv2 (and it's
a volatile register, so there's no problem with always using
it)
git-svn-id: trunk@30198 -
* tcgcallnode.pass_generate_code: call reorder_parameters also for procedure variable case, as it is done in two other control branches.
git-svn-id: trunk@28959 -
location_force_reg when generating code for a call to a virtual class method,
called through a class reference var. This bug went unnoticed so far, because
on all platforms, except i8086 medium and compact memory models, the size of
a vmt pointer is the same as the size of a procvar. Even in the i8086 medium
and compact memory models, the previous code would generate correct code,
because thlcg2ll.a_load_loc_reg uses loc.size (which was correct) in the case
when fromsize=tosize (both of which were wrong, but equal), due to the check
in hlcg2ll.pas:555. Thanks to Jonas for finding this bug!
git-svn-id: trunk@28512 -
o blocks are implemented as a variation of procedure variables
o declaration of a block variable: "test: procedure(c: char) is block;"
(C equivalent: (void)(^test)(char c) )
o the compiler automatically converts procedures/functions whose address
is passed to a block parameter or assigned to a block variable into
a "block". This consists of
1) generating a block descriptor (containing the size of the "block
literal" (see below) and the signature of the invocation function
encoded as an Objective-C selector)
2) generating a wrapper function around the original funcion (with C
calling convention), that has an extra first hidden parameter
(marked as vo_is_parentfp in the compiler) whose type is a pointer
to the describing "block literal"
3) generating the "block literal", which contains a pointer to an
external variable indicating whether this block captures context or
not, some flags (see compiler/blockutl.get_block_literal_flags for
info), a pointer to the wrapper function and a pointer to the
descriptor. In the future, it will also contain captured variables.
o right now, only global procedures/functions can be converted to blocks
(because they don't require state capturing). The next steps are (Object
Pascal) methods (not Objective-C methods, because Objective-C method
procvars don't exist) and finally nested functions
o on Mac OS X, the functionality will only work on Mac OS X 10.7 and later,
because we have to use the so-called "ABI.2010.3.16" to ensure that
our blocks aren't called as variadic functions by the runtime (which
came out after the Mac OS X 10.6 release)
o while the currently implemented functionality does not require any
library support at all, there's no use enabling it on other platforms
because unless it has been confirmed to work with a blocks runtime,
there's no point in using blocks (they're just somewhat bulky procvars
right now). Enabling it on other platforms (in combination with the
GNUStep Objective-C run time), should simply be a matter of adding
the right {$linklib xxx} statement to rtl/inc/blockrtl.pp file, adding
that file to Makefile.fpc for that platform and adding that platform
to the compiler/systems.systems_blocks_supported set
git-svn-id: branches/blocks@28232 -
so it doesn't truncate mangled names for the JVM target (it's
used there since r27149)
o adapted a number of WPO helpers to use tsymstr instead of
shortstring, but the WPO devirtualization functionality is
still limited to shortstrings internally
git-svn-id: trunk@27741 -