marco
3a7cde492e
* finance functions by wp, mantis #26459
...
git-svn-id: trunk@28182 -
2014-07-08 12:45:11 +00:00
sergei
15ff2c1236
* m68k: Fixed name of ELF interpreter, and updated cprt0.as to somewhat working state. Now a "hello world" program using libc can be linked and launched, but anything more complex needs another round of fixing the parameter passing code, in order to get the stack properly balanced.
...
git-svn-id: trunk@28181 -
2014-07-07 20:08:50 +00:00
nickysn
16c5849fc6
+ added HexStr() overload for huge pointers
...
git-svn-id: trunk@28180 -
2014-07-07 15:13:29 +00:00
nickysn
8604372da3
+ implemented far pointer comparison operating only on the offset (+ added test)
...
git-svn-id: trunk@28179 -
2014-07-06 22:45:19 +00:00
nickysn
13646c7afe
+ added rtl helper for huge pointer subtraction
...
git-svn-id: trunk@28178 -
2014-07-06 19:15:14 +00:00
Károly Balogh
f98cd634fb
m68k: reworked/cleaned setjmp/longjmp code to use the movem instruction with register lists
...
git-svn-id: trunk@28177 -
2014-07-06 13:18:56 +00:00
sergei
df60309d96
* m68k: fixed the last remaining warning and removed "$WARNINGS OFF" directive.
...
git-svn-id: trunk@28176 -
2014-07-06 11:36:33 +00:00
sergei
e4fea2ebc8
* Dummy implementations of a_bit_scan_reg_reg and g_stackpointer_alloc in tcg, removes the need to override these methods in every descendant code generator solely to avoid "constructing a class with abstract method" warning.
...
git-svn-id: trunk@28175 -
2014-07-06 11:34:04 +00:00
Károly Balogh
e5656a6f7e
m68k assembler reader: fixed parsing of slash-separated movem/fmovem register lists. only the first register was stored.
...
git-svn-id: trunk@28174 -
2014-07-06 11:29:45 +00:00
sergei
1678fcdc2d
- m68k assembler reader: removed Oper.InitRef which was causing failure of tbs/tb0142.pp and, in general, making impossible calls/jumps to non-alias procedure names.
...
git-svn-id: trunk@28173 -
2014-07-06 10:35:35 +00:00
sergei
94796e9e7e
* Output divisor in all diagnostic messages, not just some of them.
...
git-svn-id: trunk@28172 -
2014-07-06 08:26:37 +00:00
sergei
3f1d368373
* Use different exit codes to increase verbosity when the test fails.
...
git-svn-id: trunk@28171 -
2014-07-06 08:17:49 +00:00
nickysn
18246bd9ed
+ added tests for >, <, >= and <= with equal pointers in the thugeptr2.pp and
...
thugeptr2a.pp tests
git-svn-id: trunk@28168 -
2014-07-05 15:52:14 +00:00
nickysn
c8c842b857
+ added tests for >, <, >= and <= with equal pointers in the tfarptr2.pp test
...
git-svn-id: trunk@28165 -
2014-07-05 15:15:23 +00:00
nickysn
5097b90e39
+ enabled the huge pointer size test in the tptrsize.pp test
...
git-svn-id: trunk@28164 -
2014-07-05 10:30:55 +00:00
nickysn
6e9720e830
+ added tests for huge pointer normalized and non-normalized equality comparison
...
git-svn-id: trunk@28163 -
2014-07-05 10:19:26 +00:00
nickysn
fda9cfea12
+ extended test tfarptr2.pp with far pointers which are different, but point to
...
the same linear address
git-svn-id: trunk@28162 -
2014-07-05 10:01:45 +00:00
nickysn
4e2cc365d1
* while loop replaced with a repeat..until loop in InternalTinyFreeMem
...
git-svn-id: trunk@28161 -
2014-07-05 09:47:59 +00:00
svenbarth
441e6c6083
Fix for Mantis #26177 . Use the correct value for the method data when using a method pointer of a type or record helper.
...
Please note that Delphi has the exact same bug as we have and thus code working in FPC will not work in Delphi.
Additionally taking the method address of a local variable or a local/global constant for a method pointer is dangerous as the variable (in case of constants is a temporary local variable) will go out of scope once the containing procedure/function/method exits!
ncgld.pas, tcgloadnode.pass_generate_code:
* only use the value of Self if it is an implicit pointer object (class instance) or a class reference, but not for everything else (objects, records, primitive types)
+added test
git-svn-id: trunk@28160 -
2014-07-05 08:54:10 +00:00
nickysn
2b2224494b
* call first_addpointer and first_cmppointer in pass_1 for pchars as well. Fixes
...
huge pointer arithmetic/comparison on huge pchars.
git-svn-id: trunk@28159 -
2014-07-04 23:58:26 +00:00
nickysn
c8130843b2
* fixed 'cannot convert type' error when comparing two voidhugepointers with
...
= or <>
git-svn-id: trunk@28158 -
2014-07-04 23:54:47 +00:00
nickysn
3bb730d5b9
+ implemented normalized huge pointer comparison
...
git-svn-id: trunk@28157 -
2014-07-04 23:22:33 +00:00
nickysn
e80ecd4d5b
+ moved handling of pointer comparison in pass_1 to new virtual method
...
taddnode.first_cmppointer. To be overriden for i8086 huge pointer comparisons.
git-svn-id: trunk@28156 -
2014-07-04 22:47:21 +00:00
nickysn
7f9fa145e8
+ added error message in case the HUGEPOINTERNORMALIZATION directive is used
...
with an invalid argument
git-svn-id: trunk@28152 -
2014-07-04 17:16:58 +00:00
nickysn
63305cc2e6
+ added directive {$HUGEPOINTERARITHMETICNORMALIZATION} to control the
...
cs_hugeptr_arithmetic_normalization local setting
+ added the cs_hugeptr_comparison_normalization local setting and corresponding
directive {$HUGEPOINTERCOMPARISONNORMALIZATION} to set it
* the {HUGEPOINTERNORMALIZATION} changed to set both of the huge pointer
normalization settings, according to the specified compiler type ('BORLANDC',
'MICROSOFTC' or 'WATCOMC')
git-svn-id: trunk@28151 -
2014-07-04 14:43:46 +00:00
nickysn
a3b48b79cb
- rm the scan_w_hugepointernormalization_not_support message, replaced with
...
scanner_w_directive_ignored_on_target
git-svn-id: trunk@28150 -
2014-07-04 14:03:18 +00:00
nickysn
aee568e6fc
* cs_hugeptr_normalization renamed to cs_hugeptr_arithmetic_normalization,
...
because we're going to also introduce cs_hugeptr_comparison_normalization as
an independent option
git-svn-id: trunk@28149 -
2014-07-04 13:14:06 +00:00
nickysn
c306f48c14
+ added rtl helpers for huge pointer comparisons
...
git-svn-id: trunk@28148 -
2014-07-04 08:34:17 +00:00
nickysn
d9e94ffab7
+ implemented huge pointer arithmetic
...
git-svn-id: trunk@28139 -
2014-07-03 16:53:22 +00:00
nickysn
da77535631
* the handling of pointer arithmetic in pass_1 moved to a new virtual method
...
taddnode.first_addpointer. This will be overridden in the i8086 code generator
in order to implement huge pointer arithmetic.
git-svn-id: trunk@28138 -
2014-07-03 13:47:47 +00:00
svenbarth
30be5d8d33
As discussed on core enable the abstract class construction warning by default and also make it controllable with {$warn constructing_abstract ...}.
...
* scandir.pas, dir_warn: also adjust the message state for type_w_instance_abstract_class if the identifier is CONSTRUCTING_ABSTRACT
* msg/errore.msg: enable type_w_instance_abstract_class by default
* msgidx.inc, msgtxt.inc: updated
git-svn-id: trunk@28137 -
2014-07-02 19:40:22 +00:00
Jonas Maebe
43839d1bda
* update of German error message files by Karl-Michael Schindler
...
(mantis #26282 )
git-svn-id: trunk@28129 -
2014-07-02 17:17:38 +00:00
sergei
e232dd5066
+ m68k: default implementation of fpc_cpuinit, provides correct masking of floating-point exceptions and fixes test/testv8.pp.
...
git-svn-id: trunk@28128 -
2014-07-02 16:23:40 +00:00
svenbarth
a7a9440692
Add a new warning message that is generated if an instance of an abstract class is created. This message is disabled by default, but can be switched on by using {$warn 4122 on} or {$warn 4122 error}.
...
Please note that this warning won't be triggered if an instance of that class is created using a class variable of that class type as the compiler can not know the type contained in the variable at compile time (see also the added test).
+ msg/errore.msg: added disabled message which informs about the instantiation of an abstract class
* pexpr.pas, do_member_read: generate the message if we have a constructor call for an abstract class using a loadvmtaddrnode (thus the type name is used and not a class variable)
* msg{idx,txt}.inc: updated
+ added test
git-svn-id: trunk@28127 -
2014-07-01 20:41:05 +00:00
sergei
23a20f0e50
* m68k: fixed setjmp/longjmp:
...
* Data registers have to be saved/restored using 'move.l', because 'move' without suffix assumes 16-bit size.
* setjmp must behave as a regular function w.r.t. removing its argument from the stack.
git-svn-id: trunk@28103 -
2014-07-01 11:46:10 +00:00
sergei
847adff94d
* Load double-precision locations from integer registers directly into cgpara if sizes match and destination has a single location.
...
git-svn-id: trunk@28102 -
2014-06-30 17:50:34 +00:00
sergei
b91d965096
* m68k: initial support for ROL/ROR operations, defining 'cpurox' for CPU target can actually enable them. However it cannot be done outright because these instructions do not exits on Coldfire, and internal processing of RoX,Sar,BsX, etc. can not yet be switched depending on CPU subtype.
...
git-svn-id: trunk@28101 -
2014-06-29 17:49:30 +00:00
sergei
15e374f3c6
* m68k: fixed comparison of small sets, it should not modify sides. tw18013 is now correct when compiled with -O2.
...
git-svn-id: trunk@28100 -
2014-06-29 12:35:03 +00:00
nickysn
f0346c096f
+ added rtl helpers for huge pointer arithmetic
...
git-svn-id: trunk@28099 -
2014-06-28 17:08:40 +00:00
sergei
0262514939
* m68k: Transform 32-bit div/mod nodes into helper calls during pass 1. This is consistent with the way other targets do it, and results in pretty much nicer code.
...
git-svn-id: trunk@28098 -
2014-06-28 13:28:01 +00:00
sergei
535218e837
* m68k: fixed OP_NOT/OP_NEG with two registers, it must never modify the source register.
...
git-svn-id: trunk@28097 -
2014-06-28 05:22:03 +00:00
sergei
85c0ba96e2
* tm68knotnode brought up to speed:
...
- removed code for everything but booleans (it is handled perfectly well by generic code)
+ operate directly on references when possible
+ added handling for 64-bit data.
git-svn-id: trunk@28096 -
2014-06-28 05:14:27 +00:00
sergei
4df49964ca
* tcg68k.a_op_reg_reg: renamed parameters 'reg1' and 'reg2' to 'src' and 'dst' to make it clear what's what.
...
* tcg68k.fixref method made public.
git-svn-id: trunk@28095 -
2014-06-28 05:09:34 +00:00
nickysn
89db1e4118
+ add proper int type conversions for huge pointer arithmetic in pass_typecheck
...
of the add node
git-svn-id: trunk@28094 -
2014-06-27 23:37:08 +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
sergei
12e0416323
* m68k-linux: now actually fixed syscall failure conditions.
...
git-svn-id: trunk@28092 -
2014-06-27 19:41:02 +00:00
nickysn
5093c573dc
+ added huge pointer assignment and far->huge conversion tests
...
git-svn-id: trunk@28091 -
2014-06-27 16:56:02 +00:00
sergei
c2ab16c320
- m68k: dropped t68kaddnode.second_cmpboolean, apparently its presence just breaks tbs/tb0246 without any value added.
...
git-svn-id: trunk@28090 -
2014-06-27 16:34:14 +00:00
sergei
4b4651d298
* m68k-linux: syscalls are expected to return -1 on failure, not -errno. This fixes some of the tests, webtbs/tw2494 is one of them.
...
git-svn-id: trunk@28089 -
2014-06-27 15:41:51 +00:00
nickysn
b3bb9df19f
+ added a $HUGEPOINTERNORMALIZATION switch
...
git-svn-id: trunk@28088 -
2014-06-27 13:56:12 +00:00