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 -
* WriteTree: implement the ait_realconst case by calling WriteRealConstAsBytes
* WriteTree: remove commented code handling the old constants
git-svn-id: trunk@33288 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
* 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 -
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 -
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 -