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
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
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
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
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
sergei
ad59098457
+ m68k: initial implementation of g_stackpointer_alloc method, it has to exist for targets with non-fixed stack.
...
git-svn-id: trunk@28064 -
2014-06-25 17:43:37 +00:00
nickysn
0d4edf118e
+ added upper limits to the heapmin and heapmax values set by the $M directive
...
git-svn-id: trunk@28056 -
2014-06-25 09:33:04 +00:00
sergei
1e9f57467d
- m68k: removed "-dNOOPT" at build time, enabling the branch optimizer. Not tested thoroughly, but it does not change compiler behavior unless "-O1" or higher is supplied at command line.
...
git-svn-id: trunk@28054 -
2014-06-25 09:03:48 +00:00
Károly Balogh
531ac093ed
m68k: implemented a simple a_cmp_const_ref_label. uses TST instruction to test ref contents against zero
...
git-svn-id: trunk@28053 -
2014-06-25 06:56:58 +00:00
sergei
c79cd3beca
* m68k: fixed/completed the inverse_cond function.
...
git-svn-id: trunk@28052 -
2014-06-25 05:23:30 +00:00
nickysn
9f31fcc2ca
+ added support for HeapMax in the far data i8086 memory models as well
...
git-svn-id: trunk@28051 -
2014-06-24 22:54:54 +00:00
nickysn
db011dfb7a
+ added a warning if HeapMax<HeapMin is specified with the $M directive
...
git-svn-id: trunk@28042 -
2014-06-24 09:16:03 +00:00
nickysn
1910177cf0
+ added heapmax support to the $M directive on i8086-msdos. It is currently
...
only implemented in the near data memory models. The far data models support
is still a TODO.
git-svn-id: trunk@28039 -
2014-06-23 20:17:17 +00:00
sergei
e367ccc0ee
* MIPS: changed superregister number for $fcc0..$fcc7 to start from 32, so that range 0..31 can be used without translating into symbolic names.
...
* Change register type of second operand in CTC1 and CFC1 instructions to R_SPECIALREGISTER, so it is not output using a symbolic name. Mantis #26380 .
git-svn-id: trunk@28034 -
2014-06-22 22:01:44 +00:00
sergei
53b0ef1f61
- Removed superfluous tai_align, the new_section procedure creates one itself.
...
git-svn-id: trunk@28027 -
2014-06-21 22:36:17 +00:00
nickysn
0f5b13d45b
* allow setting a heap size of exactly 1024 bytes with the $M directive, since
...
that's a valid heap size value for the -Ch command line option
git-svn-id: trunk@28026 -
2014-06-21 21:51:27 +00:00
Károly Balogh
519094055c
m68k: cleaned up and fixed cgcpu/fixref for coldfire at least; also enabled n68kmem node, so addressing with scaling is generated now
...
git-svn-id: trunk@28025 -
2014-06-21 21:36:48 +00:00
Jeppe Johansen
a1197460e1
Constrained a number of optimizations and updated reference offsets for ARM Thumb.
...
Embedded target can now build with optimizations.
git-svn-id: trunk@28023 -
2014-06-21 13:26:33 +00:00
nickysn
36d6fb7868
* don't add the stack segment declaration at the beginning of each object file
...
in the i8086 far data memory models as well
git-svn-id: trunk@28022 -
2014-06-21 10:41:57 +00:00
nickysn
ef88fec688
* nested ifdefs in TX86NasmAssembler.WriteHeader replaced with an 'if defined()'
...
sequence
git-svn-id: trunk@28019 -
2014-06-21 08:28:15 +00:00
nickysn
40b2d3d562
* don't add the heap segment declaration at the beginning of each object file in
...
the i8086 far data memory models
git-svn-id: trunk@28018 -
2014-06-21 08:15:18 +00:00
Jonas Maebe
2df1d5ec58
* don't allow default parameter values for parameter types that don't accept
...
constant values (i.e., anything non-value/const/constref) (mantis #263363 )
o fixed default parameter value for var-parameter in chmreader
git-svn-id: trunk@28016 -
2014-06-20 19:50:20 +00:00
Károly Balogh
195dbc15fa
+ second try on warning fix
...
git-svn-id: trunk@28015 -
2014-06-20 13:36:57 +00:00
Károly Balogh
00b55e100c
+ try to fix the warnings introduced in r27947, so the compiler builds with -Sew
...
git-svn-id: trunk@28014 -
2014-06-20 13:10:07 +00:00
Károly Balogh
2881bc81b1
m68k: tweaks and fixes in n68kmem. the node is still disabled, needs further fixes in cgcpu/fixref to work properly
...
git-svn-id: trunk@28011 -
2014-06-20 11:49:38 +00:00
Jeppe Johansen
0dc39b5d63
Applied patch from Michael Ring that adds some startup code for some new stm32f0 and stm32f1 controllers, and fixes naming on some LPC ARMv6m controllers.
...
git-svn-id: trunk@28009 -
2014-06-20 06:49:04 +00:00
sergei
c2a29a0dbb
+ MIPS: implemented peephole optimization which changes appropriate patterns into conditional moves, which are available on MIPS4 and higher.
...
git-svn-id: trunk@28008 -
2014-06-20 05:57:39 +00:00
sergei
4e7c908b0d
+ MIPS: added movn and movz instructions.
...
git-svn-id: trunk@28007 -
2014-06-19 22:44:17 +00:00
nickysn
7cfd7a66cd
+ create a special 'heap' segment with reserved space equal to heapsize (i.e.
...
the value set by -Ch or the second parameter to the $M directive). This is
equivalent to the heapmin value in Turbo Pascal 7 and ensures that the program
has at least this amount of heap space available (otherwise DOS will show a
'not enough memory' error and will refuse to load the program).
git-svn-id: trunk@28002 -
2014-06-19 14:14:01 +00:00
sergei
25037f5318
- MIPS: completely removed trgcpu.add_constraints method.
...
While it can be correct from some point of view, it does not prevent aliasing a single-precision register into upper half of double-precision one. This is currently handled by making only even floating-point registers available to RA. At the same time, it somehow (possibly due to another bug in RA) generates a lot of unnecessary moves, as if physical double-precision registers conflict with each other. Anyway, removing it considerably improves the code without regressions in the test suite.
git-svn-id: trunk@27999 -
2014-06-19 03:59:24 +00:00
Jonas Maebe
de0041466f
* fixed system.openchararraytype after r27970 (mantis #26359 )
...
git-svn-id: trunk@27998 -
2014-06-18 20:20:04 +00:00
sergei
c260879439
* MIPS: updated registers, dropped special registers not recognized by GAS (actually, "pc" is recognized, but it is used only for MIPS16 mode, so it is easier to add back if/when this mode is supported), added FPU condition code registers ($fcc0..$fcc7).
...
* cpubase.pas, std_regname: changed logic to lookup known names for special registers before resorting to default name, so that $fcc0..$fcc7 can be used as operands.
git-svn-id: trunk@27992 -
2014-06-17 23:15:34 +00:00
sergei
c77225d2c4
+ MIPS: added some instructions.
...
git-svn-id: trunk@27991 -
2014-06-17 22:52:35 +00:00
sergei
a8e30043db
+ MIPS: more peephole optimizations (basically updated to the state of SPARC peephole).
...
git-svn-id: trunk@27990 -
2014-06-17 22:50:29 +00:00
sergei
04d8e8a5dc
* On 64-bit targets, handle abs(int64) internally, using the same code as for abs(longint), i.e. without branching. Both generic and x86-specific pass 2 code is already suitable for different operand sizes, only type checking needs removal of excessive conversions to 32 bits.
...
git-svn-id: trunk@27989 -
2014-06-17 18:45:11 +00:00
sergei
244f65525b
* MIPS: dropped gas_std_regname, its functionality merged into std_regname. This fixes register names in non-instructions (reg. allocation information, variable locations, etc.) and makes assembler listings more readable.
...
git-svn-id: trunk@27986 -
2014-06-16 22:52:56 +00:00
sergei
77d97303a9
* SPARC: cleanup and simplify 64-bit code generator. Call cg.a_op64_const_reg_reg where possible to make use of its optimization abilities.
...
git-svn-id: trunk@27985 -
2014-06-16 19:22:52 +00:00
sergei
51f6092672
* SPARC: OP_NOT can always be done in 32 bits, because for 8 and 16-bit operations the high bits of result are adjusted immediately afterwards.
...
* "carry clear" flag can be converted into register using a single instruction.
git-svn-id: trunk@27984 -
2014-06-16 19:15:01 +00:00
sergei
d6c6c84f76
* calc_divconst_magic_unsigned: explicitly limit the shift amount to number of bits of target platform. This happens implicitly only on x86, on other 32-bit targets shifting by more than 31 bits calculates as zero.
...
git-svn-id: trunk@27983 -
2014-06-16 17:05:01 +00:00