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
Jonas Maebe
8504ef3e87
* "public, alias" doesn't do anything (yet) for the jvm target, but the
...
original routine names are used as they appear in the Pascal code in the
Java byte code -> fixed external reference to fpc_do_exit after r26029
git-svn-id: branches/hlcgllvm@28170 -
2014-07-05 21:30:40 +00:00
Jonas Maebe
7949bebb8d
* synchronised with r28168 of trunk
...
git-svn-id: branches/hlcgllvm@28169 -
2014-07-05 21:30:28 +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
Jonas Maebe
063d50b4c9
* make the string data of p(wide)char string constants local (except when
...
using library-based smartlinking), as it is not exported
git-svn-id: branches/hlcgllvm@28167 -
2014-07-05 15:44:26 +00:00
Jonas Maebe
39074edf10
- removed the globalsymbolmangleprefix/suffix constants that were added for
...
llvm
* instead, add LLVM-specific name mangling based on the asmsymbol's bind
and typ whenever we write out its name
git-svn-id: branches/hlcgllvm@28166 -
2014-07-05 15:44:16 +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
Jonas Maebe
eef6f05697
* specify the asm section type when creating an LLVM declaration
...
o in case it's a read-only section, mark the data as "constant"
git-svn-id: branches/hlcgllvm@28155 -
2014-07-04 20:30:24 +00:00
Jonas Maebe
394dfdd220
* ensure that all initialised items have a type (and only one):
...
o remove the accompanying tdef operands from tai operands, because such
tai operands should have a tdef already
o check that every queued tai is a tai_simpletypedconst (which have a
type)
o wrap queued bitcast/getelementptr tai instances with a
tai_simpletypedconst
git-svn-id: branches/hlcgllvm@28154 -
2014-07-04 19:24:20 +00:00
Jonas Maebe
650fd162ea
* fixed missing bracket in comment
...
git-svn-id: branches/hlcgllvm@28153 -
2014-07-04 19:24:17 +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
Jonas Maebe
e18e98b540
* changed the type of the forcesize parameter of gethltemp() and friends
...
from aint to asizeint (fixes range check warning/error when compiling
the AVR backend)
git-svn-id: branches/hlcgllvm@28147 -
2014-07-03 22:28:43 +00:00
Jonas Maebe
fc7d5e2254
* insert a type conversion if the final result of an queued expression is
...
different from the type of typed constant/initialised data
git-svn-id: branches/hlcgllvm@28146 -
2014-07-03 22:28:40 +00:00
Jonas Maebe
ab186e8d75
* override queue_emit_staticvar() and set the offset to 0 there for the same
...
reason as with queue_emit_asmsym()
git-svn-id: branches/hlcgllvm@28145 -
2014-07-03 22:28:38 +00:00
Jonas Maebe
b520fb12be
* call def2regtyp via the chlcgobj class reference so it also works when
...
hlcg is nil
git-svn-id: branches/hlcgllvm@28144 -
2014-07-03 22:28:35 +00:00
Jonas Maebe
1516661249
+ new chlcgobj class reference variable that can be used to call thlcg*
...
virtual methods even when hlcg doesn't contain a valid instance
git-svn-id: branches/hlcgllvm@28143 -
2014-07-03 22:28:31 +00:00
Jonas Maebe
5cf52bb957
* fixed writing nested conversion operations such as bitcast (missing
...
opening bracket)
git-svn-id: branches/hlcgllvm@28142 -
2014-07-03 22:28:28 +00:00
Jonas Maebe
b94a524556
* converted emitting pwidechar typed constants to the typed constant builder
...
git-svn-id: branches/hlcgllvm@28141 -
2014-07-03 22:28:25 +00:00
Jonas Maebe
8afffdb176
* moved get_string_symofs() to a virtual class method of
...
ttai_typedconstbuilder so that it can be overridden by other platforms
* override get_string_symofs() for LLVM and always return 0, as you can't
have labels in the middle of a declaration on that platform
git-svn-id: branches/hlcgllvm@28140 -
2014-07-03 22:28:21 +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
a284902813
* emit the current offset when flushing tasmsymbols in the
...
ttai_lowleveltypedconstbuilder
o set the offset to 0 in the llvm constbuilder before calling
the lowlevel one, because it incorporates this offset already
via getelementptr instructions
git-svn-id: branches/hlcgllvm@28136 -
2014-07-02 17:25:02 +00:00
Jonas Maebe
e0c1c4d3bf
+ support for merging multiple tai_strings/tai_consts emitted as part of the
...
same string constant to be merged together into a single tai_string
(required to efficiently represent string constants in llvm assembler
--i.e., without splitting them into bytes--, while keeping the
flexibility in the typed constant parser to mix individual elements
and strings)
git-svn-id: branches/hlcgllvm@28135 -
2014-07-02 17:24:59 +00:00
Jonas Maebe
2d335baab8
* create only a single tai_string for shortstrings typed constants
...
whose type length is larger than the specified string
* corrected place of ftcb.maybe_end_aggregate() call
git-svn-id: branches/hlcgllvm@28134 -
2014-07-02 17:24:56 +00:00
Jonas Maebe
23f34608ed
* null-terminate tai_strings loaded from ppus
...
git-svn-id: branches/hlcgllvm@28133 -
2014-07-02 17:24:53 +00:00
Jonas Maebe
9f39188253
* moved the tai_*typedconst classes to aasmcnst to make use of def-related
...
helpers in a cleaner way (defutils would not belong in the uses clause of
aasmtai)
git-svn-id: branches/hlcgllvm@28132 -
2014-07-02 17:24:50 +00:00