Commit Graph

49824 Commits

Author SHA1 Message Date
Jonas Maebe
a0b537bc7b * fixed typed constants that use an integer number to initialise a procvar or
pointer on LLVM (fixes webtbs/tw21267)

git-svn-id: trunk@35059 -
2016-12-04 11:15:15 +00:00
Jonas Maebe
2e9c6f35ae - disable -Ooregvar for the LLVM-based x86-64 code generator, as it causes
internalerrors there and fixing it doesn't make sense since LLVM will take
    care of that anywaya

git-svn-id: trunk@35058 -
2016-12-04 11:15:12 +00:00
Jonas Maebe
a2017b2327 * don't keep tc_equal type conversions for LLVM in case the resultdef doesn't
change, since then we definitely don't have to insert a type conversion at
    the LLVM level either (fixes webtbs/tw1901 for LLVM)

git-svn-id: trunk@35057 -
2016-12-04 11:15:09 +00:00
Jonas Maebe
a8e107bb4b * fix memory leak: free rg[R_MMREGISTER]
git-svn-id: trunk@35056 -
2016-12-04 11:15:05 +00:00
michael
d6d10a522a * Patch from Mattias Gaertner
- more tests
   - case-of: added option to change between switch and if-else
   - Some changes to the way the implementation block is generated for units.

git-svn-id: trunk@35055 -
2016-12-04 09:35:53 +00:00
Károly Balogh
f3e33a9dde morphos: new pascal-written internal startup code. also refactored the rtl build process for morphos
git-svn-id: trunk@35054 -
2016-12-04 00:15:41 +00:00
Tomas Hajny
7956cb5d48 * CrtCtrlBreakHandler may not be invoked for Ctrl-C on certain platforms (Win32/Win64) - made conditional (preparation for future use as platform independent include file)
git-svn-id: trunk@35053 -
2016-12-03 23:41:03 +00:00
Tomas Hajny
63c3fc59d4 * as pointed to by Dmitry Boyarintsev (bug #31023), TurnMouseOff is not used and may be removed
git-svn-id: trunk@35052 -
2016-12-03 23:38:58 +00:00
Tomas Hajny
8038b2e64f * patch by Dmitry Boyarintsev (bug #31023) improving compatibility of unit Crt under Win32 and Win64 to other platforms and original TP/BP - Ctrl-C now treated as ASCII 3 and Ctrl-Break respects CheckBreak setting
git-svn-id: trunk@35051 -
2016-12-03 23:37:03 +00:00
Tomas Hajny
e5ceb04725 * patch by Dmitry Boyarintsev (bug #31023) implementing SysSetCtrlBreakHandler for Win32 and Win64
git-svn-id: trunk@35050 -
2016-12-03 23:35:20 +00:00
marcus
85e485826a AROS: Startupcode for x86_64 with stack extent feature
git-svn-id: trunk@35049 -
2016-12-03 19:29:00 +00:00
Károly Balogh
8c4e5e0610 bump PPU version due to the latest syscall changes
git-svn-id: trunk@35048 -
2016-12-03 19:01:11 +00:00
Károly Balogh
0cb555c07c syscalls: move the reference implementation of parseparaloc to paramgr. removes two identical copies from CPU specific code and enables basereg convention for AROS/x86_64. also, other minor fixes and cleanups in related code.
git-svn-id: trunk@35047 -
2016-12-03 19:00:41 +00:00
Jonas Maebe
ba33da711a * fixed compilation after r35034
- removed commented-out uses statement

git-svn-id: trunk@35046 -
2016-12-03 08:48:01 +00:00
Jonas Maebe
8c167f4e40 * handle already quoted symbol names for LLVM (like for Objective-C)
git-svn-id: trunk@35045 -
2016-12-02 18:04:14 +00:00
Jonas Maebe
876e5eab56 * fixed "smart linking" parameters to llc
git-svn-id: trunk@35044 -
2016-12-02 17:45:12 +00:00
Jonas Maebe
f26ed10ba1 * same as r27223 for hlcgobj (fixes webtbs/tw25895 for llvm)
git-svn-id: trunk@35043 -
2016-12-02 17:45:09 +00:00
Jonas Maebe
02e4a27a35 * print internalerrors in case we still encounter stray constants not part of
a typed constants
  * don't print superfluous newlines in typed constant definitions

git-svn-id: trunk@35042 -
2016-12-02 12:33:09 +00:00
Jonas Maebe
db40e1575d + support for handling the tcalo_no_dead_strip flag when targeting LLVM:
add such symbols to the pseudo-arrays llvm.compiler.used or llvm.used
    depending on their nature (fixes compiling Objective-C programs with
    optimization, and keeps the FPC ident in the linked binary)

git-svn-id: trunk@35041 -
2016-12-02 12:33:05 +00:00
Jonas Maebe
e62cb7917e + support for setting the "appending" flag of declaration generated via an
LLVM typed constant builder through a new appendingdef property

git-svn-id: trunk@35040 -
2016-12-02 12:33:02 +00:00
Jonas Maebe
97d6f17cc8 + add support for marking an LLVM definition as using "appending" linkage
git-svn-id: trunk@35039 -
2016-12-02 12:32:58 +00:00
Jonas Maebe
d328d7d95d * don't write an alignment for symbols in internal llvm sections (sections
whose name starts with 'llvm.')

git-svn-id: trunk@35038 -
2016-12-02 12:32:54 +00:00
Jonas Maebe
d99d18e258 - removed useless empty asmwrite statement
git-svn-id: trunk@35037 -
2016-12-02 12:32:51 +00:00
Jonas Maebe
827e980351 * fixed comment typo
git-svn-id: trunk@35036 -
2016-12-02 12:32:48 +00:00
Károly Balogh
02d145233d add m68k atari to the list of platforms which support syscalls
git-svn-id: trunk@35035 -
2016-12-02 09:33:05 +00:00
Károly Balogh
f5f895e2a3 syscalls: unify call reference creation across 4 different CPU archs. less copypasted code, brings x86_64 AROS support up to speed
git-svn-id: trunk@35034 -
2016-12-02 09:29:09 +00:00
florian
c2af5a104e * patch by Emelyanov Roman to allow 64 byte alignment in the $codealign directive, resolves #30934
git-svn-id: trunk@35033 -
2016-12-01 21:21:42 +00:00
marcus
cb0cd5ea56 AROS: MUI 64 bit record fixes
git-svn-id: trunk@35032 -
2016-12-01 21:02:40 +00:00
florian
0954e09834 * correctly handle 16 bit signed operations on AVRs without mul instruction, resolves #31036
git-svn-id: trunk@35031 -
2016-12-01 21:01:47 +00:00
marcus
092244309a Amicommon: use THandle/BPTR instead of LongInt (needed for 64 bit)
git-svn-id: trunk@35030 -
2016-12-01 17:55:58 +00:00
marcus
7eccbad9d3 Amiga: Missing TAG_END in video unit
git-svn-id: trunk@35029 -
2016-12-01 17:34:42 +00:00
marcus
b02d541e78 AROS: x86_64 needs also BINCOMPAT, TTask fixed type for 64 bit
git-svn-id: trunk@35028 -
2016-12-01 17:22:11 +00:00
michael
aef26e86d8 * Fix bug #31040
git-svn-id: trunk@35027 -
2016-12-01 15:13:11 +00:00
svenbarth
fde867cd5c * change IIDStr from a field to a property as otherwise the compiler would access the wrong field offset as it assumes RawUnitName to be a 255-byte ShortString
git-svn-id: trunk@35026 -
2016-12-01 12:59:20 +00:00
svenbarth
4fb77b71ec * fix for Mantis #31029, based on the patch provided by Silvio Clécio: PArrayOfByte is not necessary and in fact the purpose of TArrayOfByte is a different one from reference counting (namely to ensure correct passing of the parameter), so renamed accordingly (plus a comment); similar change in SetDynArrayProp. Also Get-/SetPropValue in Variants unit has been adjusted to make use of Get-/SetDynArrayProp.
+ added adjusted test

git-svn-id: trunk@35025 -
2016-11-30 19:32:41 +00:00
svenbarth
d9ea6aae4d * fix for Mantis #30761: always return the symbol found in the helper instead of doing this dependant on the presence of the overload attribute; for this the collection of all suitable overloads is done in tcallcandidates instead.
+ added test

git-svn-id: trunk@35024 -
2016-11-30 17:52:25 +00:00
Mattias Gaertner
7f8cdc56d3 undo accidental commit: fppas2js: test TestFunctionResult
git-svn-id: trunk@35023 -
2016-11-30 10:29:13 +00:00
Mattias Gaertner
3bb089223b fppas2js: test TestOperators1
git-svn-id: trunk@35022 -
2016-11-30 10:23:57 +00:00
Jonas Maebe
1afab1ab69 * moved the floating point constant range checking code from
pass_generate_code to pass_typecheck, so that it's also used by targets
    that override pass_generate_code (fixes webtbs/tw16315b for LLVM)

git-svn-id: trunk@35021 -
2016-11-29 21:54:33 +00:00
Jonas Maebe
006c7e1ccf * apply localalignmin/max to local variables for LLVM (fixes webtbs/tw15582)
git-svn-id: trunk@35020 -
2016-11-29 21:54:30 +00:00
Jonas Maebe
7af2663ed1 * fixed writing the VMT field of TP-style objects for typed constants if it
comes after the last defined field (previously, we emitted a bunch of
    superfluous zero-bytes after that field due to bad accounting regarding
    the last emitted field)
   o fixes webtbs/tw1365.pp for LLVM, and removes junk bytes for all targets

git-svn-id: trunk@35019 -
2016-11-29 21:54:27 +00:00
Jonas Maebe
8cd84bd8e8 * stop updating llvmnextfieldindex once we have established that the current
typed constant does not match the equivalent LLVM definition (it's only
    used to check whether any emitted data's type differs from the LLVM
    definition's field types)
   o fixed a potential out-of-bounds access related to this: the index of the
     equivalent LLVM field kept getting increased and at some point we checked
     whether the current emitted data's type was different from the LLVM field
     type without verifying first that the LLVM equivalent field index was not
     yet beyond the number of LLVM equivalent fields

git-svn-id: trunk@35018 -
2016-11-29 21:54:25 +00:00
Jonas Maebe
ee014fa4ff * fixed handling of typed files for LLVM when ISO-like I/O is active: encode
the buffer in the type, and support typecasting the typed file to a
    different size (needed to be able to pass it to the compiler helpers that
    expected a "TypedFile", whose buffer is 0 bytes and which hence will
    always have a smaller size than the original type) (fixes test/tisoext1)

git-svn-id: trunk@35017 -
2016-11-29 21:54:21 +00:00
florian
d0b2701693 * similiar fix for i386 as done in r34984 for x86-64
git-svn-id: trunk@35016 -
2016-11-29 20:41:33 +00:00
florian
091b31fc76 * fix avr compilation after r34975 by more tests against feature defines, resolves #31036
git-svn-id: trunk@35015 -
2016-11-29 20:37:58 +00:00
svenbarth
6ba85c2a70 * second fix for Mantis #30626: also search in parent classes for a suitable pre-existing specialization
+ added test

git-svn-id: trunk@35014 -
2016-11-29 17:04:07 +00:00
svenbarth
0a1e080089 * only create a new procsym for a specialization if it's indeed needed
git-svn-id: trunk@35013 -
2016-11-29 14:13:06 +00:00
svenbarth
ebfeb5b62a * fix for Mantis #30830: also remove unregistered specializations from the procsym's deflist when they're removed to avoid an access to freed data
+ added tests (adjusted original test plus a mode Delphi variant)

git-svn-id: trunk@35012 -
2016-11-29 14:12:02 +00:00
svenbarth
bfaa26d16a Commit r35010 also fixed Mantis #30524.
+ added tests

git-svn-id: trunk@35011 -
2016-11-28 18:37:20 +00:00
svenbarth
a535d54bcb * fix for Mantis #30939: Rework generation of the generic name to be less relying on the type hierarchy as a specialization inside the parameter declaration would want to have the full name of the procdef including its parameters, but those are still parsed at that stage (the pretty name is still a topic onto itself however...)
+ added tests (original test was only mode fpc, test for mode delphi is added as well)

git-svn-id: trunk@35010 -
2016-11-28 18:16:49 +00:00