Commit Graph

61625 Commits

Author SHA1 Message Date
nickysn
aafc6423f0 + introduced a_cmp_loc_reg_br, a_cmp_reg_loc_br and a_cmp_ref_loc_br
git-svn-id: branches/wasm@48195 -
2021-01-19 13:09:08 +00:00
nickysn
fe5dee892f + introduced a_cmp_subsetreg_reg_br and a_cmp_subsetref_reg_br
git-svn-id: branches/wasm@48194 -
2021-01-19 13:05:50 +00:00
nickysn
db4c786059 + introduced a_cmp_const_loc_br
git-svn-id: branches/wasm@48193 -
2021-01-19 13:03:03 +00:00
nickysn
f9d1a9b8e3 * decstack after each br_if in the a_cmp_XXX_br methods
git-svn-id: branches/wasm@48192 -
2021-01-19 13:00:42 +00:00
nickysn
e1b98a515a * fixed class name in comment
git-svn-id: branches/wasm@48191 -
2021-01-19 12:58:16 +00:00
nickysn
dbc7cb9001 * set expectloc correctly in the WASM add node (it is never LOC_FLAGS or LOC_JUMP, but LOC_REGISTER instead)
git-svn-id: branches/wasm@48190 -
2021-01-19 12:55:29 +00:00
nickysn
8021de82f6 * synchronized with trunk
git-svn-id: branches/wasm@48185 -
2021-01-18 23:11:34 +00:00
nickysn
a478e15836 - removed some commented out code
git-svn-id: branches/wasm@48184 -
2021-01-18 23:11:02 +00:00
nickysn
7f31c03718 * update the flowcontrol set in the IF node pass_generate_code
git-svn-id: branches/wasm@48183 -
2021-01-18 23:08:25 +00:00
nickysn
c0e7035e50 + set node location to LOC_VOID in the WebAssembly if node pass_generate_code
git-svn-id: branches/wasm@48182 -
2021-01-18 23:05:11 +00:00
nickysn
69c407dff5 + added dummy int64p.inc file for WebAssembly
git-svn-id: branches/wasm@48181 -
2021-01-18 22:50:22 +00:00
nickysn
9fdc8c141c + implemented the boolean NOT node for WebAssembly
git-svn-id: branches/wasm@48180 -
2021-01-18 22:48:24 +00:00
nickysn
af41eee9d1 + support references with only index reg, and no base reg in thlcgwasm.prepare_stack_for_ref
git-svn-id: branches/wasm@48179 -
2021-01-18 22:35:56 +00:00
nickysn
c4e8f091ec * generate jumpless code for the IN node for WebAssembly. TODO: this needs to be
refactored, so the WebAssembly-specific code generation code goes in the wasm
  in node descendant class.

git-svn-id: branches/wasm@48178 -
2021-01-18 22:32:35 +00:00
nickysn
c8e130d525 + added WebAssembly invalid register check in op_reg when compiler is compiled with EXTDEBUG
git-svn-id: branches/wasm@48177 -
2021-01-18 22:29:45 +00:00
nickysn
ec7fbcb271 * override the IN node for WebAssembly and avoid generating jump tables for the
IN nodes on that target

git-svn-id: branches/wasm@48176 -
2021-01-18 21:37:39 +00:00
nickysn
374882455b - disallow (i.e. generate internal errors) the use of a_cmp_*_label functions
for the WebAssembly target, because it doesn't support jumps to labels
* the previous implementation of a_cmp_*_label was a hack, that ignored the
  label parameter. These functions are now moved to the newly introduced
  a_cmp_*_stack functions.

git-svn-id: branches/wasm@48175 -
2021-01-18 21:32:35 +00:00
florian
16f201292c + remove try ... finally statements if the finally block is empty
git-svn-id: trunk@48174 -
2021-01-18 21:29:52 +00:00
nickysn
c781e03edf + implemented WebAssembly code generation for case statements
git-svn-id: branches/wasm@48173 -
2021-01-18 20:57:05 +00:00
nickysn
039e2f20b7 + override the case node for WASM. The actual code generation isn't implemented yet.
git-svn-id: branches/wasm@48172 -
2021-01-18 17:43:01 +00:00
michael
92c3aedac4 * Fix typo
git-svn-id: trunk@48171 -
2021-01-18 15:30:19 +00:00
michael
005448f305 * Some restructuring by Andrey, add fallback link
git-svn-id: trunk@48170 -
2021-01-18 15:27:58 +00:00
michael
38b6bb7385 * Patch from Andrey Sobol to improve inheritance tree
git-svn-id: trunk@48169 -
2021-01-18 13:23:52 +00:00
florian
d4ad618a70 * similiar fix to r48167 for OptPass1SXTH
git-svn-id: trunk@48168 -
2021-01-17 19:01:14 +00:00
florian
14ddc59edb * arm*: fix SxtbAndImm2Sxtb (now SxtbAndImm2Uxtb) optimization as proposed by Pierre and Gareth
git-svn-id: trunk@48167 -
2021-01-17 10:12:55 +00:00
florian
ecc3ce64ea * x86: some fixes to enable 8 and 16 bit operations
git-svn-id: trunk@48166 -
2021-01-16 22:46:25 +00:00
michael
4c22d66aac * Fix compilation
git-svn-id: trunk@48165 -
2021-01-16 16:55:48 +00:00
florian
8618a3b21f * simplify tx8664shlshrnode.pass_generate_code, it should not mess with the result type, this
is a matter of the type check pass

git-svn-id: trunk@48164 -
2021-01-16 15:38:29 +00:00
michael
b30d54b064 * Patches from Andrey Sobol, more control over warnings, improve class tree and resolving
git-svn-id: trunk@48163 -
2021-01-16 15:05:44 +00:00
florian
707bce74d7 * patch by J. Gareth Moreton: refactor OptPass2Jcc, resolves #38343
git-svn-id: trunk@48162 -
2021-01-15 21:24:44 +00:00
nickysn
a69f7094dd + override get_address_type for the i8086 code generator and return near pointer
types, because that's what's needed for the i8086 address calculations in
  update_reference_reg_mul (the indexing operation is performed on the offset
  only)

git-svn-id: branches/wasm@48161 -
2021-01-15 15:47:38 +00:00
nickysn
34d3d39dbe + introduced the tcgvecnode.get_address_type virtual method and use its result,
instead of voidpointertype in tcgvecnode.update_reference_reg_mul and
  .update_reference_reg_packed

git-svn-id: branches/wasm@48160 -
2021-01-15 15:29:58 +00:00
nickysn
2ee61e003d * update revision.inc
git-svn-id: branches/wasm@48159 -
2021-01-15 15:28:47 +00:00
nickysn
e0a1ce86fd * synchronized with trunk
git-svn-id: branches/wasm@48158 -
2021-01-15 01:05:37 +00:00
pierre
50a13b4df4 Function GetDefaultLibGCCDir adapted to case of Defaults not assigned (required for fpcmkcfg utility) reported by Andrew Kurushin
git-svn-id: trunk@48157 -
2021-01-14 22:59:16 +00:00
florian
9003114a8f + support R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX
git-svn-id: trunk@48156 -
2021-01-14 21:36:12 +00:00
Mattias Gaertner
c21e777c85 pastojs: fixed freeing temp intf var if nil
git-svn-id: trunk@48155 -
2021-01-14 12:30:57 +00:00
florian
4e61867ce1 * modified (use IsManagedType to check if a for loop can be used for copying) patch by Bart Broersma to fix IncreaseCapacity of TQueue, resolves #38306
git-svn-id: trunk@48154 -
2021-01-13 21:24:50 +00:00
nickysn
b876c69bea * synchronized with trunk
git-svn-id: branches/wasm@48153 -
2021-01-13 11:23:19 +00:00
pierre
1fa5edd34e Try to avoid use of native libgcc directory when cross-compiling.
Add FSourceCPU, FSourceOS, FCompilerDate FFullCompilerVersion fields to TCustomDefaults class.
  Set these new fields by also parsing FPC -iDWSPSO output.
  Use these fields to try to correctly guess if native gcc should be used to
  try to find libgcc directory, or only $BINUTILSPREFIX prepended gcc.

git-svn-id: trunk@48152 -
2021-01-13 10:07:37 +00:00
florian
344aadebb9 * avoid widening of shl operations, this is not necessary for them either
git-svn-id: trunk@48150 -
2021-01-12 21:45:38 +00:00
nickysn
21a33f22e9 * synchronized with trunk
git-svn-id: branches/wasm@48141 -
2021-01-11 23:02:35 +00:00
pierre
4fd1c9ec42 Correct check of stringtype inside use_tag_prefix function
git-svn-id: trunk@48140 -
2021-01-11 22:17:09 +00:00
Mattias Gaertner
000de377b9 fcl-passrc: fixed compile with pas2js
git-svn-id: trunk@48139 -
2021-01-11 22:05:20 +00:00
Mattias Gaertner
2833bf6710 fcl-passrc: fixed mem leak
git-svn-id: trunk@48138 -
2021-01-11 22:04:22 +00:00
Mattias Gaertner
05d916a652 pastojs: clean up
git-svn-id: trunk@48137 -
2021-01-11 22:03:40 +00:00
florian
a286ad9d77 * do not extend 8 bit return values to 32 bit when loading them into eax,
this is not required by the api, neither does e.g. clang it

git-svn-id: trunk@48136 -
2021-01-11 21:47:32 +00:00
nickysn
8b4aceea50 * synchronized with trunk
git-svn-id: branches/wasm@48134 -
2021-01-11 07:01:01 +00:00
Mattias Gaertner
22864b47e4 pastojs: record complex only for records with class vars
git-svn-id: trunk@48131 -
2021-01-10 22:56:39 +00:00
Jonas Maebe
5c2303a76b * add parameter cleanup nodes to the call cleanup block (mantis #38316)
git-svn-id: trunk@48130 -
2021-01-10 15:47:27 +00:00