handle LOC_(C)SUBSETREF/REG. The optimisation itself has been fixed
in trunk (r45301-r45305), the changes are too invasive to merge to
fixes_3_2 at this time (mantis #37018)
git-svn-id: branches/fixes_3_2@45317 -
------------------------------------------------------------------------
r39916 | yury | 2018-10-12 14:43:17 +0000 (Fri, 12 Oct 2018) | 1 line
* Fixed checks for exceeding limit of locals space. Prevent range and overflow errors during the checks. Introduced the MaxLocalsSize constant which provides the maximum possible size of locals space (stack frame) depending of bitness of a cpu.
------------------------------------------------------------------------
--- Merging r39916 into '.':
U compiler/tgobj.pas
U compiler/globtype.pas
--- Recording mergeinfo for merge of r39916 into '.':
U .
------------------------------------------------------------------------
r39925 | pierre | 2018-10-13 12:00:31 +0000 (Sat, 13 Oct 2018) | 1 line
Set MaxLocalsSize according to address size not register size
------------------------------------------------------------------------
--- Merging r39925 into '.':
G compiler/globtype.pas
--- Recording mergeinfo for merge of r39925 into '.':
G .
------------------------------------------------------------------------
r39963 | yury | 2018-10-17 19:12:27 +0000 (Wed, 17 Oct 2018) | 1 line
* Fixed range check errors.
------------------------------------------------------------------------
--- Merging r39963 into '.':
G compiler/tgobj.pas
--- Recording mergeinfo for merge of r39963 into '.':
G .
git-svn-id: branches/fixes_3_2@40834 -
information in OMF LINNUM records, in addition to the DWARF debug information.
This enables source level debugging on i8086-msdos, when using the Open Watcom
Debugger, provided the source was compiled with this option and the external
linker (wlink) was used for generating the executable (the internal linker
does not yet support generating debug information).
git-svn-id: trunk@39014 -
ad hoc set constants containing varying number cdecl-like calling
conventions
o added pocall_sysv_abi_cdecl and pocall_ms_abi_cdecl to cstylearrayofconst
o also allow C-style blocks with mwpascal instead of cdecl (mwpascal = cdecl
with "const" = "constref" for record parameters)
o did not touch cases related to name mangling and import/export names,
because those are a real mess and easily break things left and right :/
git-svn-id: trunk@35479 -
sysv_abi_cdecl calling conventions on x86-64 to force using the SYSV/
Microsoft ABI on platforms that don't use it by default (mainly to ease
porting pure assembler routines)
git-svn-id: trunk@35425 -
Note 1: using an older AS might fail anyway if the amount of sections is too high (like in packages\odata\src\sharepoint.pp)
Note 2: it might be an idea to keep track of the created sections in the asmlists and only enable the option if *really* necessary (like with the internal COFF output generator), though this might lead to false positives due to multiple sections with the same name (since I'd prefer to use the KISS principle only a counter would be used)
git-svn-id: trunk@35381 -
Use new cs_checkpointer_called moduleswitches set element.
Use new uf_checkpointer_called PPU flag (reusing obsolete uf_local_browser flag value)
Emit warning if compiled library/program has any code using checkpointer.
* ppu.pas: New constant: uf_checkpointer_called
* globtype.pas: New constant: cs_checkpointer_called
* fppu.pas: Set uf_checkpointer_called flag if cs_checkpointer_called is set in current_settings.module_switches
* i8086/n8086mem.pas: Include cs_checkpointer_called in current_settings.moduleswitches
* ncgmem.pas: Likewise.
* msg/errore.msg: Add new message saying that -gc and -Ur options are incompatible
Add description to -gc option, saying it is experimental.
Add warning at link time for program/library if checkpointer is used in any unit or main code.
* options.pas: if -gc and -Ur options are used, never enable checkpointer code,
instead output a warning that release is incompatible with -gc option.
* pmodules.pas: proc_program: Check all modules for uf_checkpointer_called flag,
emit a warning if checkpointer is used.
* utils/ppuutils/ppudump.pp: Add code for uf_codepointer_called option.
git-svn-id: trunk@34567 -
globtype.pas:
+ tlocalswitch: extend by cs_imported_data
globals.pas:
* default_settings: cs_imported_data is set by default (Delphi compatible)
switches.pas:
* turboSwitchTable: G is used for cs_imported_data
scandir.pas:
+ new directive handler dir_importeddata
* InitScannerDirectives: handle IMPORTEDDATA with dir_importeddata
git-svn-id: trunk@33281 -
* fixed for MorphOS, added for Amiga/m68k
* enabled as default when running natively on these systems (cross still defaults to GNU LD)
* added -XV command line switch to enable/disable it
* dropped the 'fpc' prefix from vlink binary name on MorphOS
git-svn-id: trunk@32324 -
actually export them from the .exe or .dll, but they can now be used as
callbacks)
+ support win16 smart callbacks via the $K switch
git-svn-id: trunk@31835 -
when {$modeswitch systemcodepage} gets disabled without having been
enabled first (such as when initially setting the syntax mode)
(mantis #28718)
git-svn-id: trunk@31831 -
how the fpc sections have to be linked *on Linux*. This prevents the
"did you forget -T" warnings from ld, and in general is more correct than
our previous approach of specifying a complete linker script without -T
and hoping that there won't be any unexpected interactions with ld's
built-in linker script (fixed version of r31664, thanks to Alan Modra)
o use the new -X9 command line option to generate linker scripts that
are compatible with binutils older than 2.19 (reverts to the old
behaviour)
git-svn-id: trunk@31675 -
how the fpc sections have to be linked *on Linux*. This prevents the
"did you forget -T" warnings from ld, and in general is more correct than
our previous approach of specifying a complete linker script without -T
and hoping that there won't be any unexpected interactions with ld's
built-in linker script
o use the new -X9 command line option to generate linker scripts that
are compatible with binutils older than 2.19 (reverts to the old
behaviour)
git-svn-id: trunk@31664 -
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 -
cs_hugeptr_arithmetic_normalization local setting
+ added the cs_hugeptr_comparison_normalization local setting and corresponding
directive {$HUGEPOINTERCOMPARISONNORMALIZATION} to set it
* the {HUGEPOINTERNORMALIZATION} changed to set both of the huge pointer
normalization settings, according to the specified compiler type ('BORLANDC',
'MICROSOFTC' or 'WATCOMC')
git-svn-id: trunk@28151 -
memory models. Enabled by the new directive {$hugecode on}. The directive is
ignored in the near code memory models. When enabled, it forces each procedure
to be in a separate segment and disables mixing near and far procedures (so
'near' and {$F-} are ignored in this mode). Note that {$hugecode on} does not
count as a different memory model, because you can freely link modules (units)
compiled with {$hugecode on} and {$hugecode off}.
git-svn-id: trunk@27615 -