Commit Graph

21655 Commits

Author SHA1 Message Date
florian
9febce6ffb * remove .NOTPARALLEL: from compiler Makefile, accelerates make fullcycle with -j a lot
* few cleanups

git-svn-id: trunk@40003 -
2018-10-21 11:40:57 +00:00
pierre
378e1dfaa4 Add explicit typecast to avoid range check error
git-svn-id: trunk@40001 -
2018-10-20 22:19:08 +00:00
pierre
0bcf9a51d9 Avoid range check error when compiled with -CR
git-svn-id: trunk@40000 -
2018-10-20 18:49:53 +00:00
pierre
3715dbdf41 Avoid run time error if compiled with -CR option
git-svn-id: trunk@39999 -
2018-10-20 18:44:05 +00:00
florian
0cc3be49fa * GAS readers and writers can handle section flags
git-svn-id: trunk@39998 -
2018-10-20 18:23:24 +00:00
pierre
d512d8cae1 Also fix first_abs_real like in rev 39988
git-svn-id: trunk@39997 -
2018-10-20 18:11:25 +00:00
florian
2cbb9895be * pass float abi always to the arm assembler
git-svn-id: trunk@39996 -
2018-10-20 16:48:31 +00:00
florian
3078cc4b0d * same fix as in r39988 for fpc_first_sqrt
git-svn-id: trunk@39991 -
2018-10-20 10:18:45 +00:00
florian
116f36fe56 * avoid range check errors
git-svn-id: trunk@39990 -
2018-10-20 10:17:34 +00:00
florian
d4cf97a755 * wrong ifdef exposed by warning with -O3 fixed
git-svn-id: trunk@39989 -
2018-10-20 09:16:51 +00:00
pierre
7d7f966ccb Fix wrong explicit typecast that lead to memory corruption in first_sqr_real
git-svn-id: trunk@39988 -
2018-10-19 23:04:55 +00:00
yury
48fcbb3f6c * Create the ".note.gnu.build-id" section for android. It fixes debugging of shared libs in Android Studio.
git-svn-id: trunk@39987 -
2018-10-19 20:23:08 +00:00
pierre
92acd38f40 Fix for bug report #34380
git-svn-id: trunk@39986 -
2018-10-18 20:21:54 +00:00
florian
9805214d34 * properly take care of register allocations between the first and second instruction for the FoldLea optimization
* check for ait_instruction after a GetNextInstruction function call
* cosmetics

git-svn-id: trunk@39983 -
2018-10-18 18:28:03 +00:00
yury
4643a0b1ff * Register external gas assembler for aarch64-android and x86_64-android.
git-svn-id: trunk@39969 -
2018-10-18 11:48:27 +00:00
yury
e8d43c8fed * Fixed range check errors.
git-svn-id: trunk@39963 -
2018-10-17 19:12:27 +00:00
yury
7eb9b23fa5 * Reverted r39961.
git-svn-id: trunk@39962 -
2018-10-17 18:56:29 +00:00
yury
692c287c3e * Undef FPC_HAS_TYPE_EXTENDED for x86_64-android.
git-svn-id: trunk@39961 -
2018-10-17 18:46:04 +00:00
yury
a29290202f * Regenerated makefiles to support x86_64-android.
git-svn-id: trunk@39958 -
2018-10-17 17:12:20 +00:00
yury
e367577bf1 + added support for x86_64-android target.
git-svn-id: trunk@39956 -
2018-10-17 16:56:27 +00:00
yury
e60a5ebfe7 * Fixed overflow error for the qword version of align() when i=0.
git-svn-id: trunk@39954 -
2018-10-17 13:18:45 +00:00
yury
93d672bf16 * aarch64: Fixed loading of a function result which is returned in 4 32-bit MM registers to 2 64-bit int registers. Bug #30329.
git-svn-id: trunk@39953 -
2018-10-17 11:41:34 +00:00
yury
c306f57ecb * Reverted r39947. According to Sven, the $self parameters is not required to be first parameter in RTTI. Appropriate tests will be fixed.
git-svn-id: trunk@39952 -
2018-10-17 08:52:57 +00:00
yury
7c94d00a4a * Fixed bug #17413 (and the tw17413 test) for aarch64 by adding additional check.
git-svn-id: trunk@39951 -
2018-10-16 21:16:30 +00:00
Jonas Maebe
0b246f3dbd * converted Boolean8 to an internal type, and mapped Boolean to the
new internal pasbool1(type) (part of mantis #34411)
   o apply the _Bool x86-64 parameter passing rules only to pasbool1

git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
yury
9ee1682955 * Fixed interface delegation for aarch64 (tdel1 and tdel2 tests).
It was broken by r31676 which did not take in account r29953. As a consequence $self was passed in register x1 instead of x0 when the method result is of a managed type.
  This fix enables changing order of the $self and $result parameters only for aarch64 AND llvm combination where it is actually needed.
  The issue with interface delegation still exists for aarch64-llvm and need to be fixed separately. Probably by applying llvm-specific workarounds as it was made in r29953 for regular aarch64 targets.

git-svn-id: trunk@39948 -
2018-10-16 20:32:02 +00:00
yury
84b5129f1d * Fixed writing of method's RTTI for aarch64 by explicitly writing the $self parameter first.
git-svn-id: trunk@39947 -
2018-10-16 17:24:07 +00:00
pierre
4c0a213f0d Add -Tlinux and -Tembedded help lines for riscv32 and riscv64 compilers
git-svn-id: trunk@39945 -
2018-10-16 10:41:27 +00:00
pierre
293973b306 Add missing setting of expectloc for multiplications
git-svn-id: trunk@39935 -
2018-10-14 22:18:50 +00:00
florian
eea088c5f5 * allow nil to be assigned to generic types, resolves #34037
* niln is also a constant node

git-svn-id: trunk@39934 -
2018-10-14 07:38:13 +00:00
pierre
c9c8ff1eef Set MaxLocalsSize according to address size not register size
git-svn-id: trunk@39925 -
2018-10-13 12:00:31 +00:00
pierre
5ccced201a Downgrade some warnings to notes for EXTDEBUG
git-svn-id: trunk@39924 -
2018-10-13 11:35:34 +00:00
pierre
aa89182bf5 Fix compilation with -dEXTDEBUG
git-svn-id: trunk@39923 -
2018-10-13 11:34:53 +00:00
pierre
68bcffc3e0 Fix riscv64 compiler compilation with -dEXTDEBUG
git-svn-id: trunk@39922 -
2018-10-13 09:47:29 +00:00
yury
d0b6f427d3 * 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.
git-svn-id: trunk@39916 -
2018-10-12 14:43:17 +00:00
yury
4860f3934a * Fixed overflow error when calling align() with corner case values such as align($7FFFFFFC, 4) for the longint variant.
git-svn-id: trunk@39915 -
2018-10-12 14:38:14 +00:00
pierre
a898ae856f Adapt ppudump to fix introduced in revision 39912
git-svn-id: trunk@39914 -
2018-10-12 06:05:50 +00:00
pierre
66e7c78a8f fix position of ppuload_platform for trecorddef
git-svn-id: trunk@39913 -
2018-10-11 21:02:25 +00:00
pierre
88bddc2cb0 Fix ppuload for string type for i8086, use getasizeint for all string defs but short string
git-svn-id: trunk@39912 -
2018-10-11 20:38:39 +00:00
yury
9d7308df42 * Android: Reworked the startup code to use no assembly instructions. Generic assembler startup files contains only section data and are compiled for each CPU.
* Android: argc and argv are correct for shared libraries.

git-svn-id: trunk@39905 -
2018-10-08 16:48:41 +00:00
yury
88365b6d92 * Enabled safecall support for aarch64 to be on par with other cpus.
git-svn-id: trunk@39903 -
2018-10-08 08:37:18 +00:00
svenbarth
b9ec7e1e06 * generate RTTI for *all* parameters of a method or procedure variable
git-svn-id: trunk@39885 -
2018-10-07 12:25:33 +00:00
svenbarth
a8b2ad31d1 * fix for Mantis #34355: correctly check whether the array constructor is empty (aka []) or not
git-svn-id: trunk@39882 -
2018-10-07 12:25:24 +00:00
svenbarth
2f74a51eb8 * fix .seh_savereg: the offset is checked with a bitmask, not a divisor, so use "and", not "mod"
git-svn-id: trunk@39877 -
2018-10-07 12:25:09 +00:00
florian
8943c0584e + patch by J. Gareth Moreton to support BMI2 instructions
+ extended avx test generator with the newly added BMI2 instructions

git-svn-id: trunk@39875 -
2018-10-07 10:10:19 +00:00
yury
8c59eb1ce5 * Regenerated makefiles to support aarch64-android.
git-svn-id: trunk@39863 -
2018-10-06 09:36:03 +00:00
yury
671d31df1d + Added support for the aarch64-android target.
git-svn-id: trunk@39862 -
2018-10-06 09:33:09 +00:00
florian
c7a0022146 * fix building with LLVM=1, thanks to Karl-Michael Schindler for the hint
git-svn-id: trunk@39861 -
2018-10-05 20:56:56 +00:00
pierre
0e0b43889f Use vfpv2 as default fpu for eabihf if cpu is below armv7
git-svn-id: trunk@39849 -
2018-10-01 21:50:13 +00:00
florian
be1bd043a7 * only i386 uses oldfpccall for interrupts, all other architectures use now stdcall, resolves #34317
git-svn-id: trunk@39838 -
2018-09-27 21:00:35 +00:00
florian
352fb866ef * is_range_test returns false if "lower" bound is greater than "upper" bound
git-svn-id: trunk@39837 -
2018-09-27 20:24:52 +00:00
svenbarth
d5f0d8e306 * addendum for Mantis #34333: also complain about number of arguments with the maximum number of arguments for Copy ( = 3 ) is exceeded
git-svn-id: trunk@39836 -
2018-09-27 19:44:35 +00:00
pierre
915fb05055 Update remaining Makefile's
git-svn-id: trunk@39830 -
2018-09-27 07:10:27 +00:00
Károly Balogh
b4a7d6a82e cleanup: remove ARMHF-related comments from RISC-V only codepath. no functional change.
git-svn-id: trunk@39827 -
2018-09-27 07:04:04 +00:00
pierre
578e60e6ef Fix default CPUs for riscv32
git-svn-id: trunk@39819 -
2018-09-26 21:56:36 +00:00
pierre
10f72ba2c8 Add missing TFenceFlags and TRoundingMode for riscv32
git-svn-id: trunk@39818 -
2018-09-26 21:56:03 +00:00
svenbarth
76c45b1a72 * fix for Mantis #34333: improve error output for incorrect calls to Copy()
git-svn-id: trunk@39817 -
2018-09-26 21:33:51 +00:00
florian
a34d4e715c Merged riscv_new branch
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
florian
7082b6e34a * compilation fixed
git-svn-id: trunk@39812 -
2018-09-26 19:38:17 +00:00
florian
88f83280dc * correctly take care of short boolean evaluation when rearranging nodes during CSE
git-svn-id: branches/laksen/riscv_new@39803 -
2018-09-25 20:31:03 +00:00
svenbarth
bf91991bae * fix for Mantis #34332: allow 2 parameter form of Copy also for ShortString variables
+ added test

git-svn-id: trunk@39802 -
2018-09-25 19:10:06 +00:00
Jeppe Johansen
d33b520690 Clean up peephole optimization code.
Add hardfloat ABI option for RiscV. Still needs proper implementation though.
Add CG support for profiling.

git-svn-id: branches/laksen/riscv_new@39798 -
2018-09-24 17:15:22 +00:00
svenbarth
116230f759 * forgot to commit extension to tspecializenode
git-svn-id: trunk@39788 -
2018-09-21 15:17:52 +00:00
svenbarth
9a99ab9dda * fix for Mantis #34287: correctly handle "inherited method" calls if "method" is a generic (no matter if it's mode Delphi or not)
+ added test

git-svn-id: trunk@39787 -
2018-09-21 15:16:18 +00:00
svenbarth
06267006f3 * explicitely handle the boolean types to determine the bit size as all of them have the bit size 1
+ added test

git-svn-id: trunk@39786 -
2018-09-21 13:24:49 +00:00
Jeppe Johansen
8f4173c54d Add a number of optimizations.
Don't do CSE restructuring when has full evaluation enabled.

git-svn-id: branches/laksen/riscv_new@39781 -
2018-09-20 20:27:58 +00:00
Jeppe Johansen
576ef934bd Fix bug in lui+addi immediate load for spilling code.
git-svn-id: branches/laksen/riscv_new@39764 -
2018-09-16 20:51:15 +00:00
florian
7855b3cf1b * relax formula for max. nodes to inline
git-svn-id: trunk@39763 -
2018-09-16 19:15:30 +00:00
Jeppe Johansen
74a7963d58 Redo overflow checking code.
Fix shift operators in case of unsigned subreg operations. There should be no sign extension here.
Add some unittest implementations that test stack execution and writing to readonly constants.

git-svn-id: branches/laksen/riscv_new@39762 -
2018-09-16 18:37:59 +00:00
florian
49e7e5f512 * support aitconst_*bit_unaligned in the intel assembler writer, resolves #34222
git-svn-id: trunk@39761 -
2018-09-16 15:27:03 +00:00
florian
ee338fc709 * patch by Karl-Michael Schindler to update the german messages files, resolves #34218
git-svn-id: trunk@39760 -
2018-09-16 15:13:04 +00:00
florian
a21397e356 + based on a patch by Laksen, optimize (v>=x) and (v<=y) into (v-x)<(y-x)
git-svn-id: trunk@39759 -
2018-09-16 13:09:36 +00:00
florian
64ad48e89e * forgotten part of r39750
git-svn-id: trunk@39752 -
2018-09-13 20:20:40 +00:00
florian
800ce23499 * fixed some issues to get correct values of section_count, works better than before but it is still not perfect for unknown reasons
git-svn-id: trunk@39750 -
2018-09-12 20:33:18 +00:00
pierre
d46536817c Disable overflow for UDIVX ans SDIVX 64-bit instructions
git-svn-id: trunk@39731 -
2018-09-11 08:00:54 +00:00
svenbarth
cb8f6f637c * fix big endian targets by using an explicit assignment with typecast instead of an absolute variable
git-svn-id: trunk@39728 -
2018-09-10 21:12:29 +00:00
Jeppe Johansen
f828d8700c A subscript can also trigger an exception.
git-svn-id: branches/laksen/riscv_new@39718 -
2018-09-09 14:41:37 +00:00
Jeppe Johansen
1f68caaf82 Removed reuse of src and dest registers in g_concatcopy as that
could modify registers used for other stuff(ex. framepointer).

git-svn-id: branches/laksen/riscv_new@39717 -
2018-09-09 14:02:54 +00:00
Jeppe Johansen
4b227de02e Add ORN instruction for Thumb2.
git-svn-id: trunk@39714 -
2018-09-08 12:10:51 +00:00
florian
f040c19fd6 * cleanup
git-svn-id: branches/laksen/riscv_new@39712 -
2018-09-07 19:22:59 +00:00
svenbarth
92cce05f5f * as a workaround for some compiler bug introduced during 3.1.1 the freeing of the management operator offset entry lists is moved to a nested procedure as that does not trigger the bug (even with -O2 or -O3)
git-svn-id: trunk@39711 -
2018-09-04 20:20:07 +00:00
svenbarth
ba08bdc9b1 * increase PPU version after the addition of the field to keep track of management operators (don't seperately to help merging)
git-svn-id: trunk@39710 -
2018-09-03 18:00:30 +00:00
svenbarth
600ed6701e + keep track whether a structured type has fields with management operators (or fields that in turn have fields with management operators and so on) and store that in the PPU to speed up compilation again
* adjusted PPUdump for this

git-svn-id: trunk@39709 -
2018-09-03 18:00:27 +00:00
svenbarth
46ef16ac11 * generate an error if the type parameters of a generic routine's definition does not match with its interface or forward declaration
+ added tests

git-svn-id: trunk@39703 -
2018-09-02 16:20:29 +00:00
svenbarth
50323043c1 * generate an error if the type parameters of the record, object or class do not match with its declaration
+ added test

git-svn-id: trunk@39702 -
2018-09-02 16:20:25 +00:00
svenbarth
03a036c6cb * regenerate msg*.inc after adding messages for mismatching generic declarations
git-svn-id: trunk@39701 -
2018-09-02 16:20:22 +00:00
svenbarth
cfe75ca0fd + add messages to use when generic types of a definition do not match with its declaration
git-svn-id: trunk@39700 -
2018-09-02 16:20:18 +00:00
Jeppe Johansen
29ea4ed07d Add rounding mode operands.
Add support for trunc and round methods.

git-svn-id: branches/laksen/riscv_new@39698 -
2018-09-01 19:48:44 +00:00
Jeppe Johansen
2af0ca8546 Fix bugs caused by swapping of operands in float comparisons.
git-svn-id: branches/laksen/riscv_new@39697 -
2018-09-01 19:47:28 +00:00
svenbarth
70ae0a2dc9 + add a comment to the destructor of tsymtable so that others (and maybe me a well) will hopefully see that the destructor of that class is not completely trivial!
git-svn-id: trunk@39694 -
2018-08-31 19:16:48 +00:00
svenbarth
072699d38a * protect the destructors of tabstractrecordsymtable and twithsymtable against executing when called with a refcount > 1 (this fixes Mantis #34210)
+ added simplified test

git-svn-id: trunk@39693 -
2018-08-31 19:16:45 +00:00
svenbarth
10886d8cef * fix for Mantis #34206: when specializing nested routines of a generic routine we don't need access to their genericdef (which isn't available anyway in other units when loading from PPU) as their definition is completely contained in the token stream
+ added simplified test for the problem

git-svn-id: trunk@39692 -
2018-08-31 16:11:05 +00:00
svenbarth
a076677336 * instead of a flags field generate a table with all Initialize operators of all fields (nested or not, parent class or not) for class types; objects and records don't use this (yet)
git-svn-id: trunk@39690 -
2018-08-29 19:21:35 +00:00
svenbarth
21e7ddaac7 + add method to retrieve a list of management operator/field offset pairs for a specific management operator inside a structured type (no matter how deeply nested they are)
git-svn-id: trunk@39689 -
2018-08-29 19:21:31 +00:00
svenbarth
ecc02f3fdb * always search in the current module as well as its symtables are be popped already in case of RTTI generation
git-svn-id: trunk@39688 -
2018-08-29 19:21:28 +00:00
svenbarth
190716ac0e * move getrecorddef and gettabledef from TVMTWritter to symdef as they might be used from the RTTI as well
git-svn-id: trunk@39687 -
2018-08-29 19:21:23 +00:00
svenbarth
2e1327b6b2 * use pooled constant references for the parameter locations as more often than not they're equal between multiple methdos (e.g. the Self argument is always the same)
* using this the TypInfo unit can navigate interface methods and VMT method parameters much more quickly as the latter have a constant size now

git-svn-id: trunk@39686 -
2018-08-29 19:20:31 +00:00
svenbarth
029ec93df6 * use pooled constant references for the names of VMT methods in the RTTI
git-svn-id: trunk@39685 -
2018-08-29 19:20:27 +00:00
svenbarth
228d3252cc * use pooled constant references for the parameter names of VMT methods in the RTTI
git-svn-id: trunk@39684 -
2018-08-29 19:20:24 +00:00
svenbarth
8bf3661f7f + add a method to emit a reference to a pooled shortstring constant (aka one per unit); very useful for new RTTI tables to avoid poluting the binary with string constants
git-svn-id: trunk@39683 -
2018-08-29 19:20:20 +00:00
florian
4f052e4f90 o fix several issues with floating point exceptions
+ mask underflow and precision on startup
  + check for floating point exceptions after inlined float routine helpers
  - do not check for floating point exceptions after floating point moves 

git-svn-id: branches/laksen/riscv_new@39645 -
2018-08-19 15:26:00 +00:00
florian
999cbd94b8 + support to generate software based floating point exception checking
(enabled by -CE)

git-svn-id: branches/laksen/riscv_new@39639 -
2018-08-19 10:56:47 +00:00
florian
3c69f9a066 + basic infrastructure to generate code for floating point exception
checking for CPUs without floating point exception support

git-svn-id: branches/laksen/riscv_new@39637 -
2018-08-19 10:54:45 +00:00
marco
98f00acb06 * trunk to 3.3.1
git-svn-id: trunk@39635 -
2018-08-18 15:47:44 +00:00
florian
ea32ddd5b2 * avoid overflows of execution weight
git-svn-id: trunk@39623 -
2018-08-16 20:45:36 +00:00
florian
75251913b1 * properly pass execution weight in SetExecutionWeight
git-svn-id: trunk@39622 -
2018-08-16 20:45:36 +00:00
marco
dd52e79089 * two comment spelling fixes. Mantis #34092 & #34097
git-svn-id: trunk@39593 -
2018-08-08 08:39:20 +00:00
pierre
ada8891d9e Also allow clang assembler for powerpc64-darwin target
git-svn-id: trunk@39580 -
2018-08-06 16:13:05 +00:00
svenbarth
3d740f13e4 * ensure that the data of the temp node is freed correctly in case of an error (the error might be non-fatal in case of a generic passing an untyped type to Write/Read)
git-svn-id: trunk@39566 -
2018-08-04 08:37:07 +00:00
svenbarth
781303c0d8 * ensure that the file parameter for the Read/Write family of intrinsics is (and can be) freed in tinlinenode.handle_read_write()
git-svn-id: trunk@39565 -
2018-08-04 08:37:01 +00:00
svenbarth
473a028523 - the freegenericparams variable is no longer required as it's always true whenever consume_proc_name is called anyway
git-svn-id: trunk@39562 -
2018-08-03 20:24:23 +00:00
svenbarth
32db846289 * free the list containing the generic parameters as after calling insert_generic_parameter_types() it's no longer required (though this means that the condition handling generictypelist instead needs to be adjusted)
git-svn-id: trunk@39561 -
2018-08-03 20:24:19 +00:00
svenbarth
c1cfd87b56 * the call node takes ownership of the specialization context, so free it in the destructor
git-svn-id: trunk@39560 -
2018-08-03 20:24:15 +00:00
svenbarth
0aee319fdb * do_member_read() takes ownership of the specialization context, so Nil it after the call
git-svn-id: trunk@39559 -
2018-08-03 20:24:10 +00:00
svenbarth
0ba14c7ad8 * fix memory leak when freeing a temp delete node: also call the inherited destructor so that e.g. tnode.optinfo is freed.
git-svn-id: trunk@39558 -
2018-08-03 20:24:05 +00:00
svenbarth
32c307e9ce * fix for Mantis #34021: if one of the two operators is an array constructor try to use an operator overload for that first before converting it to a set
+ added tests

git-svn-id: trunk@39554 -
2018-08-03 15:24:59 +00:00
pierre
29d524e7e6 Remove abolute path for native linker, ld is in directory /usr/ccs/bin in Oracle Solaris 10 8/11
git-svn-id: trunk@39541 -
2018-08-01 06:44:26 +00:00
Jeppe Johansen
f781c8942e Write real atomic operations, and add memory barrier operations.
Add support for fence, and acquire/release syntax to assembler reader.
Fix broken register aliases.

git-svn-id: branches/laksen/riscv_new@39524 -
2018-07-29 16:43:09 +00:00
Jeppe Johansen
90d5f5e760 Added library search paths.
Removed GP and TP from allocatable registers for now. GP should not be overwritten.
Ported dllprt0.as
Fixed register usage in cprt0.as

git-svn-id: branches/laksen/riscv_new@39522 -
2018-07-29 13:08:15 +00:00
Jeppe Johansen
76dda5813e Updated dynlinker filename.
Fix passing of vararg register pairs.
Fix passing of big record, and return of records.
Disabled framepointer elimination for the time being.

git-svn-id: branches/laksen/riscv_new@39519 -
2018-07-28 20:06:06 +00:00
florian
dc3830d78d * integer and float registers do not overlay on Risc-V
git-svn-id: branches/laksen/riscv_new@39512 -
2018-07-26 20:57:01 +00:00
florian
44150f43ac * RISC-V 32 compilation fixed
+ lazarus project file for the compiler added

git-svn-id: branches/laksen/riscv_new@39511 -
2018-07-26 19:18:47 +00:00
Jeppe Johansen
27ab039366 Fixed _fini and _init references in cprt0.as
Add RiscV to fcl-res and fpcres.
Check that constant is a valid imm12 when doing overflow checking.

git-svn-id: branches/laksen/riscv_new@39494 -
2018-07-23 11:40:55 +00:00
Jeppe Johansen
a8c82856b1 Fixed missing maybeadjust calls after not operation.
git-svn-id: branches/laksen/riscv_new@39493 -
2018-07-23 10:20:32 +00:00
Jeppe Johansen
b98eb3daa9 Changed order in stack unravelling RTL code, to match the most common cases.
Fixed unsigned conditions for branch conditions.
Added some additional const loading cases.
Changed the temporary register used during calls because it could otherwise clash with the argument passing registers.

git-svn-id: branches/laksen/riscv_new@39492 -
2018-07-23 01:11:31 +00:00
florian
f3b7e3281a * fix int to real for non-register locations
git-svn-id: branches/laksen/riscv_new@39491 -
2018-07-22 20:48:15 +00:00
florian
f48203b66f * generate no uleb with differences for line information
git-svn-id: branches/laksen/riscv_new@39490 -
2018-07-22 19:43:47 +00:00
Jeppe Johansen
c6b27bc225 Fix shift operations on 32bit operands.
git-svn-id: branches/laksen/riscv_new@39489 -
2018-07-22 19:25:46 +00:00
Jeppe Johansen
6d9a0fdc73 Added implementation of InstructionLoadsFromReg.
Fixed spilling_get_operation_type_ref, no mem operation modifies ref registers.

git-svn-id: branches/laksen/riscv_new@39487 -
2018-07-22 18:38:07 +00:00
Jeppe Johansen
a906feb05e Fixed bug in peephole optimizer.
git-svn-id: branches/laksen/riscv_new@39486 -
2018-07-22 16:58:10 +00:00
Jeppe Johansen
2499129ba5 Pass aggregates larger than 2*XLEN as a reference.
Fix load_reg_reg and make it do proper type conversions.
Added maybeadjust to tcgrv.

git-svn-id: branches/laksen/riscv_new@39485 -
2018-07-22 14:15:29 +00:00
florian
9776ea2afe * SLTIU -> SLTU
git-svn-id: branches/laksen/riscv_new@39484 -
2018-07-22 13:55:53 +00:00
florian
32a58ba7d1 * might_have_sideeffects gets flags: if mhs_exceptions is passed, nodes which might cause an exception are considered as having a side effect
git-svn-id: branches/laksen/riscv_new@39483 -
2018-07-22 13:11:21 +00:00
florian
65a415c13e * fix assembling with official binutils
* fix compilation on 32 bit hosts
+ compile with -Sew

git-svn-id: branches/laksen/riscv_new@39482 -
2018-07-22 13:10:24 +00:00
Jeppe Johansen
054bf32f1f Add RV64GC cpu type.
Fix float loading.
Fix a number of small issues with wrong operand sizes.
Fixed concatcopy code generation.
Align jump table for case statements.

git-svn-id: branches/laksen/riscv_new@39481 -
2018-07-21 22:34:42 +00:00
Jeppe Johansen
768fc2ea4b Added overflow checking in for add instructions.
git-svn-id: branches/laksen/riscv_new@39479 -
2018-07-20 15:34:22 +00:00
Jeppe Johansen
2aaf481d89 Regenerated makefiles.
git-svn-id: branches/laksen/riscv_new@39476 -
2018-07-20 10:40:57 +00:00
Jeppe Johansen
6352328f3a Update packages with information about RiscV.
Fix g_external_wrapper, since it uses a register.
Fixed calling of gas.
Ported cprt0.

git-svn-id: branches/laksen/riscv_new@39475 -
2018-07-20 10:40:28 +00:00
Jeppe Johansen
ceb38833f2 Added RiscV32/64 target, from a cleaned up version of branches/laksen/riscv/trunk.
git-svn-id: branches/laksen/riscv_new@39474 -
2018-07-20 08:21:15 +00:00
nickysn
42432d4ef3 * use sizeuinttype, instead of ptruinttype for the indexdef conversion in
tcgvecnode.pass_generate_code. This avoids a meaningless conversion to 32-bit
  (and using the cwd instruction) on i8086 in the far data memory models.

git-svn-id: trunk@39472 -
2018-07-19 15:27:14 +00:00
michael
f6867cbd63 * Patch by Cyrax to allow creating map file on linux (bug ID 33982)
git-svn-id: trunk@39449 -
2018-07-14 08:12:38 +00:00
florian
93c5eae528 * accept dereferences in generics definitions, resolves #33700 properly
git-svn-id: trunk@39447 -
2018-07-13 21:00:33 +00:00
florian
52846df241 * fixed condition in getbestreal
git-svn-id: trunk@39446 -
2018-07-13 19:53:47 +00:00
florian
0c6cf12fbf + support for the directive $EXCESSPRECISION
git-svn-id: trunk@39443 -
2018-07-12 21:39:50 +00:00
Jeppe Johansen
3e2be29030 Make sure to align at the end of the .text, in case .data bytes will be placed there in flash.
git-svn-id: trunk@39442 -
2018-07-12 18:52:19 +00:00
nickysn
9272bf59b2 + added x86 (i8086, i386 and x86_64) intrinsics fpc_x86_get_cs/ss/ds/es/fs/gs
for getting the value of x86 segment registers

git-svn-id: trunk@39433 -
2018-07-11 14:19:40 +00:00
florian
d4c65cdac4 * better register de-allocation after CWD/CWB
git-svn-id: trunk@39413 -
2018-07-07 21:38:42 +00:00
florian
4f580f7878 + add missing exit as mentioned by J. Gareth Moreton in #33754
git-svn-id: trunk@39408 -
2018-07-07 14:53:56 +00:00
florian
0eea2141f6 * patch by J. Gareth Moreton: clarity in directive conflict error messages, resolves #33754
git-svn-id: trunk@39407 -
2018-07-07 14:46:01 +00:00
florian
96e92527e9 * constant folding of not must check if the deftype is really an orddef, resolves #33696
git-svn-id: trunk@39406 -
2018-07-07 14:17:41 +00:00
pierre
6cab9fd7db Add replacement of $GCSECTIONS for shared libraries
git-svn-id: trunk@39403 -
2018-07-07 07:22:51 +00:00
svenbarth
441fc2fab6 * also parse postfix operators after parsing a _STRING token (required for class functions on type helpers for String)
+ added tests

git-svn-id: trunk@39399 -
2018-07-06 15:57:11 +00:00
marco
2a80eb3fdd * patch from #31920, pass gc-sections to .so's
git-svn-id: trunk@39392 -
2018-07-06 08:17:10 +00:00
nickysn
ff2fff365f + added x86 compiler intrinsics fpc_x86_sti and fpc_x86_cli, which generate the
'sti' and 'cli' instructions

git-svn-id: trunk@39388 -
2018-07-04 16:48:34 +00:00
nickysn
6cd88a24dc * release al/ax/eax immediately after the 'in', before (instead of after) moving
it to the destination imaginary register. This generates better code.

git-svn-id: trunk@39380 -
2018-07-04 13:09:47 +00:00
nickysn
f34710faa0 + use the in and out instructions with immediate constant port number for ports
that are evaluated as a compile-time constant in the range 0..255

git-svn-id: trunk@39365 -
2018-07-03 20:15:20 +00:00
nickysn
fdc896ad0a + inline support for the x86 'in' and 'out' instructions. Currently only enabled
in the i8086-msdos 'ports' unit, but will be enabled on other targets (e.g.
  go32v2) in the future as well. 32-bit 'in' and 'out' not inlined on i8086, but
  will be on i386 and x86_64.

git-svn-id: trunk@39362 -
2018-07-03 17:01:42 +00:00
florian
b70fc52874 * patch by Ondrej Pokorny: the stored property modifier does not delete the inherited default value anymore, resolves #33564
git-svn-id: trunk@39357 -
2018-07-01 20:11:13 +00:00
florian
eb61923762 * patch by Ondrej Pokorny: The nodefault is now inherited from parent class, resolves #33563
git-svn-id: trunk@39356 -
2018-07-01 19:01:41 +00:00
florian
5782acc32d * patch by J. Gareth Moreton to fix 33909
git-svn-id: trunk@39353 -
2018-07-01 12:54:30 +00:00
Károly Balogh
e7025b6759 another fix for the new warning introduced in r39347, hopefully it fixes win32 build
git-svn-id: trunk@39352 -
2018-06-30 16:51:41 +00:00
florian
6a2cb0bbbd * more compilation fixes
git-svn-id: trunk@39350 -
2018-06-30 12:48:54 +00:00
florian
68eb921d46 * broken compilation after r39347 fixed
git-svn-id: trunk@39349 -
2018-06-30 12:30:25 +00:00
florian
9af9658fa7 * first parameter of SetLength must be valid, as it is read
git-svn-id: trunk@39347 -
2018-06-30 11:25:43 +00:00
nickysn
e813a11e85 + support TP7-compatible @proc^ (as in FillChar(@proc^,...))
git-svn-id: trunk@39343 -
2018-06-29 14:16:35 +00:00
pierre
c654739db9 Change default settings for i8086 compiler when compiled for go32v2 OS, to avoid use of Watcom tools
git-svn-id: trunk@39340 -
2018-06-29 09:41:38 +00:00
nickysn
88d9dd23ae * the 'again' parameter of factor_read_id() changed to 'out' instead of 'var'
git-svn-id: trunk@39317 -
2018-06-27 15:59:40 +00:00
nickysn
a38e9ff12e * if an include file name ends in dot, and the file is not found, also search
for the file name without the dot. So, for example, if the code contains
  {$I MPAL256.} and 'MPAL256.' is not found, search also for 'MPAL256'

git-svn-id: trunk@39316 -
2018-06-27 14:41:06 +00:00
nickysn
966564aade - removed 'if assigned(code)' before calling code.free in tcgprocinfo.destroy,
since .free already checks for <>nil

git-svn-id: trunk@39312 -
2018-06-27 12:38:58 +00:00
florian
78943ea843 + patch by J. Gareth Moreton: x86 optimisations for Jcc and SETcc, resolves #33899
* optimization also added for i386

git-svn-id: trunk@39307 -
2018-06-25 20:40:05 +00:00
florian
af37ca8563 - remove SetccMovbLeaveRet2SetccLeaveRet optimization, this type of code is not generated anymore for years
git-svn-id: trunk@39306 -
2018-06-25 20:40:04 +00:00
florian
1472a81768 * patch by J. Gareth Moreton to unify the x86 assembler optimizer method headers, resolves #33908
git-svn-id: trunk@39305 -
2018-06-25 20:13:34 +00:00
florian
4aa0ad6735 * use vmov.xx to load float constants if possible
git-svn-id: trunk@39298 -
2018-06-24 12:40:00 +00:00
florian
4f5f3c4a09 + support for vmov.xx vreg,#imm on arm
git-svn-id: trunk@39297 -
2018-06-24 12:39:59 +00:00
svenbarth
a2b58b842b + add support for threadvars in records
+ added tests

git-svn-id: trunk@39289 -
2018-06-23 13:49:16 +00:00
svenbarth
c3ca96279a + add support for threadvars inside classes
+ added tests

git-svn-id: trunk@39288 -
2018-06-23 13:49:12 +00:00
svenbarth
019ebe598a * regenerate msg*.inc files after addition of the message about threadvars inside classes/records without
"class" specifier

git-svn-id: trunk@39287 -
2018-06-23 13:49:08 +00:00
svenbarth
0a45d7a774 + add a message that is used when a threadvar section is started inside a class or record without the "class"
specifier

git-svn-id: trunk@39286 -
2018-06-23 13:49:05 +00:00
svenbarth
89f42fcdae * handle vd_threadvar inside read_record_fields()
git-svn-id: trunk@39285 -
2018-06-23 13:49:01 +00:00
svenbarth
ff407c56d9 * extend scanning of $modeswitch to support not only + and -, but also ON and OFF like other switches
+ added tests

git-svn-id: trunk@39280 -
2018-06-22 21:29:08 +00:00
nickysn
f036e67d8f * fixed the reading of OMF groups by the internal linker. Previously, it only
worked, when the files had only one group, called 'DGROUP'.

git-svn-id: trunk@39279 -
2018-06-22 17:00:23 +00:00
nickysn
45337b67fe + when using the i8086 with section based smartlinking, create OMF section
groups, named 'CGROUP' or 'CGROUP_UNITNAME', which include all the code
  sections, that need to be put in the same segment

git-svn-id: trunk@39277 -
2018-06-22 15:02:39 +00:00
nickysn
f07658d3dc * get rid of TOmfRelocation.GetGroupIndex; instead, read the index property of
the group object. This adds support for groups, other than DGROUP, when
  writing omf relocations.

git-svn-id: trunk@39276 -
2018-06-22 14:29:09 +00:00
nickysn
c8fc7c84c8 * avoid adding a section to a group twice in TOmfObjData.createsection
* add all sections, belonging to a group directly inside TOmfObjOutput.AddGroup,
  based on the TObjSectionsGroup.members array

git-svn-id: trunk@39275 -
2018-06-21 21:14:54 +00:00
nickysn
8a34bd22b8 * pass a TObjSectionGroup object as parameter to TOmfObjOutput.AddGroup, instead
of the group name

git-svn-id: trunk@39273 -
2018-06-21 20:45:52 +00:00
nickysn
d3db9e101a * don't check for the presence of the group in TOmfObjOutput.AddSegmentToGroup,
because, it is no longer possible for it to not be present (all the groups
  are added beforehand now)

git-svn-id: trunk@39272 -
2018-06-21 20:33:24 +00:00
nickysn
9a0eca52cb * changed the type of TOmfObjSection.PrimaryGroup from string to
TObjSectionGroup, so instead of holding the group's name, it now points to the
  TObjSectionGroup object, from which you can retrieve its name or any of the
  other fields and properties it contains

git-svn-id: trunk@39271 -
2018-06-21 16:28:06 +00:00
nickysn
42f06acaeb + also create the primary section group and add the newly created section to it
in TOmfObjData.createsection

git-svn-id: trunk@39270 -
2018-06-21 16:14:42 +00:00
nickysn
f4e26f382f + added an 'index' field to TObjSectionGroup, specifying the index of the group
in the object file (similar to TObjSection.index, but for groups, instead of
  sections). Set the new index field, when writing .obj files with the internal
  omf object writer.

git-svn-id: trunk@39269 -
2018-06-21 15:51:58 +00:00
nickysn
ab47c8b899 + introduce the omf_section_primary_group function. Use it instead of
section_belongs_to_dgroup, to allow sections to belong to groups, other than
  dgroup.

git-svn-id: trunk@39268 -
2018-06-21 13:21:53 +00:00
svenbarth
3f96c0baed * use reverse_longword() instead of reverse_byte(); fixes the management operators of records inside classes on big endian systems
git-svn-id: trunk@39265 -
2018-06-20 21:11:19 +00:00
svenbarth
af6f094420 + add reverse_longword() function that reverses the bit pattern for a longword, just like reverse_byte() and reverse_word() do for Byte and Word respectively
git-svn-id: trunk@39264 -
2018-06-20 21:10:19 +00:00
svenbarth
fa0765d131 * regenerate msg*.inc files after addition of the warning for array operators
git-svn-id: trunk@39262 -
2018-06-20 19:54:02 +00:00
svenbarth
fa78bb0e89 * warn if the compiler hides an eventual "+" operator overload if modeswitch ArrayOperators is active
git-svn-id: trunk@39261 -
2018-06-20 19:53:56 +00:00
svenbarth
7522a34a67 + add a message that can be used if an internal operator hides an existing operator overload
git-svn-id: trunk@39260 -
2018-06-20 19:53:50 +00:00
svenbarth
97acf24290 + add a new modeswitch ArrayOperators which is set by default in Delphi modes that enables the internal array operators (currently only "+")
git-svn-id: trunk@39259 -
2018-06-20 19:53:43 +00:00
svenbarth
9b45f58c0b + add flags that allow checking for overloads with isbinaryoverloaded() and isunaryoverloaded() without modifying the passed in node or even checking for normally non-overloadable operators
git-svn-id: trunk@39258 -
2018-06-20 19:53:34 +00:00
svenbarth
8536abce8a * as the management operator feature is not platform specific using a specific define for it aside from a
version check is unnecessary, thus remove the FPC_HAS_MANAGEMENT_OPERATOR define and instead check for VER3_0

git-svn-id: trunk@39257 -
2018-06-20 19:00:24 +00:00
svenbarth
ac0322c323 + add a flags field to the record init RTTI which declares whether
a) the current record contains a field with non-trivial initialization
    b) and of the parents contains such a field (only relevant for objects and classes)

git-svn-id: trunk@39255 -
2018-06-20 19:00:17 +00:00
svenbarth
61bde67082 + add method has_non_trivial_init_child() to tdef which provides access to the symtable's
sto_has_non_trivial_init flag

git-svn-id: trunk@39253 -
2018-06-20 19:00:11 +00:00
svenbarth
cc153176f3 + add a new symtable option sto_has_non_trivial_init that is true if the symtable contains a symbol with an
Initialize() operator (like sto_needs_init_final this flag is calculated on demand)
* increase PPU version

git-svn-id: trunk@39252 -
2018-06-20 19:00:08 +00:00
svenbarth
80ed66f349 * move calculation of sto_needs_init_final to a separate method do_init_final_check()
git-svn-id: trunk@39251 -
2018-06-20 19:00:05 +00:00
nickysn
1631d9ac0a + support segments (sections) with a primary group, other than 'DGROUP' in the
NASM assembler writer

git-svn-id: trunk@39246 -
2018-06-20 16:14:41 +00:00
nickysn
5eb69edf9e + support segments (sections) with a primary group, other than 'DGROUP' in the
OMF internal object writer

git-svn-id: trunk@39245 -
2018-06-20 14:57:20 +00:00
florian
0d168796d7 * patch by J. Gareth Moreton: More Peephole optimizations for AND and MOV
git-svn-id: trunk@39242 -
2018-06-18 20:50:08 +00:00
nickysn
7fcec8460f + parse OMF COMENT records when reading object files and produce error messages
for the records that are not supported, but are important for the executable
  being produced (such as weak/lazy externals, etc.)

git-svn-id: trunk@39241 -
2018-06-18 14:48:04 +00:00
florian
a0b343a787 * patch by J. Gareth Moreton for less invasive DEBUG_AOPTCPU
git-svn-id: trunk@39239 -
2018-06-17 14:56:19 +00:00
nickysn
3aff9d6735 * set MemPos to 0 for each debug .MZ section. This fixes all references within
the debug sections themselves.

git-svn-id: trunk@39235 -
2018-06-15 14:49:43 +00:00
svenbarth
22a5e5e4ee * the symbol parsed for "specialize" does not need to be a type; it could be a procsym or some other type (e.g. a constant of the same name in a third unit)
git-svn-id: trunk@39233 -
2018-06-15 13:49:26 +00:00
svenbarth
598ac21791 * if the generic dummy symbol is a procsym (with procdefs added) then this is the symbol that should be resolved to
git-svn-id: trunk@39232 -
2018-06-15 13:49:21 +00:00
svenbarth
8423fd7632 * also process procsyms when adding a symtable as they may be generic dummy symbols as well
git-svn-id: trunk@39231 -
2018-06-15 13:49:16 +00:00
svenbarth
5510b13975 * ensure that sto_has_generic is set when a generic routine has been parsed
git-svn-id: trunk@39230 -
2018-06-15 13:49:03 +00:00
nickysn
84b5265312 + append a TIS trailer after the debug ELF (this helps the watcom debugger find
the beginning of the ELF debug image)

git-svn-id: trunk@39229 -
2018-06-15 13:41:40 +00:00
nickysn
480eedac9f * fix/pretty print the segment and group list with too long segment/group/class
names in the linker map file, produced by the i8086 internal linker

git-svn-id: trunk@39228 -
2018-06-15 00:03:58 +00:00
nickysn
8af56ad6c8 * fixed silly (caused by copy/paste) bug when writing elf section contents in the dwarf debug binary, produced by TMZExeOutput.writeDebugElf
git-svn-id: trunk@39227 -
2018-06-14 16:29:25 +00:00
nickysn
11cf2a6996 * emit a warning, when encountering an omf reference to a section, that has been
removed due to smartlinking

git-svn-id: trunk@39226 -
2018-06-14 16:22:47 +00:00
nickysn
c41f736958 + allow MemPos_EndExeSection to be called with an empty section name
git-svn-id: trunk@39225 -
2018-06-14 16:17:00 +00:00
nickysn
97365abbcf + set the oso_debug flag to dwarf MZ exe sections
git-svn-id: trunk@39224 -
2018-06-14 16:15:11 +00:00
nickysn
239fb25179 + assign an MZExeUnifiedLogicalSegment object to the OMF dwarf sections, so that
OMF relocations work on them too

git-svn-id: trunk@39223 -
2018-06-14 16:03:05 +00:00
nickysn
7103e3cb5c + set the oso_debug section flags when reading an OMF section, which belongs to
the 'DWARF' class

git-svn-id: trunk@39222 -
2018-06-14 15:27:08 +00:00
nickysn
b7bfac11cb + enable using the i8086 internal linker with debug info, if the compiler is
compiled with -di8086_link_intern_debuginfo

git-svn-id: trunk@39221 -
2018-06-14 15:24:39 +00:00
nickysn
5b47bad32a * use uppercase object section names in the OMF linker script for matching the
dwarf debug sections. This is because they are converted to upper case when
  reading (so that we treat omf section names as case-insensitive)

git-svn-id: trunk@39220 -
2018-06-14 15:19:11 +00:00
nickysn
c56ebad183 + implemented writing of dwarf debug info (by calling writeDebugElf) in
TMZExeOutput.writeData. Note that writing i8086 debug info with the internal
  linker is still disabled (i.e. it switches to external linking) in 
  options.TOption.checkoptionscompatibility

git-svn-id: trunk@39219 -
2018-06-14 14:30:59 +00:00
nickysn
29b3ec3fdb * call MaybeSwapHeader and MaybeSwapSecHeader in TMZExeOutput.writeDebugElf, so
the debug ELF file is generated with the correct endianness

git-svn-id: trunk@39218 -
2018-06-14 13:02:54 +00:00
nickysn
b34ab6b279 * The MaybeSwapXXXHeader functions moved from ogelf to the elfbase unit, so they
can be used by TMZExeOutput.writeDebugElf as well

git-svn-id: trunk@39217 -
2018-06-14 13:01:08 +00:00
nickysn
daa47f4b7f + completed the internal debug ELF writer in TMZExeOutput.writeDebugElf (not
enabled yet)

git-svn-id: trunk@39216 -
2018-06-13 16:08:54 +00:00
svenbarth
be0d51d64c * allow $MinEnumSize, $PackSet and $PackRecords to be used with $Push and $Pop
+ added tests

git-svn-id: trunk@39215 -
2018-06-12 19:40:45 +00:00
svenbarth
da672d1344 * instead of using separate booleans use a set to keep track of pending changes for popped settings
git-svn-id: trunk@39214 -
2018-06-12 19:40:41 +00:00
nickysn
b3e4ace4e3 * fixed compilation of .com files in the i8086 tiny memory model, when used with
section based smartlinking

git-svn-id: trunk@39213 -
2018-06-12 00:38:51 +00:00
nickysn
420a57ddc6 * use upper case OMF section names when using i8086 section-based smart linking
git-svn-id: trunk@39212 -
2018-06-12 00:14:08 +00:00
nickysn
b9ab9e5782 + initial (experimental) implementation of section-based smartlinking for i8086.
Use -dI8086_SMARTLINK_SECTIONS to enable.

git-svn-id: trunk@39211 -
2018-06-11 16:56:33 +00:00
nickysn
bfdd75eabf + support AB_LOCAL symbols in OMF object files, by implementing support for
LPUBDEF/LPUBDEF32 OMF records

git-svn-id: trunk@39210 -
2018-06-11 15:29:23 +00:00
nickysn
188e9ff64a * only read the first OMF record in TOmfLibObjectWriter.closefile, since we no
longer copy the entire file there, so we parse the file only to get the module
  name, and the THEADR record should always be the first record in the OMF file.

git-svn-id: trunk@39198 -
2018-06-08 14:21:18 +00:00
nickysn
3f5577077a * automatically create omf libraries with the smallest page size possible. This
greatly reduces the size of i8086 snapshots by keeping the amount of padding
  in the library files to the minimum.

git-svn-id: trunk@39195 -
2018-06-07 22:27:47 +00:00
nickysn
345713c1fa * refactored omf library writing, so that the whole library is written in
TOmfLibObjectWrite.WriteLib, after determining the page size (currently still
  fixed to 512 bytes). Prerequisite for OMF lib page size optimization.

git-svn-id: trunk@39194 -
2018-06-07 22:11:03 +00:00
nickysn
00c6826896 * moved the PageNum property of TOmfLibObjectWriter.TOmfLibDictionaryEntry to
TOmfLibObjectWriter.TOmfLibObjectModule. Instead, store the module index (in
  FObjectModules) in TOmfLibDictionaryEntry. This is a prerequisite for
  implementing OMF library page size optimization.

git-svn-id: trunk@39193 -
2018-06-07 18:32:50 +00:00
nickysn
4bcfe8dbb2 * refactored TOmfLibObjectWriter, so it keeps all object modules in a
TFPObjectList. This will allow implementing omf library page size optimization
  later.

git-svn-id: trunk@39192 -
2018-06-07 15:03:05 +00:00
nickysn
af5e6e182d * the TOmfLibDictionaryEntry class in unit owomflib converted to two identical
nested classes inside TOmfLibObjectWriter and TOmfLibObjectReader. The reason
  is I'm planning to change the class, used in TOmfLibObjectWriter, but not the
  one in TOmfLibObjectReader. And using nested classes keeps things clean and
  avoids exposing implementation details in the interface of the owomflib unit.
* also changed 'private' to 'strict private' in the classes of the owomflib to
  reduce the risk of interference between TOmfLibObjectWriter and TOmfLibObjectReader.

git-svn-id: trunk@39191 -
2018-06-07 12:24:36 +00:00
Károly Balogh
bbbaa39d79 ncginl: another approach to fix the same issue #39184 supposed to address. keep left.resultdef, but try to make the target def always ordinal of an equal size, so it ends up in a data register on m68k
git-svn-id: trunk@39188 -
2018-06-07 06:43:02 +00:00
Károly Balogh
3286623c3c ncginl: revert the previous commit, it seems to cause some issues on other CPUs
git-svn-id: trunk@39186 -
2018-06-07 06:21:46 +00:00
Károly Balogh
42efddc481 ncginl: in inc/dec, do not use left.resultdef as the dest to force a register location, because if left is a pointer, then an ordinal value might get forced into an address register on m68k, which results in a lot of unnecessary register shuffling to complete the operation
git-svn-id: trunk@39184 -
2018-06-07 06:04:19 +00:00
Károly Balogh
ddf8788c7a m68k: try to generate better code from some pointermath - when the left is an address register and we do add/sub, also allocate an address register as temp, also only require that left and right sizes are same, when right is not a const
git-svn-id: trunk@39174 -
2018-06-05 16:45:02 +00:00
nickysn
e6a8c058e0 * moved the handling of LIDATA OMF records (which currently only produces a
'LIDATA records are not supported' error) to TOmfObjInput.ReadLeOrLiDataAndFixups

git-svn-id: trunk@39171 -
2018-06-04 14:20:07 +00:00
nickysn
02fc2827e0 * TOmfObjInput.ReadLEDataAndFixups renamed ReadLeOrLiDataAndFixups
git-svn-id: trunk@39170 -
2018-06-04 14:10:11 +00:00
nickysn
e410a0aefb + support OMF FIXUPP records, containing only THREAD subrecords to occur without
a preceding LEDATA or LIDATA record (this is allowed by the OMF spec)

git-svn-id: trunk@39169 -
2018-06-04 14:00:36 +00:00
nickysn
002b116322 * use a case statement, instead of 'if', based on the OMF record type in
TOmfObjInput.ReadLEDataAndFixups. This is to allow (in the future) handling of
  LIDATA records and FIXUPP records without preceding LEDATA/LIDATA. No
  functional changes in this commit.

git-svn-id: trunk@39166 -
2018-06-04 13:11:55 +00:00
florian
21d785e41b * do not unroll loops if the counter variable is accessed outside the current scope
git-svn-id: trunk@39163 -
2018-06-03 15:12:48 +00:00
florian
3b3e33d863 + correctly set var state of addr and frame in raise statements, resolves #33818
git-svn-id: trunk@39162 -
2018-06-03 09:31:19 +00:00
florian
f03a396757 * target classic MacOS builds again
git-svn-id: trunk@39156 -
2018-05-31 19:31:36 +00:00
nickysn
98634899f2 + support OMF fixups, determined by thread
git-svn-id: trunk@39151 -
2018-05-30 15:49:27 +00:00
nickysn
2fb73de404 + support reading OMF files with THREAD FIXUPP subrecords; note that fixups,
determined by thread are still not yet implemented

git-svn-id: trunk@39150 -
2018-05-30 14:30:54 +00:00
nickysn
ebecfb1ce9 + added a FFixupThreads property with a TOmfThreads object to TOmfObjInput
git-svn-id: trunk@39149 -
2018-05-30 14:10:12 +00:00
nickysn
189cba817e + added method TOmfSubRecord_THREAD.ApplyTo, which applies the data in the
current thread subrecord to a TOmfThreads object

git-svn-id: trunk@39148 -
2018-05-30 13:52:34 +00:00
nickysn
26e808e155 + added classes for maintaining the OMF fixup thread state
git-svn-id: trunk@39147 -
2018-05-30 13:35:52 +00:00
nickysn
49b414ffee + support ugly constructs like 'DD BYTE PTR 5' in the x86 intel syntax inline
assembler; these are TP7 and Delphi compatible

git-svn-id: trunk@39143 -
2018-05-29 15:43:08 +00:00
nickysn
54a8d8de58 + added class for decoding/encoding THREAD OMF subrecords
git-svn-id: trunk@39142 -
2018-05-29 15:05:07 +00:00
pierre
b1537a7f40 Add some more debug information to temp-generation when compiled with -dEXTDEBUG
git-svn-id: trunk@39141 -
2018-05-28 22:39:21 +00:00
nickysn
052da5c921 * use DW_OP_reg0..DW_OP_reg31 instead of DW_OP_regx in TDebugInfoDwarf.append_seg_reg
in case the dwarf register number is 31 or smaller

git-svn-id: trunk@39131 -
2018-05-28 14:21:53 +00:00
svenbarth
f077c7d950 + add support for Unicode code point constants > $FFFF; they are converted to a surrogate pair so they are in
fact a UnicodeString constant
+ added tests

git-svn-id: trunk@39123 -
2018-05-27 14:06:19 +00:00
pierre
a1bbd4c02d Try to avoid inserting all RTTI symbols into executables on targets not supporting smartlinked sections
git-svn-id: trunk@39121 -
2018-05-25 20:44:24 +00:00
nickysn
ad96cf758b + emit a DW_AT_address_class dwarf attribute on i8086 for procdefs, indicating
their call model (near or far)

git-svn-id: trunk@39120 -
2018-05-25 20:03:15 +00:00
svenbarth
199b5809a3 * optimize "dynarr := dynarr + [elem]" to "Insert(elem, dynarr, High(SizeInt))" and "dynarr := [elem] + dynarr" to "Insert(elem, dynarr, 0)" (we need to do this in the typecheck of taddnode as otherwise the array constructor is already converted)
+ added test
* adjusted test for Mantis #30463 as p1 triggers the optimization as well

git-svn-id: trunk@39119 -
2018-05-25 16:03:56 +00:00
svenbarth
85439a0fa0 * also check for nf_assign_done_in_right flag after typechecking the right side
git-svn-id: trunk@39118 -
2018-05-25 15:54:41 +00:00
nickysn
22e8763100 + generate script code for creating the dwarf exe sections when using the
internal linker with dwarf debug info enabled on i8086-msdos

git-svn-id: trunk@39117 -
2018-05-25 15:35:17 +00:00
nickysn
f505718e6c + started implementing TMZExeOutput.writeDebugElf; nothing is written yet, only
the elf header fields are filled with the values, generated by wlink

git-svn-id: trunk@39115 -
2018-05-25 14:20:13 +00:00
nickysn
6bd99b65bf + emit DW_AT_frame_base dwarf attributes on i8086. Even though the Watcom
Debugger doesn't require them (it uses BP as the frame register by default),
  the dwarf spec requires that we emit them on i8086, because we also use
  DW_OP_fbreg on i8086.

git-svn-id: trunk@39112 -
2018-05-24 22:49:12 +00:00
nickysn
c5fe78201c + emit DW_OP_bregx dwarf ops for local variables and parameters, relative to BP
on i8086. This fixes Watcom Debugger not showing them right in memory models,
  where DS<>SS (Watcom seems to ignore the DW_AT_segment attribute for register
  relative variables, even though we emit it correctly :/ )

git-svn-id: trunk@39111 -
2018-05-24 22:27:11 +00:00
nickysn
855c810c09 + emit a DW_AT_WATCOM_memory_model dwarf attribute, when compiling for i8086
git-svn-id: trunk@39110 -
2018-05-24 21:59:50 +00:00
nickysn
87e1fa8fc7 + added enum with the values for DW_AT_WATCOM_memory_model
git-svn-id: trunk@39109 -
2018-05-24 21:50:55 +00:00
nickysn
dc12d4d789 + added constants with the watcom dwarf attribute extensions
git-svn-id: trunk@39108 -
2018-05-24 21:49:28 +00:00
nickysn
749872aaf7 + generate DW_AT_segment dwarf attribute for local variables and parameters on i8086
git-svn-id: trunk@39107 -
2018-05-24 21:30:37 +00:00
nickysn
217c75f84e + generate dwarf DW_AT_address_class attributes for pointer types on i8086
git-svn-id: trunk@39106 -
2018-05-24 20:22:59 +00:00
nickysn
76fb8c3afd * fix for dwarf debug info generation of localsym vars with offset (thx Pierre for spotting this)
git-svn-id: trunk@39104 -
2018-05-24 16:31:01 +00:00
nickysn
69fbf0e0d8 * use unaligned constants, when writing the final dwarf arange record on i8086
git-svn-id: trunk@39103 -
2018-05-24 15:43:02 +00:00
pierre
a5a6b70658 Add tf_no_pic_supported to go32v2 target (was generating wrong code)
git-svn-id: trunk@39102 -
2018-05-23 21:12:56 +00:00
pierre
f80e73eac2 Remove references to sym variable when not set (revealed warning generated when compiling with -O4 option)
git-svn-id: trunk@39101 -
2018-05-23 20:45:21 +00:00
pierre
019da9517f Set return value when calling inherited in ti8086inlinenode.pass_typecheck_cpu
git-svn-id: trunk@39100 -
2018-05-23 20:43:40 +00:00
nickysn
5417eb043d * fix for the encoding of dwarf debug info of local variables, whose base is a
register that has a dwarf register number higher than 31

git-svn-id: trunk@39099 -
2018-05-23 15:58:51 +00:00
nickysn
e5de7d0eac * set all 16/32-bit specific stabs/dwarf register numbers of x86_64-only
registers to -1 in x86reg.dat. The values that used to be there weren't used
  at all (most were just copies of the 32-bit version of the register). This can
  be easily demonstrated by the fact that running 'make regdat' in the compiler
  directory doesn't change any of the generated files for i8086/i386/x86_64.

git-svn-id: trunk@39098 -
2018-05-23 15:29:33 +00:00
nickysn
a275d15da2 + added an i8086-specific column in x86reg.dat for the dwarf register numbers
and filled it with the dwarf register mapping, used by Open Watcom (Watcom
  also uses this mapping on i386, but we don't need to support their debugger on
  i386 for now)

git-svn-id: trunk@39097 -
2018-05-23 15:12:58 +00:00
nickysn
6f44deb557 + implemented the -Xg option for putting the debug information in a separate
file on i8086-msdos and i8086-win16

git-svn-id: trunk@39096 -
2018-05-22 15:33:26 +00:00
nickysn
0a01c0c76f * autoswitch to writing 32-bit SEGDEF OMF records if there's a need to encode a
32-bit segment length

git-svn-id: trunk@39095 -
2018-05-22 14:03:59 +00:00
nickysn
70be0dc6e9 * changed internal error number to make it unique
git-svn-id: trunk@39094 -
2018-05-22 13:49:40 +00:00
nickysn
8c842c1337 * changed the type of the 'size' parameter of TOmfObjOutput.AddSegment to
TObjSectionOfs instead of aword

git-svn-id: trunk@39093 -
2018-05-22 13:48:55 +00:00
nickysn
f5862efcd4 + support writing 32-bit LEDATA OMF records
git-svn-id: trunk@39092 -
2018-05-22 13:23:56 +00:00
nickysn
99f2f3d4b6 * changed the TObjRelocation.DataOffset and orgsize types to TObjSectionOfs instead of aword
git-svn-id: trunk@39091 -
2018-05-22 13:17:35 +00:00
nickysn
dcdfecbf35 * changed internal error number to make it unique
git-svn-id: trunk@39090 -
2018-05-22 12:55:53 +00:00
nickysn
a656d98657 * autoswitch to writing 32-bit PUBDEF OMF records if there's a need to encode a
32-bit offset

git-svn-id: trunk@39089 -
2018-05-22 12:54:11 +00:00
nickysn
ca50b14e21 * set the omf section size limit to 32-bit for the dwarf debug sections
git-svn-id: trunk@39088 -
2018-05-22 12:41:51 +00:00
nickysn
065a7b63d9 * changed the TObjSectionOfs type to be longword on i8086
+ introduced the TObjSection.SizeLimit property. This will allow setting
  different size limits for different sections (e.g. 32-bit for the dwarf
  sections, 16-bit for the regular code and data sections on i8086).

git-svn-id: trunk@39087 -
2018-05-22 09:48:28 +00:00
nickysn
584635c591 + introduce align_objsecofs; use it to align integers of type TObjSectionOfs
git-svn-id: trunk@39086 -
2018-05-22 00:20:21 +00:00
nickysn
f9748e928b * also changed the type of the 'DataPos' parameter of TObjData.layoutsections to TObjSectionOfs
git-svn-id: trunk@39085 -
2018-05-21 16:48:56 +00:00
nickysn
04129b8c6e + introduce the TObjSectionOfs type - an unsigned integer, representing an
offset in an obj file section on the current platform; equal to PUInt for now,
  but will probably change to LongWord on i8086, in order to support 32-bit
  sections (needed for dwarf debug info or when linking with 32-bit object files
  in a mixed 16-bit/32-bit application, while using the internal linker)

git-svn-id: trunk@39084 -
2018-05-21 16:31:50 +00:00
florian
8f472d5212 * check for more controll flow statements before doing loop unrolling
git-svn-id: trunk@39083 -
2018-05-21 15:46:02 +00:00
nickysn
308e439d5d + emit segment information in the dwarf debug info for static variables on i8086
git-svn-id: trunk@39082 -
2018-05-21 15:30:58 +00:00
nickysn
76ff01beda + also emit the non-standard DW_LNE_set_segment watcom extended opcode in the
dwarf line info on i8086

git-svn-id: trunk@39081 -
2018-05-21 14:54:11 +00:00
nickysn
9d167dbd2a + emit DW_AT_segment attributes in the dwarf debug info for subroutines
(DW_TAG_subprogram) on i8086

git-svn-id: trunk@39080 -
2018-05-21 14:40:39 +00:00
svenbarth
4354821f05 * regenerate msg* files after r39078
git-svn-id: trunk@39079 -
2018-05-21 08:14:21 +00:00
svenbarth
b7cc225149 * revert r39043 and r39045 which disallow static array constants inside dynamic constants for Delphi modes
git-svn-id: trunk@39078 -
2018-05-21 08:13:17 +00:00
nickysn
4aa66d9033 * emit a 32-bit offset for DW_FORM_ref_addr on i8086 (Watcom compatibility)
git-svn-id: trunk@39077 -
2018-05-21 01:36:23 +00:00
nickysn
d1cdd8be7c * do not emit padding bytes after the dwarf arange header on i8086 for
compatibility with Open Watcom (also, the dwarf spec is not very clear about
  the alignment requirements on segmented architectures, so that's why we do
  this by default, instead of putting it behind a -go debug switch)

git-svn-id: trunk@39075 -
2018-05-20 22:50:46 +00:00
nickysn
1a2f364e68 * use 32-bit address_size in the dwarf arange sections on i8086 (for Open Watcom
compatibility)

git-svn-id: trunk@39074 -
2018-05-20 21:59:32 +00:00
nickysn
0efb86518b + emit dwarf segment information on i8086 in the .debug_aranges section
git-svn-id: trunk@39073 -
2018-05-20 21:28:26 +00:00
nickysn
651571c00f + added comments, indicating where we emit the address_size and segment_size
fields of the dwarf arange header

git-svn-id: trunk@39072 -
2018-05-20 21:21:26 +00:00
nickysn
a12622e06f * use 1-byte alignment instead of 4-byte alignment for the OMF dwarf sections
(otherwise the alignment screws up the dwarf debug info)

git-svn-id: trunk@39071 -
2018-05-20 20:59:39 +00:00
nickysn
b048da4284 + added the non-standard Open Watcom DWARF extension DW_LNE_set_segment extended
opcode constant; not emitted yet; will be needed on i8086

git-svn-id: trunk@39048 -
2018-05-20 12:25:03 +00:00
svenbarth
dcdb151add * prohibit static array constants inside dynamic array constants for Delphi modes
+ added test

git-svn-id: trunk@39045 -
2018-05-20 11:50:27 +00:00
svenbarth
31a9ed573c * regenerate msg* files after addition of the new message for static array constants inside dynamic array
constants

git-svn-id: trunk@39044 -
2018-05-20 11:50:24 +00:00
svenbarth
74ca92b5dc + add a message that will be used to complain about static array constants inside dynamic array constants for
Delphi modes

git-svn-id: trunk@39043 -
2018-05-20 11:50:21 +00:00
svenbarth
a29a6abc55 + add support for Delphi's dynamic array constant syntax ("[...]") in Delphi modes
git-svn-id: trunk@39042 -
2018-05-20 11:50:19 +00:00
svenbarth
08dd4e5445 + add support for dynamic array constants
+ added test

git-svn-id: trunk@39041 -
2018-05-20 11:50:16 +00:00
svenbarth
2bf5c28077 + add methods begin_dynarray_const and end_dynarray_const which can be used to emit the data of a dynamic array
inbetween
+ add method emit_dynarray_offset to emit a reference to that data with the correct offset

git-svn-id: trunk@39040 -
2018-05-20 11:50:13 +00:00
svenbarth
e863245021 + add method get_dynarray_symofs to retrieve the platform specific offset of the dynamic array data from its
meta data record

git-svn-id: trunk@39039 -
2018-05-20 11:50:11 +00:00
svenbarth
d3d9221c8d + add method get_dynarray_header_size to retrieve the size of the dynamic array meta data record
git-svn-id: trunk@39038 -
2018-05-20 11:50:09 +00:00
svenbarth
2eac60cd87 * use a unique internal error
git-svn-id: trunk@39024 -
2018-05-18 14:43:31 +00:00
nickysn
9a4a61ab97 * automatically switch to external linking (and show message) when requested to
generate debug info on the i8086 targets

git-svn-id: trunk@39017 -
2018-05-17 16:11:51 +00:00
nickysn
3e343dff21 + enable by default the ds_dwarf_omf_linnum debug switch on i8086, since that's
the only currently working option for getting source level debugging on
  i8086-msdos

git-svn-id: trunk@39016 -
2018-05-17 15:02:34 +00:00
nickysn
20abb13bca - do not compile in the stabs debug info support for the i8086 target
git-svn-id: trunk@39015 -
2018-05-17 14:47:39 +00:00
nickysn
600b460ecd + added new debug output option -godwarfomflinnum for generating line number
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 -
2018-05-17 14:38:50 +00:00
nickysn
3d6d020fca + implemented the actual writing of LINNUM OMF records
git-svn-id: trunk@39008 -
2018-05-16 17:37:28 +00:00
nickysn
61e6d2afec + introduce asd_omf_linnum_line directives; they will be used for writing LINNUM
entries in the OMF object format

git-svn-id: trunk@39007 -
2018-05-16 17:05:02 +00:00
nickysn
b80642c384 + started implementing support for generating Microsoft CodeView debug
information. Only enabled on i8086 (for now). Does not do much yet, but
  hopefully, soon it'll start emitting line number information for i8086-msdos
  that is usable by DOS debuggers.

git-svn-id: trunk@39006 -
2018-05-16 15:25:33 +00:00
nickysn
42164b5c01 + omf writer: support writing partial LINNUM records (up to 1024 bytes,
according to the spec)

git-svn-id: trunk@38995 -
2018-05-15 14:45:22 +00:00
nickysn
2741a30f20 + added method TOmfSubRecord_LINNUM_MsLink_LineNumberList.Clear
git-svn-id: trunk@38970 -
2018-05-10 14:16:29 +00:00
nickysn
0b296ac828 * extracted the parts of the TOmfRecord_LINNUM_MsLink class, which implement a
container of TOmfSubRecord_LINNUM_MsLink_Entry objects to a separate class
  TOmfSubRecord_LINNUM_MsLink_LineNumberList

git-svn-id: trunk@38968 -
2018-05-10 13:56:11 +00:00
nickysn
718e83954f * merge duplicate strings in the LNAMES section, when writing OMF object
modules. This results in slightly smaller obj files.

git-svn-id: trunk@38967 -
2018-05-10 13:07:32 +00:00
nickysn
fc9d331b42 + added classes for reading/writing LINNUM OMF records in the Microsoft LINK
specific format

git-svn-id: trunk@38959 -
2018-05-09 14:55:34 +00:00
pierre
1a23672e7b Make sure to set alignment of new temp slot to new value
git-svn-id: trunk@38954 -
2018-05-08 21:35:11 +00:00
nickysn
ba2c06a239 + added class for reading/writing LINNUM (line number debug info) records in the
OMF object format

git-svn-id: trunk@38953 -
2018-05-08 16:00:51 +00:00
nickysn
02fb59d3e5 * unified the definition of pushleftright_pocalls on i8086 and i386
git-svn-id: trunk@38952 -
2018-05-08 14:27:36 +00:00
svenbarth
a33bf83822 * regenaret msg*.inc after r38941 and r38942
git-svn-id: trunk@38945 -
2018-05-07 19:50:24 +00:00
svenbarth
576a50f690 * print used unit scopes
git-svn-id: trunk@38944 -
2018-05-07 19:48:26 +00:00
svenbarth
295ca4de4b * adjust WritePathList() to work with TCmdStrList instead of TSearchPathList (and rename it accordingly)
git-svn-id: trunk@38943 -
2018-05-07 19:48:23 +00:00
svenbarth
56f36e6509 + add a diagnostic mesage for the used unit scopes
git-svn-id: trunk@38942 -
2018-05-07 19:48:20 +00:00
svenbarth
aa38d6f831 * adjust text for -FN<x> to include both "namespace" and "unit scope"
git-svn-id: trunk@38941 -
2018-05-07 19:48:16 +00:00
svenbarth
11f673a991 * also allow a ";"-separated list of namespaces for -FN
+ added test

git-svn-id: trunk@38939 -
2018-05-06 21:16:51 +00:00
nickysn
d9925f7074 - removed pocall_far16 from the supported calling conventions of the i8086
code generator

git-svn-id: trunk@38938 -
2018-05-06 15:14:40 +00:00
nickysn
eb95dcb85f - removed pocall_mwpascal from the supported calling conventions of the i8086
code generator

git-svn-id: trunk@38937 -
2018-05-06 14:40:08 +00:00
nickysn
4fbc658184 - removed check for system_i386_wince in i8086's cpupara
git-svn-id: trunk@38936 -
2018-05-06 14:30:05 +00:00
nickysn
0a12bc4697 - removed pocall_oldfpccall from the supported calling conventions of the i8086
code generator

git-svn-id: trunk@38935 -
2018-05-06 14:07:31 +00:00
nickysn
55ecc7feff - removed the check for pocall_oldfpccall from ncgutil.gen_save_used_regs and
gen_restore_used_regs. This is now handled by get_saved_registers_int in
  cpupara.

git-svn-id: trunk@38934 -
2018-05-06 12:41:40 +00:00
svenbarth
ffe788fcad * regenerate msg{idx,txt}.inc after r38920
git-svn-id: trunk@38922 -
2018-05-05 17:23:03 +00:00
svenbarth
7e1a058bb2 * document new -FN<x> option
git-svn-id: trunk@38920 -
2018-05-05 17:18:50 +00:00
svenbarth
760e1f3776 * default namespaces are specified using the new -FN<x> option whereby <x> is the namespace to be added to the
list of default namespaces

git-svn-id: trunk@38919 -
2018-05-05 17:18:47 +00:00
svenbarth
8bc0b604db * a symbol might be specified using a partial namespace path as long as the missing part is a namespace symbol,
so handle that correctly in try_consume_unitsym()

git-svn-id: trunk@38918 -
2018-05-05 17:18:45 +00:00
svenbarth
35bddf6fb1 * correctly update the (now unregistered) unit symbol if the unit was found with the help of a default namespace
(this is needed to trigger the correct creation of the namespace symbols)

git-svn-id: trunk@38917 -
2018-05-05 17:18:42 +00:00
svenbarth
083781bf0c * keep track if the unit was found by using a default namespace as prefix
git-svn-id: trunk@38916 -
2018-05-05 17:18:39 +00:00
svenbarth
99c53abf36 * also take into account default namespace when looking for a unit:
if looking for a unit's PPU or source failed (and no explicit name was specified)
    then all namespaces are walked in the order they were given in and then first the
    PPU is looked for and then the source

git-svn-id: trunk@38915 -
2018-05-05 17:18:37 +00:00
svenbarth
b77b6b001f + add a global that will contain all default namespaces passed in as parameters
git-svn-id: trunk@38914 -
2018-05-05 17:18:34 +00:00
svenbarth
e7f29e9e28 * also pass the pattern with which the potential unit/namespace symbol had been found to try_consume_unitsym*()
git-svn-id: trunk@38913 -
2018-05-05 17:18:31 +00:00