Károly Balogh
13210ff7d4
use MVZ/MVS ColdFire instructions to load constants where applicable
...
git-svn-id: trunk@26935 -
2014-03-03 00:53:52 +00:00
nickysn
2908fa9123
+ added type parentfpvoidpointertype, which is a void pointer with the same size
...
as the hidden parentfp parameter, passed to nested procs. On i8086 it is
always a near pointer, unlike voidpointer (which changes according to the
memory model). This fixes nested procs in i8086 far data memory models.
git-svn-id: trunk@26934 -
2014-03-02 22:55:52 +00:00
nickysn
9321d9916d
* use voidpointer.size instead of sizeof(pint) in tparamanager.push_size in
...
order to properly support i8086 far data memory models
git-svn-id: trunk@26933 -
2014-03-02 22:51:37 +00:00
nickysn
229ebf33a8
+ support getting the address of far references on i8086 in
...
tcgx86.a_loadaddr_ref_reg
git-svn-id: trunk@26932 -
2014-03-02 22:21:16 +00:00
Jeppe Johansen
66f5b71fe9
Fixed passing of 32bit arguments on 8-bit architectures.
...
Added initial RTL startup code for AVR.
git-svn-id: trunk@26931 -
2014-03-02 20:53:21 +00:00
florian
23c724f885
* prevent a temp. register allocated during spilling being immediately spilled again, resolves #25164
...
git-svn-id: trunk@26930 -
2014-03-02 19:47:05 +00:00
nickysn
cb0f7e265d
+ fixed get_frame for i8086 far data memory models
...
git-svn-id: trunk@26929 -
2014-03-02 19:36:35 +00:00
nickysn
75134c2a26
+ default_x86_data_pointer_type implemented as function that returns the proper
...
type in far data memory models
git-svn-id: trunk@26928 -
2014-03-02 19:35:36 +00:00
nickysn
a7117a6157
+ enabled the compact and large i8086 memory models (they don't work yet, so
...
that's why they're not added to the compiler help screen yet)
git-svn-id: trunk@26927 -
2014-03-02 19:26:49 +00:00
Jeppe Johansen
e33550b67d
Added support for X,Y,and Z register aliases plus low/high forms, and post-incrementation in AVR assembler reader.
...
Cleaned up parameter and funcretloc information generation in AVR paramanger, and made it closer to GCC's calling convention.
Fixed a number of codegenerator bugs generating invalid or broken instructions: CP operands were swapped, a number of instructions had immediate operands, and stack frame epilogue wasn't complete.
Added a bunch of peephole optimizations that clears the generated code up a lot.
git-svn-id: trunk@26925 -
2014-03-02 15:37:24 +00:00
florian
68f1a51164
* set PIC defines earlier, resolve #25788
...
git-svn-id: trunk@26924 -
2014-03-02 15:35:08 +00:00
Károly Balogh
1d5f74fae0
m68k implementation of g_save_registers and g_restore_registers using movem.l
...
git-svn-id: trunk@26923 -
2014-03-02 14:58:05 +00:00
nickysn
5242ed7864
* changed TResStrInitTable.Count and TWStrInitTablesTable.Count to nativeint
...
git-svn-id: trunk@26921 -
2014-03-02 13:27:59 +00:00
Károly Balogh
8730b1bf45
cleaned up g_proc_exit, optimized generated code and also added some comments about possible ABI variations. the changes also fix two tests on my system related to cdecl procedures
...
git-svn-id: trunk@26918 -
2014-03-01 23:52:00 +00:00
Károly Balogh
bd4cc3b8f3
cleaned up, reindented, simplified and allowed some minor optimizations in tcg64f68k
...
git-svn-id: trunk@26914 -
2014-03-01 18:25:05 +00:00
nickysn
73e6ffe675
* the TableCount and InitCount fields in the INITFINAL table changed to
...
nativeint (generates smaller and more efficient code on i8086)
git-svn-id: trunk@26913 -
2014-03-01 14:33:10 +00:00
Jeppe Johansen
95589fb1e2
Apply DataMov2Data to MLA and MLS too. Those have over 4 operands.
...
git-svn-id: trunk@26912 -
2014-03-01 14:21:04 +00:00
nickysn
b672bc754a
- rm references to system_i386_darwin and system_i386_iphonesim from
...
tcg8086.init_register_allocators
git-svn-id: trunk@26910 -
2014-03-01 12:52:31 +00:00
nickysn
a31b7d485f
* tcg8086.init_register_allocator: instantiate trgintcpu instead of trgcpu for
...
the integer registers in all cases
git-svn-id: trunk@26909 -
2014-03-01 12:50:26 +00:00
nickysn
6e9083aa84
* fixed inc/dec with constant truncating the high parts of the constant on
...
16-bit and 8-bit CPUs
git-svn-id: trunk@26908 -
2014-03-01 10:33:14 +00:00
nickysn
fc29e10349
* allow the use of inc/dec when adding/subtracting 32 or 64-bit constants with
...
the highest word equal to one and the lower parts zero
git-svn-id: trunk@26907 -
2014-03-01 10:25:46 +00:00
sergei
f69e6ec389
* Some fixes to NASM writer:
...
* Correctly output names of sec_user sections and sec_threadvar on Windows targets
* Use ALIGNB directive to align without warnings in bss and alike sections.
* Do not output 'begin/end asmlist x' for empty asmlists.
git-svn-id: trunk@26898 -
2014-02-27 13:37:03 +00:00
nickysn
c00b56ae49
* added the -w-orphan-labels parameter to all tasminfo instances for nasm.
...
The -w-oprhan-labels option prevents the 'label alone on a line without a
colon might be in error' warning.
git-svn-id: trunk@26889 -
2014-02-26 20:54:38 +00:00
svenbarth
47b4a52c8f
Also respect the supplied version suffix when printing the compiler path name using -PB. Fixes Mantis #25791
...
* compiler/utils/fpc.pp:
also apply the versionstr suffix to ppcbin if versionstr is set like is done when really executing the compiler
git-svn-id: trunk@26887 -
2014-02-26 19:13:06 +00:00
sergei
46f8e78d1f
+ Support GOT/gp-relative constants in GAS and internal assemblers, MIPS and i386.
...
* Change MIPS jump tables in PIC mode to use gp-relative constants, making them ABI-compliant and not requiring dynamic relocations.
git-svn-id: trunk@26886 -
2014-02-26 14:54:47 +00:00
sergei
31d160aaf5
* x86: clean up and place jump tables into sec_rodata on all targets. Effectively it does not change anything, because sec_rodata with relocations still go into writable data at assembler level.
...
git-svn-id: trunk@26885 -
2014-02-26 11:06:22 +00:00
nickysn
888ecdaee4
* fixed the type conversions of the 'and' operator to be Delphi compatible. Fixes Mantis #25179
...
git-svn-id: trunk@26882 -
2014-02-25 18:06:29 +00:00
sergei
2c02e8a726
- i386, x86_64, SPARC: removed paramanager.getintparaloc overrides, it is handled by generic implementation since r24716.
...
(This probably can be removed for all targets, but I don't want to do it without prior testing).
git-svn-id: trunk@26870 -
2014-02-24 16:01:14 +00:00
sergei
8f6d8b849e
* Generate interface wrappers together with data structures of class they belong to, and place everything into single assembler slice (since all wrappers are always referenced by VPTR, attempting to smartlink them is useless). This removes separate iteration pass over symtables and reduces amount of smartlink files.
...
git-svn-id: trunk@26868 -
2014-02-24 15:33:15 +00:00
Károly Balogh
0591caf022
have an explicit define for OS4, so we can easily identify it in shared sources among Amiga-like systems, independent from the CPU define
...
git-svn-id: trunk@26859 -
2014-02-23 23:49:40 +00:00
svenbarth
2a65c05a8c
Clean up dead code.
...
m68k/n68kcnv.pas:
- pass_generate_code is used from the parent class
- ungetcpuregister is not needed here
git-svn-id: trunk@26848 -
2014-02-22 21:29:31 +00:00
svenbarth
908c0f7293
M68k: Correctly handle the case of assigning a Boolean expression to a 64-bit Boolean. Fixes tw20889.
...
* m68k/n68kcnv.pas, tm68ktypeconvnode.second_int_to_bool:
Take an inspiration from the x86 code generator and correctly handle assignment of values with a size < 8 to 64-bit Booleans
git-svn-id: trunk@26847 -
2014-02-22 21:27:19 +00:00
florian
6697939903
* replaced some aren't, weren't, can't by are not, were not, cannot
...
git-svn-id: trunk@26842 -
2014-02-22 16:07:27 +00:00
florian
76b2074e59
* updated year in logo from 2013 to 2014
...
git-svn-id: trunk@26841 -
2014-02-22 15:58:03 +00:00
florian
13cb468a8e
* fixed modification information for some avx instructions
...
git-svn-id: trunk@26840 -
2014-02-22 15:52:33 +00:00
svenbarth
0321a77d72
Fix the generation of alignment instructions for m68k. This not only fixes quite some tests, but most importantly the native m68k compiler!
...
* aggas.pas, TGNUAssembler.WriteTree.doalign:
instead of strangely checking for the previous instruction always use .balignw if the previous code was code and we should not use a specific instruction
git-svn-id: trunk@26839 -
2014-02-22 15:36:30 +00:00
florian
c00d752813
+ create avx code in abs as well
...
* improved abs code generation with sse(2)
git-svn-id: trunk@26838 -
2014-02-22 15:35:14 +00:00
svenbarth
435dec656f
* m68k/n68kcnv.pas, tm68ktypeconvnode.second_int_to_bool:
...
use the size of the destination instead of the source for the destination register; fixes tenum6
git-svn-id: trunk@26835 -
2014-02-22 14:35:30 +00:00
florian
ab3f5744e0
* skip dec/inc type checking in unspecialized generic methods, resolves #25603
...
git-svn-id: trunk@26830 -
2014-02-22 09:20:57 +00:00
Károly Balogh
31ec76422a
redirect .s files to the RAM: drive on Amiga while compiling
...
git-svn-id: trunk@26829 -
2014-02-22 08:43:11 +00:00
Károly Balogh
74533a7c90
avoid generating addressing like <label>+8(aX), since this might fail during linking if label is more than 32k away, fixes linking with lineinfo unit here
...
git-svn-id: trunk@26826 -
2014-02-22 02:12:03 +00:00
svenbarth
60a07770f1
Fix cycling after addition of the new case simplification.
...
nset.pas, tcasenode.simplify: don't assume a specific order of the case labels
+ added test based on ppu.pas, tppu.getaint where no matching case label was found because of the ordering
git-svn-id: trunk@26825 -
2014-02-21 22:49:19 +00:00
svenbarth
500920030b
Implement simplification of ordinal case nodes if the case expression is constant (might be useful when inlining).
...
+ nset.pas, tcasenode: add simplify method; for ordinal constant case expressions either return a copy of the correct block or return a nothing node if the constant did not match anything
+ added test to check that nothing is broken
git-svn-id: trunk@26824 -
2014-02-21 20:36:41 +00:00
nickysn
83dd2aed4a
* refactored the pass_typecheck code for and/or/xor/comparisons, so that the logic is simpler, but still yields exactly the same result
...
git-svn-id: trunk@26823 -
2014-02-21 14:55:00 +00:00
florian
6364cf412d
* do not crash on invalid property declaration, resolves #23980
...
git-svn-id: trunk@26818 -
2014-02-19 19:44:06 +00:00
nickysn
3c332bf276
* not(is_signed(ld) xor is_signed(rd)) changed to (is_signed(ld)=is_signed(rd)) for better readability
...
git-svn-id: trunk@26817 -
2014-02-19 16:49:03 +00:00
Jonas Maebe
5729c9c8ef
* fixed shl/shr with constant value>=32 on 64 bit platforms
...
git-svn-id: trunk@26809 -
2014-02-18 16:46:36 +00:00
Jonas Maebe
7033ddf679
* converted tshshrnode to thlcgobj
...
o make sure that the return register has the correct size
git-svn-id: trunk@26808 -
2014-02-18 16:46:29 +00:00
florian
6e1bf4d040
* properly simplify not(<const. cbool>), resolves #25255
...
git-svn-id: trunk@26803 -
2014-02-16 20:20:58 +00:00
florian
d185122799
* optimize type conversions away if bits has been masked by a previous and operation
...
git-svn-id: trunk@26802 -
2014-02-16 18:40:35 +00:00