- PE_FILE_RELOCS_STRIPPED flag is meaningless for object files.
- Don't write PE_FILE_BYTES_REVERSED_LO as well, it is deprecated and GNU tools don't write it either.
- Don't set PE_FILE_32_BIT_MACHINE flag in x86_64 object files.
git-svn-id: trunk@21710 -
* Also simplified COFF symbol loading, separate array of symbol sizes is not needed because these sizes never change during the load.
git-svn-id: trunk@21704 -
get_caller_frame, get_caller_addr and dump_stack
with default NIL value to systemh.inc.
+ Added new get_addr function.
system.inc: Use get_addr and get_frame to call
HandleErrorAddrFrame instead of HandleErrorFrame
in several error functions.
Modify dump_stack to use frame and addr parameters.
Provide a dummy get_addr function returning nil.
i386/i386.inc, x86_64./x86_64.inc: Provide real
implementation of get_addr function.
git-svn-id: trunk@21697 -
getintparaloc + adapted all call sites of getintparaloc. This
led to a number of additional, related changes:
o corrected the type information for some getintparaloc parameters
o don't allocate some intparalocs in cases they aren't used
o changed "const tvardata" parameter into "constref tvardata" for
fpc_variant_copy_overwrite to make pass-by-reference semantics
explicit
o moved a number of routines that now have to call find_system_type()
from cgobj to hlcgobj so that cgobj doesn't have to start depending
on the symtable unit
o added versions of the cpureg alloc/dealloc methods to hlcgobj that
call through to their cgobj counter parts, so we can call save/restore
the cpu registers before/after calling system helpers from hlcgobj
(not implemented in hlcgobj itself, because all basic register
allocator functionality is still part of cgobj/cgcpu)
git-svn-id: trunk@21696 -
* set tcgpara.def for the function return location (field introduced for and
already used by the JVM code generator, required for future hlcg
functionality)
git-svn-id: trunk@21691 -
* ptype.pas, read_named_type, array_dec:
allow border checks if both range elements are orddefs; for normal arrays
using e.g. "0..15" this will allow to declare the correct amount of
elements in the initialization while for generic arrays (e.g. "0..SizeOf(T)")
this will mean that only one element can be declared, which was already the
case before this change (maybe in such cases a constant initialization should
be forbidden in the future...)
+ added test
git-svn-id: trunk@21690 -
ptype.pas:
* read_named_type:
allow specializations for pointers in Delphi modes
* single_type:
correctly handle forwarddefs; as we can only specialize generics if
they are completely defined (srsym<>nil) we don't need to return a
forward def, but instead return the specialized def itself
+ added tests to "test" instead of "webtbs" as no explicit tests were given
in the report
git-svn-id: trunk@21689 -
ptype.pas:
* read_named_type:
after reading the type we're pointing to we need to make sure that
we didn't get a generic dummy symbol; this can happen when parsing
a pointer declaration as the type in a constant or variable
declaration
* resolve_forward_types:
when resolving forward types we need to make sure that we weren't
given a generic dummy to which no non-generic definition was
given (possible in Delphi mode); for non-Delphi modes we can not
rely on the generic dummy flag as the typedef of the symbol will
the generic def
+ added test from the bug reports as well as three additional ones to
make sure that nothing breaks regarding to forward pointer
declarations
git-svn-id: trunk@21687 -
This code generate different versions of assembly depending on the
amount to shift.
Variable Amount: 6 cycles (5 if last shift can be folded)
Constant 1 : 2 cycles
Constant 2-31 : 3 cycles (2 if last shift can foldable)
Constant 32 : 1 cycle (depends on the register allocator)
Constant 33-64 : 2 cycles
This should speed up softfpu on arm a bit.
git-svn-id: trunk@21686 -
RRX (Rotate Right with eXtend) does a single bit right rotation through
the carry. So it does not take any arguments, neither constant nor
register.
Also remove redundant shiftmode2str and replace usage of it with gas_shiftmode2str.
git-svn-id: trunk@21685 -
This code will generate the following sequence on arm:
r1=dst
r0=src
movs r1, r0
rsbmi r1, r0, #0
movs will set the N-flag when the MSB of r0 is set, if it is set, rsb
will calculate dst:=0-src;
git-svn-id: trunk@21678 -
compiler/options.pas only defines FPC_HAS_INTERNAL_ABS_LONG for cpus
which support the intrinsic. No need to check again in the rtl.
git-svn-id: trunk@21677 -
The old version did not check the S-Postfix for MOV, which results in
removing instructions like:
movs r0, r0
which breaks later flag usage.
git-svn-id: trunk@21676 -
if the source value comes from a bit position > sizeof(smaller subsetreg)
(fixes internalerror 68991 when compiling fpcompactimg.inc for ppc64)
git-svn-id: trunk@21675 -