Commit Graph

43547 Commits

Author SHA1 Message Date
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
sergei
193fa2b95e - m68k: removed some definitely misplaced code, comparison nodes are never handled in second_addfloat.
git-svn-id: trunk@28087 -
2014-06-27 13:23:12 +00:00
sergei
3851c1f494 - m68k: removed a_loadmm_* methods, no need to override because they produce internal error already in base class.
git-svn-id: trunk@28086 -
2014-06-27 12:15:00 +00:00
nickysn
bff8dc3fbf + added parser support for huge pointer declarations
git-svn-id: trunk@28085 -
2014-06-27 10:44:02 +00:00
nickysn
8b7863d076 + added warning in case a far pointer is declared on a platform that does not
support them

git-svn-id: trunk@28084 -
2014-06-27 09:26:08 +00:00
sergei
acd3ea8750 * m68k: Fixed parameter passing to conform to ABI:
* records are passed by value
  * records with size of 1,2 or 4 are returned in registers
  * parameters with size<4 are justified on the stack according to big-endian target

Now everything except floating-point parameters is compatible with C code compiled with "-malign-int -mrtd".
Compatibility with "-mno-align-int" is achievable by changing target_info.maxCrecordalign to 2, but doings so causes a lot more troubles because RTL (incorrectly) assumes that records declared with {$PACKRECORDS C} are aligned to pointer size.

+ Reuse parameter locations. Since everything is passed on stack, it reduces code size quite a bit.
- tm68kparamanager.getintparaloc removed, generic implementation has been tested and works as expected.

git-svn-id: trunk@28083 -
2014-06-27 06:58:39 +00:00
nickysn
140ce2a880 + added the compact and large memory models to the compiler command line option
help screen

git-svn-id: trunk@28082 -
2014-06-26 22:56:55 +00:00
nickysn
ce87e72721 * show an error if the user attempts to create a dos .com file in an i8086
memory model other than tiny

git-svn-id: trunk@28081 -
2014-06-26 22:52:57 +00:00
Károly Balogh
5276de5627 m68k: restored orglen variable to g_concatcopy which was actually used, but still got removed in r28072
git-svn-id: trunk@28080 -
2014-06-26 19:46:57 +00:00
nickysn
82d393014b + added a test for the tiny memory layout
git-svn-id: trunk@28079 -
2014-06-26 17:38:38 +00:00
nickysn
835fb1d157 + added memory layout tests for the small and medium memory models
git-svn-id: trunk@28078 -
2014-06-26 17:30:32 +00:00
Károly Balogh
3028f3ac78 m68k: disabled PEA debug comment accidentally left in
git-svn-id: trunk@28077 -
2014-06-26 16:50:42 +00:00
Károly Balogh
d93e7b3367 m68k: cleaned ancient silly debug mess from a_loadaddr_ref_reg. no functional changes.
git-svn-id: trunk@28076 -
2014-06-26 16:47:55 +00:00
Károly Balogh
1388cb9bae m68k: implemented a proper a_loadaddr_ref_cgpara instead of the disabled mess in the source, utilizing the PEA instruction
git-svn-id: trunk@28075 -
2014-06-26 16:39:17 +00:00
nickysn
57de15e071 + added checks for the Program Segment Prefix's relative position to the code
segment in the compact and large memory layout tests

git-svn-id: trunk@28074 -
2014-06-26 09:58:12 +00:00
nickysn
be0afd9625 + added checks for the pointer and procvar sizes in the compact and large memory
layout tests

git-svn-id: trunk@28073 -
2014-06-26 09:20:51 +00:00
sergei
4c3eb391ef * m68k: cleaned out unused variables in cgcpu.pas
* Fixed reference strength in a_call_reg.

git-svn-id: trunk@28072 -
2014-06-26 08:27:38 +00:00
Jeppe Johansen
857a849173 Added an additional check to the MulAdd2MLA optimization. The operands of the multiplication weren't checked.
git-svn-id: trunk@28071 -
2014-06-26 06:05:08 +00:00
sergei
3ffa32a660 - m68k: removed garbage (tab characters, commented out code, unused variables, debug output and alike). Functionality unchanged.
git-svn-id: trunk@28070 -
2014-06-26 06:01:29 +00:00
nickysn
f7dd4f640a - rm the 'Memory allocation error' and 'Not enough memory' error messages from
the compact and large model startup code, since they're not used (we rely on
  the DOS loader to check for the available memory instead)

git-svn-id: trunk@28069 -
2014-06-25 23:16:55 +00:00
nickysn
dc17b55505 * switch to asmmode_i8086_intel instead of asmmode_i386_intel on i8086 when tp
or delphi mode is selected. This fixes the error "Selected assembler reader
  not supported" in programs that specify $mode tp/delphi, but do not explicitly
  set $asmmode intel.

git-svn-id: trunk@28068 -
2014-06-25 22:02:03 +00:00
nickysn
ce4f9577d7 * seges prefix and lodsb instruction put on the same line for better readability
git-svn-id: trunk@28067 -
2014-06-25 21:07:25 +00:00
nickysn
9b560ffd64 * x86 intel syntax inline asm: allow a segment override (segcs,segds,seges,etc.)
to be followed by an instruction on the same line as the override

git-svn-id: trunk@28066 -
2014-06-25 21:06:19 +00:00