Commit Graph

48246 Commits

Author SHA1 Message Date
svenbarth
56ae2d34b2 Ensure that (Bit)SizeOf(GenericParameter) returns a sensible value in case of constants (which are evaluated at compile time unlike if occuring in code)
pdecl.pas, readconstant:
  * instead of 0 return 1 for SizeOf() and 8 for BitSizeOf() if the argument is a generic parameter

git-svn-id: trunk@33323 -
2016-03-24 20:51:58 +00:00
nickysn
9a2f5e01d7 + added range checking for the immediate operand of NEC V20/V30's instructions CLR1, SET1, NOT1 and TEST1
git-svn-id: trunk@33322 -
2016-03-24 16:05:11 +00:00
nickysn
0be6d062ac + added range checking for the imm4 operand of NEC V20/V30's instructions
'EXT reg8,imm4' and 'INS reg8,imm4'

git-svn-id: trunk@33321 -
2016-03-24 15:45:23 +00:00
nickysn
be83ae47b9 + support NEC V20/V30's REPC/REPNC prefixes in the assembler reader
git-svn-id: trunk@33320 -
2016-03-24 14:25:32 +00:00
nickysn
a79676bd1c * fixed assembly of the NEC V20/V30 BRKEM instruction
git-svn-id: trunk@33319 -
2016-03-24 13:38:05 +00:00
nickysn
a376229d80 - removed IF_CYRIX and IF_AMD from the TODO list of instructions, that we're
supposed to handle in the i8086 internal asm instruction level check, because
  these two flags are no longer part of the IF_PLEVEL mask, after r33316

git-svn-id: trunk@33318 -
2016-03-23 15:24:59 +00:00
nickysn
5f87ac5d47 + added 486 to the list of supported CPUs on the i8086 and i386 targets
git-svn-id: trunk@33317 -
2016-03-23 15:07:56 +00:00
nickysn
867a4881ba * changed the codes of the IF_CYRIX and IF_AMD instruction flags, to avoid
messing up the other Intel-compatible processor flag, they're used with

git-svn-id: trunk@33316 -
2016-03-23 14:00:48 +00:00
marco
27f20503ab * some constants added.
git-svn-id: trunk@33315 -
2016-03-22 21:04:52 +00:00
nickysn
c4343c1a2d * don't call make_simple_ref in tcgx86.g_concatcopy on i8086, because that
screws up the handling of segmented references badly and breaks the large,
  compact and huge memory models completely

git-svn-id: trunk@33314 -
2016-03-22 13:56:10 +00:00
yury
a37cd66a87 * trwsync test: Increased timeout to 30 seconds. Should prevent failures on busy machines.
git-svn-id: trunk@33313 -
2016-03-22 10:16:25 +00:00
nickysn
6d4dfb5595 * fixed compilation of sysutils on i8086-msdos after r33290
git-svn-id: trunk@33312 -
2016-03-21 21:09:27 +00:00
michael
a9fe42b5f0 * Generic linked list class, donated by Denis Volodarsky (bug ID 24501)
git-svn-id: trunk@33311 -
2016-03-21 21:01:38 +00:00
michael
e9cdfaae9f * Fix writing of control characters (bug ID 29867)
git-svn-id: trunk@33310 -
2016-03-21 19:29:29 +00:00
yury
af1ea62ff7 * i386-android: By default set CPU type to PentiumM and FPU to SSSE3 according to Android x86 ABI.
git-svn-id: trunk@33309 -
2016-03-21 09:53:18 +00:00
yury
3c6d4f1ee2 * Removed unused vars.
git-svn-id: trunk@33308 -
2016-03-21 09:21:24 +00:00
yury
cac16fa60e * Small refactor of the arm defaults for better readability.
git-svn-id: trunk@33307 -
2016-03-21 09:19:02 +00:00
Jeppe Johansen
681b06bc90 Fixed more linkerscript errors.
git-svn-id: trunk@33306 -
2016-03-21 08:19:45 +00:00
michael
2af6b236b7 * Fix failing testcase
git-svn-id: trunk@33305 -
2016-03-20 22:48:46 +00:00
yury
d7cc0064d3 * Disabled test for android.
git-svn-id: trunk@33304 -
2016-03-20 22:09:45 +00:00
yury
3a5412a931 * Disabled tests which force the -Cg- option for Android since they can not be run on Android 5+ where PIE is required.
git-svn-id: trunk@33303 -
2016-03-20 21:52:05 +00:00
yury
d43e5dcab8 * tests: Fixed string comparison.
git-svn-id: trunk@33302 -
2016-03-20 21:25:18 +00:00
yury
a1b8c0f9e3 * Improved FPC version check when to use WaitOnExit().
git-svn-id: trunk@33301 -
2016-03-20 20:03:45 +00:00
michael
5085009410 * Added GetDriveIDFromLetter, bug ID #28318
git-svn-id: trunk@33300 -
2016-03-20 19:04:49 +00:00
michael
f1a7d07f8e * Fix bug ID #29393
git-svn-id: trunk@33299 -
2016-03-20 17:55:16 +00:00
michael
6ab9435e44 * Alternat implementation based on event, from Derek (Bug ID 28831)
git-svn-id: trunk@33298 -
2016-03-20 16:51:27 +00:00
michael
8f9899e5c4 * Fix bug #27032, order of operations when parsing a.b[c]
git-svn-id: trunk@33297 -
2016-03-20 14:09:18 +00:00
michael
505d3f1f0e * Small formatting change
git-svn-id: trunk@33296 -
2016-03-20 14:08:45 +00:00
marco
cc8868c190 * enabled librsvg build on win64 after confirmation that it works. (Mantis #28240)
git-svn-id: trunk@33295 -
2016-03-20 13:15:44 +00:00
michael
0a1a6f075e * Reduce code size by using const for string in setter routines
git-svn-id: trunk@33294 -
2016-03-20 08:59:35 +00:00
michael
998b6665e2 * Fix wrong ref. count for properties that are dynamic arrays (bug ID 29487)
git-svn-id: trunk@33293 -
2016-03-20 08:41:37 +00:00
marcus
b396d34364 Amicommon: Fixed compilation after r33290
git-svn-id: trunk@33292 -
2016-03-20 06:45:00 +00:00
marco
02dbec2085 * X,YPelsPerMeter properties. Kept old (not logical) default of 100 out of compatibility. Bug #29852
git-svn-id: trunk@33291 -
2016-03-19 20:40:55 +00:00
marco
66608fec02 * unicode executeprocess from work during Lazarus convention in IJsselstein
git-svn-id: trunk@33290 -
2016-03-19 17:59:42 +00:00
svenbarth
7845362701 powerpc/agppcmpw.pas:
* getopstr: implement the case that refadr is addr_pic_no_got (we'll have to see whether this really works though...)

git-svn-id: trunk@33289 -
2016-03-19 12:38:53 +00:00
svenbarth
854c67175a powerpc/agppcmpw.pas, TPPCMPWAssembler:
* WriteTree: implement the ait_realconst case by calling WriteRealConstAsBytes
  * WriteTree: remove commented code handling the old constants

git-svn-id: trunk@33288 -
2016-03-19 12:37:17 +00:00
svenbarth
9d4e322cd0 Add AT_FUNCTION or AT_DATA to calls to (Weak)RefAsmSymbol. powerpc-macos needs them.
git-svn-id: trunk@33287 -
2016-03-19 12:29:21 +00:00
svenbarth
464941f039 At least in principle prepare the Mach-O writer for other CPU types.
ogmacho.pas:
  + TMachoObjectOutput: new method current_cpu_type to retrieve the cpu_type_t matching the compiler's target platform
  * TMachoObjectOutput.writedata: initialize cputarget using current_cpu_type and use cputarget instead of CPU_TYPE_I386 in the call to AllocMachoWriter
  * surround the RegisterAssembler call with ifdefs for i386

git-svn-id: trunk@33286 -
2016-03-19 12:22:55 +00:00
svenbarth
e243cc77ea macho.pas:
+ add CPU_TYPE_ARM64 for sake of completeness

git-svn-id: trunk@33285 -
2016-03-19 12:18:16 +00:00
svenbarth
123ef01a7a Forgot to commit this...
systems.pas:
  + add new constant systems_indirect_var_imports to denote all targets that /require/ indirect references for cross-unit variables accesses

git-svn-id: trunk@33284 -
2016-03-18 22:41:51 +00:00
svenbarth
c4449fc5e6 nx86ld.pas, tx86loadnode:
* generate_threadvar_access: pass result of use_indirect_symbol() to RefAsmSymbol() to use an indirect access if necessary

git-svn-id: trunk@33283 -
2016-03-18 22:39:41 +00:00
svenbarth
e4feacf29d Load global variables and typed constants from different units using indirect references if necessary.
ncgld.pas, tcgloadnode:
  + new method use_indirect_symbol to determine whether using an indirect reference is necessary at all
  * generate_threadvar_access & pass_generate_code: pass result of use_indirect_code() to RefAsmSymbol() for using an indirect access if needed

git-svn-id: trunk@33282 -
2016-03-18 22:27:28 +00:00
svenbarth
86b9381673 Add new Delphi compatible switch {$G+/-}, {$IMPORTEDDATA ON/OFF} which handles generation of indirect references for cross unit variable accesses if needed for the target.
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 -
2016-03-18 22:04:57 +00:00
svenbarth
f297b00f5b Extend the x86 targets by the ability to handle indirect symbols.
x86/cgx86.pas, tcgx86:
  + new method make_direct_ref() which is used to convert an indirect reference into a direct one (uses the boolean field in_make_direct_ref to avoid recursive calls)
  * make_simple_ref: call make_direct_ref() before anything else
  * a_loadaddr_ref_ref: call make_direct_ref() (the loading could probably be folded into the loadaddr method, but for now that is sufficent)
i386/cgcpu.pas, tcg386:
  * a_loadaddr_ref_cgpara: call make_direct_ref(); the same remark as for a_loadaddr_ref_ref() applies here

git-svn-id: trunk@33280 -
2016-03-18 21:45:41 +00:00
svenbarth
6722c611cf Generate indirect symbols for global variables and (typed) constants.
Note: It needs to be checked what adjustments will need to be done for JVM and LLVM

Note 2: The indirect symbols will always be generated even if the target won't use them so that assembler code can be consistent among the targets (e.g. i386-win32 needs them while i386-linux does not)

ptconst.pas, read_typed_const:
  * generate the indirect symbol in a read only data section
ngenutil.pas, tnodeutils:
  * insertbsssym: generate the indirect symbol in a read only data section

git-svn-id: trunk@33279 -
2016-03-18 21:40:11 +00:00
svenbarth
3971ba7898 Provide basic facilities to handle indirect symbols that are needed for proper dynamic packages support.
symconst.pas:
  + new constant suffix_indirect which will be used to denote indirect symbols
aasmbase.pas:
  * TAsmsymbind: extend by AB_INDIRECT (which is used to define an indirect symbol) and AB_EXTERNAL_INDIRECT (which is used when an unknown indirect symbol is requested)
  * asmsymbindname: adjust for TAsmsymbind changes
  + new constant asmsymbindindirect which is a set of both indirect asm symbol binds
aasmdata.pas, TAsmData:
  * DefineAsmSymbolByClass: adjust to correctly declare an indirect symbol (with suffix_indirect) if one of the indirect asm symbol binds is used
  * RefAsmSymbol: extend by a boolean parameter which is used to request an indirect symbol (usually AB_EXTERNAL_INDIRECT instead of AB_EXTERNAL)

git-svn-id: trunk@33278 -
2016-03-18 21:34:17 +00:00
svenbarth
77ede2ac9f i386/cgcpu.pas, tcg386:
* a_load_ref_cgpara: call make_simple_ref() before calling the base a_load_ref_cgpara()
x86/cgx86.pas, tcgx86:
  * a_loadfpu_ref_reg, a_loadfpu_reg_ref, g_concatcopy: call make_simple_ref() on the passed references

git-svn-id: trunk@33277 -
2016-03-18 21:22:04 +00:00
nickysn
759a4f8258 * don't try to build lnfodwrf on i8086-msdos, because it causes internal error
200309041 and thus breaks building i8086-msdos snapshots entirely. Added test
  that reproduces the bug in a small program, so it can be fixed eventually.

git-svn-id: trunk@33276 -
2016-03-18 19:56:37 +00:00
svenbarth
e9fab1bfee Fix for Mantis #29080.
psub.pas, tcgprocinfo.parse_body:
  * ensure that parse_generic and current_genericdef are set correctly when parsing a generic routine
pgenutil.pas, generate_specialization_phase2:
  * when we're specializing inside a generic we don't want to have the routine definitions, so let the compiler assume that the routine is no longer a forward definition

+ added test

git-svn-id: trunk@33275 -
2016-03-18 16:31:23 +00:00
svenbarth
570607b1d1 * revert r33273; haven't seen that Florian has already assigned that to himself... Oops
git-svn-id: trunk@33274 -
2016-03-18 14:26:24 +00:00