svenbarth
a2bf4efce2
* use indirect imports for FPC_EMPTYCHAR if necessary
...
* make not of FPC_EMPTYCHAR as external assembler symbol
git-svn-id: trunk@34292 -
2016-08-12 14:20:17 +00:00
Jonas Maebe
017d4edbbb
* fixed memory typecast of complex procdef to simple procvar: left.resultdef
...
is a procdef, but after the load was finished it's actually already a
(complex) procvar. And since it's a memory location, the result of the
typecast is a pointer to the typeconvnode's resultdef (fixes
tests/tbs/tb0594.pp and others for llvm)
git-svn-id: trunk@34151 -
2016-07-19 14:30:30 +00:00
Jonas Maebe
3f01efbee0
* adapted tcgtypeconvnode.second_int_to_int() to work with high level cpu
...
targets, and removed the (buggy) LLVM-specific version
git-svn-id: trunk@33980 -
2016-06-12 20:56:40 +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
Jonas Maebe
a9498b6735
* fixed the parameter order for thlcgobj.g_load_const_field_by_name()
...
git-svn-id: trunk@32595 -
2015-12-05 18:03:48 +00:00
Jonas Maebe
4821fa7c67
* fixed second_proc_to_procvar for 8086 after r32553
...
git-svn-id: trunk@32592 -
2015-12-05 18:03:40 +00:00
Jonas Maebe
d6fb458129
* made second_proc_to_procvar type safe
...
git-svn-id: trunk@32553 -
2015-11-29 21:46:00 +00:00
Jonas Maebe
64c4e16f8b
* converted last part of second_real_to_real() to the high level code
...
generator
git-svn-id: trunk@32546 -
2015-11-27 14:44:37 +00:00
Jonas Maebe
a55e9a8b0a
* fixed type in second_class_to_intf if the class was in a LOC_REGISTER
...
git-svn-id: trunk@32422 -
2015-11-21 12:37:36 +00:00
Jonas Maebe
d444b365e1
* finished conversion of second_class_to_intf to the high level code
...
generator after r32301
git-svn-id: trunk@32313 -
2015-11-13 17:48:16 +00:00
Jonas Maebe
0fc1fd6ac1
* replaced current_procinfo.currtrue/falselabel with storing the true/false
...
labels of LOC_JUMP in the node's location. This generates some extra jumps
for short circuit boolean and/or-expressions if optimizations are off, but
with optimisations enabled the generated code is the same (except for JVM
because the jump threading optimisation isn't enabled there yet).
git-svn-id: trunk@31431 -
2015-08-27 18:28:57 +00:00
Jonas Maebe
f402b0d7df
* changed getpointerdef() into a tpointerdef.getreusable() class method
...
o allows removing the ugly x86 hacks
git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
Jonas Maebe
b9c9422fa7
* fixed type of reference used to store an ansichar that was converted
...
inline to a shortstring
git-svn-id: trunk@31049 -
2015-06-13 22:48:05 +00:00
Jonas Maebe
582aee4d90
* fixed the type of FPC_EMPTYCHAR when referencing it
...
git-svn-id: trunk@30785 -
2015-05-03 16:51:16 +00:00
Jonas Maebe
bd203a5b57
* synchronised with trunk till r30240
...
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Károly Balogh
0021ad714f
* fixed some ancient code behind cpu_uses_separate_address_registers define to at least compile again, for some m68k experiment
...
git-svn-id: trunk@30130 -
2015-03-07 22:11:43 +00:00
Jonas Maebe
67b8aceaee
* synchronized with privatetrunk till r30095
...
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Jonas Maebe
2c3aa7cee0
* give an internal error in second_int_to_bool() if left.expectloc was not
...
in [LOC_FLAGS,LOC_JUMP], but it's actual location is one of those
git-svn-id: trunk@29587 -
2015-01-30 19:31:31 +00:00
Jonas Maebe
3a78f4f580
* use the correct destination def for loading a simple proc2procvar
...
git-svn-id: branches/hlcgllvm@28479 -
2014-08-19 20:22:19 +00:00
Jonas Maebe
5c75b6dd6b
* synchronised with trunk up till r28402
...
git-svn-id: branches/hlcgllvm@28403 -
2014-08-13 16:04:30 +00:00
Jonas Maebe
2c7a1b4e91
* fixed optimisation from r25067 for the generic case where a signed value
...
is converted to a larger unsigned value (e.g. OS_S16 -> OS_32)
git-svn-id: trunk@28251 -
2014-07-23 14:06:06 +00:00
Jonas Maebe
7949bebb8d
* synchronised with r28168 of trunk
...
git-svn-id: branches/hlcgllvm@28169 -
2014-07-05 21:30:28 +00:00
sergei
04eb925776
* tcgtypeconvnode.second_int_to_int: disabled optimization from r25067 for m68k, because reg_cgsize() does not return expected values on that target.
...
git-svn-id: trunk@28093 -
2014-06-27 19:49:18 +00:00
nickysn
cb05907e18
* fixed the global function to nested procvar conversion in the i8086 far data
...
memory models
git-svn-id: trunk@27814 -
2014-05-23 20:59:07 +00:00
Jonas Maebe
bacd303208
* synchronized with trunk up to r27758
...
git-svn-id: branches/hlcgllvm@27779 -
2014-05-12 16:12:34 +00:00
nickysn
4ab9c6f206
+ fixed tcgtypeconvnode.second_class_to_intf for i8086 far data memory models
...
git-svn-id: trunk@27692 -
2014-04-30 14:05:35 +00:00
nickysn
a17c04c3e0
* fixed array to pointer conversion in i8086 far data memory models
...
git-svn-id: trunk@27683 -
2014-04-28 12:36:38 +00:00
nickysn
e8b9d9bf41
* converted tcgtypeconvnode.second_nil_to_methodprocvar to the high level code
...
generator, so it handles i8086 near and far pointers generically
- removed t8086typeconvnode.second_nil_to_methodprocvar, since it's no longer
necessary
git-svn-id: trunk@27678 -
2014-04-28 01:05:14 +00:00
nickysn
187c2af20e
* tcgtypeconvnode.second_proc_to_procvar converted to the high level code
...
generator, so it can now handle i8086 near and far pointers generically
- removed almost all of t8086typeconvnode.second_proc_procvar, since it's no
longer needed. Only a few assertions are left there to ensure that we don't
accidentally attempt to take the address of a near procedure in a far code
memory model, because the calling conventions are incompatible.
git-svn-id: trunk@27677 -
2014-04-27 23:18:05 +00:00
florian
0a7b795744
* fix for the regressions caused by r27417
...
git-svn-id: trunk@27433 -
2014-04-01 19:34:21 +00:00
florian
73cf0b62f2
* relaxed conditions for floats in int registers, this improved softfloat code significantly
...
git-svn-id: trunk@27417 -
2014-03-31 21:14:16 +00:00
nickysn
0aab7fcc9c
* fixed tcgtypeconvnode.second_cstring_to_pchar for i8086 far data memory models by using the high level code generator
...
git-svn-id: trunk@27324 -
2014-03-28 18:36:14 +00:00
nickysn
2644d7566c
* refactored tcgtypeconvnode.second_pointer_to_array to use
...
hlcg.reference_reset_base, which removes the need for i8086-specific ifdefs
git-svn-id: trunk@27311 -
2014-03-28 00:10:29 +00:00
nickysn
bd75abb64b
+ fill the treference.segment in tcgtypeconvnode.second_pointer_to_array when
...
the source type is a far (or huge) pointer
git-svn-id: trunk@27279 -
2014-03-25 01:46:45 +00:00
nickysn
a9f56d2714
* refactored tcgtypeconvnode.second_ansistring_to_pchar to use the high level
...
code generator and work in all i8086 memory models. Removed the i8086-specific
overriden version.
git-svn-id: trunk@27278 -
2014-03-25 01:27:58 +00:00
Jonas Maebe
d46c353849
* migrated JVM-specific second_nil_to_methodprocvar code to njvmcnv
...
git-svn-id: trunk@27150 -
2014-03-16 11:24:29 +00:00
Jonas Maebe
4065483a50
* completed thlcgobj.location_force_fpureg(), use it everywhere and removed
...
ncgutil/thlcg2ll.location_force_fpureg()
git-svn-id: trunk@27071 -
2014-03-10 09:01:05 +00:00
Jonas Maebe
cdfb23bf6c
* converted some leftovers in tcgtypeconvnode.second_int_to_int/
...
second_real_to_real to thlcgobj
+ added type conversion to second_pointer_to_array for llvm
git-svn-id: branches/hlcgllvm@27000 -
2014-03-06 21:41:27 +00:00
Jeppe Johansen
07b2982e77
Don't do ARM FoldShiftLdrStr peephole optimization if there's an offset in the reference.
...
Use UXTH+UXTB instructions instead of two shifts on processors that supports that.
Eliminate internalerror when constant pointers are typecast as arrays.
git-svn-id: trunk@26647 -
2014-02-01 13:29:35 +00:00
florian
4d5119bf1c
* fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
...
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
svenbarth
76f6de5cf1
Refactor tobjectdef.find_implemented_interface out into unit defcmp so that the recently introduced cycle between symdef and defcmp can be broken again.
...
defcmp.pas:
+ add function "find_implemented_interface"
* change method call of "find_implemented_interface" into function call
symdef.pas:
- tobjectdef: remove method "find_implemented_interface"
- remove use of unit "defcmp"
pgenutil.pas:
* change method call of "find_implemented_interface" into function call
+ add use of unit "defcmp"
ncgcnv.pas, ncnv.pas, pdecobj.pas, pdecsub.pas, pdecvar.pas:
* change method call of "find_implemented_interface" into function call
git-svn-id: trunk@25844 -
2013-10-23 19:05:00 +00:00
sergei
f80ce76a69
+ MIPS: emulate "flags", i.e. support LOC_FLAGS location. This allows to generate differently optimized code for branching and for conversion to register, typically saving a register and instruction per compare.
...
git-svn-id: trunk@25131 -
2013-07-19 14:06:47 +00:00
nickysn
7a0bf4fa54
* the change in r25067 disabled for 16-bit and 8-bit CPUs, because it relies on reg_cgsize, which gives wrong results on archs that use GetNextReg()
...
git-svn-id: trunk@25086 -
2013-07-11 12:28:26 +00:00
sergei
f3a1c749fb
* tcgtypeconvnode.second_int_to_int: reuse 8 and 16-bit-sized register locations on targets with 32-bit-only registers when casting to larger size (except ShortInt to Word cast). This is possible because upper bits of such registers are always kept valid by code generators (see 'maybeadjustresult' method in cgcpu.pas). Removes a lot of useless register moves.
...
git-svn-id: trunk@25067 -
2013-07-08 13:27:03 +00:00
florian
19495439b1
* do not destroy the left operand in second_ansistring_to_pchar if it is a register
...
git-svn-id: trunk@24954 -
2013-06-23 15:16:33 +00:00
Jonas Maebe
5051453806
+ support for LOC_(C)MMREGISTER in hlcg
...
o migrated location_force_mmregister_scalar from ncgutil to hlcgobj
git-svn-id: trunk@24661 -
2013-05-31 12:05:14 +00:00
Jonas Maebe
5152c86932
* set the location size of load nodes of procsyms without methodpointer/
...
framepointer
* fixed conversion of procedure of object/nested procedure into a procvar
that only contains the code address
git-svn-id: trunk@23928 -
2013-03-19 12:27:57 +00:00
florian
5a81601565
* type casting could force pointers into sub registers, so handle them when converting the pointer to an array
...
git-svn-id: trunk@23591 -
2013-02-10 20:50:12 +00:00
paul
5d74e0578a
compiler: remove unused variables and unneeded assignments
...
git-svn-id: trunk@23467 -
2013-01-21 01:24:36 +00:00
florian
4d4561923e
* nil method pointers can be kept in registers
...
git-svn-id: trunk@22340 -
2012-09-06 15:11:54 +00:00