Jonas Maebe
b1c3f76ff9
* changed the supported targets for assembler writers to a set, and
...
(hopefully correctly) limited all assembler writers to only the
OSes they support (mantis #11801 )
git-svn-id: trunk@12622 -
2009-01-28 15:12:43 +00:00
florian
80ff09c6f4
* correct handling of constant operands of aad/aam
...
git-svn-id: trunk@12158 -
2008-11-18 16:21:58 +00:00
florian
145dc4d8d6
* write assembler error at the correct position, first fix for #12595
...
git-svn-id: trunk@12157 -
2008-11-18 16:08:22 +00:00
florian
53ffda14f3
* fixes taking the address of an assembler block defined label
...
* create short jumps also for asm blocks, thanks to Sergej Gorelkin for the patch, resolves #11638
git-svn-id: trunk@12043 -
2008-11-09 21:14:45 +00:00
florian
49195b0ac0
* fixes assembling of mov ax,<mem16>
...
* fixes assembling of test <mem8>,reg8; resolves #11786
git-svn-id: trunk@12040 -
2008-11-09 10:24:59 +00:00
Jonas Maebe
718694d1d6
* always specify an explicit alignment for tgobj.gettemp (so e.g.
...
shortstring temps don't get maximum alignment)
* changed some gettemptyed() calls into gettemp() calls (gettemptyped
means that this temp can only be used for temps of that type,
which is necessary for refcounted types but not for floats)
git-svn-id: trunk@12036 -
2008-11-08 22:20:47 +00:00
Jonas Maebe
53e52ac6a9
* implementation of 32x32->64 multiplication for i386 based on patch
...
by Sergei Gorelkin
git-svn-id: trunk@12028 -
2008-11-06 21:03:10 +00:00
Jonas Maebe
a23630260b
+ "weakexternal" support for imported procedures and variables.
...
the syntax is exactly the same as for "external", except for
the keyword. It is currently only active for Darwin targets.
It should also work at least for Linux targets, but only with
the GNU assembler (which is why it is not activated there)
+ test for this functionality
git-svn-id: trunk@12009 -
2008-11-01 18:38:32 +00:00
Jonas Maebe
0197192441
* disabled jump tables for darwin/x86_64 for now since they don't work
...
there yet
git-svn-id: trunk@11502 -
2008-08-02 12:23:34 +00:00
yury
5e11e697b4
* Use unsigned integers for sizes and positions to break 2GB limit in tdynamicarray, object writer, internal linker, coff and PE headers.
...
git-svn-id: trunk@11480 -
2008-07-28 20:29:25 +00:00
florian
d05d315aa5
* jump table is written to the data segment so create a proper label for it, resolves #11735
...
git-svn-id: trunk@11477 -
2008-07-28 18:09:34 +00:00
florian
1afb1aa9cc
+ ror/rol functions
...
+ internal compiler support for ror/rol on i386
git-svn-id: trunk@11466 -
2008-07-27 17:12:32 +00:00
yury
0bcaf8845f
* Fixed 'mixed signed/unsigned' warnings.
...
* Suppressed 2 unreachable code warnings.
* Now x86 compiler compiles without warnings and notes! It will be great to keep such state in future...
git-svn-id: trunk@11455 -
2008-07-23 13:16:46 +00:00
yury
491f0fa1d8
* Replaced all user defined warnings by TODO comments to reduce compiler noise.
...
git-svn-id: trunk@11443 -
2008-07-23 11:00:03 +00:00
yury
cf7390ea81
* Fixed 'mixed signed/unsigned' and pointer conversion warnings.
...
git-svn-id: trunk@11439 -
2008-07-23 09:36:07 +00:00
yury
5548824859
* Removed/ifdefed/commented unused local variables.
...
git-svn-id: trunk@11438 -
2008-07-23 09:22:47 +00:00
florian
a15d8778d6
+ create jump tables for case statements on x86-64
...
git-svn-id: trunk@11377 -
2008-07-13 10:26:25 +00:00
florian
58757d0630
* support of dq in Intel assembler on 64 bit CPUs, resolves #11425
...
git-svn-id: trunk@11211 -
2008-06-07 15:08:48 +00:00
florian
35c0f78642
+ Haiku support by Olivier Coursière based on old BeOS support
...
git-svn-id: trunk@11014 -
2008-05-19 17:33:35 +00:00
Jonas Maebe
3d2630c661
* fixed wrong location.size (sign) for x86's in_abs_long + test
...
git-svn-id: trunk@10850 -
2008-05-01 11:47:32 +00:00
yury
b70bf05ad5
* I hope it's proper fix for r10688.
...
git-svn-id: trunk@10690 -
2008-04-18 10:51:56 +00:00
yury
e71d631c24
* Fix for tw10233 for all CPUs.
...
git-svn-id: trunk@10688 -
2008-04-18 07:38:25 +00:00
yury
771479e65c
* Improved fix for bug #10233 for better Delphi compatibility and efficiency:
...
- Explicit typecasts like LongBool(byte_value) do not change ordinal value.
- Explicit typecasts like ByteBool(longint_value) do not change ordinal value and can lead to data loss if longint_value is outside of ByteBool range.
- Explicit typecasts like ByteBool(LongBool) handle type ranges correctly.
- Updated test tw10233.pp. It is passed by Delphi as well.
git-svn-id: trunk@10672 -
2008-04-15 22:19:29 +00:00
yury
cf235145cb
* Fixed a_load_reg_reg for arm.
...
* Fixed sign/zero-extension in second_int_to_bool for all CPUs. x86 and pppc were not affected by this bug, but I fixed it for all CPUs for consistency.
* cg/tcnvint1 is passed on arm now.
git-svn-id: trunk@10669 -
2008-04-15 20:44:27 +00:00
Jonas Maebe
62e66d2a56
* explicit typecasting of any ordinal type to a boolean of the same
...
size must happen without any mangling of the value (mantis #11027 )
* moved checking for signed-to-unsigned (or vice versa) type
conversions in assignments from htypechk to ncnv (where there
was already code for similar checks) and added support for
bool_to_bool there as well
git-svn-id: trunk@10521 -
2008-03-21 14:44:58 +00:00
peter
8f239d04b6
* cleanup and simplify the set type handling
...
git-svn-id: trunk@10432 -
2008-03-02 17:48:27 +00:00
Jonas Maebe
f36e5411af
* split cpu64bit compiler define into
...
a) cpu64bitaddr, which means that we are generating a compiler which
will generate code for targets with a 64 bit address space/abi
b) cpu64bitalu, which means that we are generating a compiler which
will generate code for a cpu with support for 64 bit integer
operations (possibly running in a 32 bit address space, depending
on the cpu64bitaddr define)
All cpus which had cpu64bit set now have both the above defines set,
and none of the 32 bit cpus have cpu64bitalu set (and none will
compile with it currently)
+ pint and puint types, similar to aint/aword (not pword because that
that conflicts with pword=^word)
* several changes from aint/aword to pint/pword
* some changes of tcgsize2size[OS_INT] to sizeof(pint)
git-svn-id: trunk@10320 -
2008-02-13 20:44:00 +00:00
Jonas Maebe
8349cde7db
* changed byte/word/longbool to be Delphi-compatible (+ similar changes
...
for qwordbool) + test:
o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
o these types are now all signed
o converting an integer type to a byte/word/long/qwordbool using an
explicit type cast keeps the integer's original value stored in the
bool, instead of forcing it to ord(true)/ord(false)
(mantis #10233 and #10613 , implemented for all architectures, testsuite
tested for ppc32, sparc and x86)
* fixed some places where the rtl depended on longbool(true) having the
value 1
* extended several boolean tests (and adapted some to no longer assume
that byte/word/long/qwordbool(true)=1)
+ support for converting to qwordbool in second_int_to_bool for x86, ppc
and sparc
git-svn-id: trunk@9898 -
2008-01-24 21:30:55 +00:00
Jonas Maebe
ea22e81374
* fixed include/exclude for byte-sized sets in registers
...
git-svn-id: trunk@9887 -
2008-01-23 22:28:12 +00:00
Jonas Maebe
974c240266
* also use sse2 instructions to convert int to real on i386
...
for (types convertable to) longint
* fixed expectloc for x86_64 int_to_real if result is in mmreg
git-svn-id: trunk@9423 -
2007-12-09 18:10:23 +00:00
Jonas Maebe
95f00eb633
* fixed x86_64 and non-darwin i386 GOT/GOTPCREL parsing after r9366
...
(I put that code in a separate method because it appeared in two
places, but in one of the two places it was buggy and apparently
never triggered, and I copied that part...)
git-svn-id: trunk@9379 -
2007-12-02 11:13:51 +00:00
Jonas Maebe
527190a875
+ relsymbol support for intel asm reader
...
git-svn-id: trunk@9368 -
2007-12-01 14:26:24 +00:00
Jonas Maebe
3f57d681e1
* check that not more than one relsymbol is used
...
git-svn-id: trunk@9367 -
2007-12-01 14:26:06 +00:00
Jonas Maebe
df2980f0c0
+ relsym support
...
* give an error message when using @GOT in darwin/i386 assembler code
(have to use a relsym instead)
git-svn-id: trunk@9366 -
2007-12-01 11:59:37 +00:00
Jonas Maebe
18eb495d0f
* give a regular error message instead of an internal error on x86
...
when using non-PIC references in assembler code when the compiler
is configured to generate PIC code (on ppc, sparc and arm, no
error message is given at all currently)
git-svn-id: trunk@9364 -
2007-12-01 11:28:15 +00:00
Jonas Maebe
6c536dab3e
* added several missing make_simple_ref() calls
...
* removed addr_pic again for darwin, as you have to explicitly code
the relative address using a relsym instead of using an assembler
directive like @GOT there
git-svn-id: trunk@9353 -
2007-11-29 22:06:14 +00:00
peter
dbba46c0e4
* set addr_pic
...
git-svn-id: trunk@9350 -
2007-11-29 21:15:22 +00:00
peter
f0e804beb7
* typecast fix
...
git-svn-id: trunk@9349 -
2007-11-29 21:15:08 +00:00
florian
fb8bbd5ff0
+ inline abs(<longint>) on x86
...
git-svn-id: trunk@9333 -
2007-11-25 18:54:40 +00:00
peter
59365a6db9
- garbage was being output sometimes instead of source lines when compiling with -al. This is because lastfileinfo and lastinfile were never initialized for MASM writer. This is true for TPPCMPWAssembler, too.
...
- long lines were not wrapped.
- constants of type ait_comp_64bit output incorrectly.
- at end of file, current segment was not closed.
patch from Sergei Gorelkin
git-svn-id: trunk@9331 -
2007-11-25 16:46:19 +00:00
peter
6058b2c247
* renamed t_times to executionweight and moved it to
...
code generation pass
* include executionweight in the spilling decision
git-svn-id: trunk@9330 -
2007-11-25 16:38:05 +00:00
Jonas Maebe
c8f270c556
+ darwin/x86_64 gprof support
...
git-svn-id: trunk@9252 -
2007-11-14 20:47:55 +00:00
Jonas Maebe
defe46ef42
* added missing size suffixes for several sse2 opcodes
...
git-svn-id: trunk@9182 -
2007-11-10 19:57:01 +00:00
Jonas Maebe
032352d98b
+ darwin/x86_64 support
...
git-svn-id: trunk@9180 -
2007-11-10 18:33:09 +00:00
florian
965bb41288
* fixed more rex placements
...
git-svn-id: trunk@9069 -
2007-11-02 21:30:43 +00:00
Jonas Maebe
8d8ba9a583
* fixed pic reference loading for non-darwin i386 platforms after
...
r8657
git-svn-id: trunk@8993 -
2007-10-29 19:00:15 +00:00
florian
19b79468ad
* store/load mmx registers properly
...
* sse registers can be stored/loaded aligned on x86-64
git-svn-id: trunk@8969 -
2007-10-28 14:08:57 +00:00
florian
82c7896d8d
* more ins. dat issues popped up, did I mention I start to hate it :(?
...
git-svn-id: trunk@8968 -
2007-10-28 14:08:04 +00:00
florian
c1d62172fe
* the saga continues, fixed previously broken assembler table entries
...
git-svn-id: trunk@8967 -
2007-10-28 13:01:58 +00:00
florian
9d88b1d9ef
* x86-64 fixed
...
git-svn-id: trunk@8963 -
2007-10-28 08:45:48 +00:00
florian
f32831c44a
* fixed assembling of fisttp of sse3 instruction set
...
+ sse3 optimized trunc() using fisttp
+ -Cfsse3 for x86-64
git-svn-id: trunk@8962 -
2007-10-27 20:50:46 +00:00
florian
46e1587395
* another bunch of assembler fixes, win64 builds again
...
git-svn-id: trunk@8957 -
2007-10-27 19:49:53 +00:00
florian
8f5a4cc514
* more, hopefully correct, x86-64 assembler fixes
...
git-svn-id: trunk@8952 -
2007-10-26 20:44:57 +00:00
florian
c5f492ef50
* fixed assembling of movq mem,xmmreg
...
git-svn-id: trunk@8923 -
2007-10-24 20:45:38 +00:00
peter
d74bd34a91
* fix 32bit truncation in type determination of constant operands
...
git-svn-id: trunk@8909 -
2007-10-22 16:36:41 +00:00
florian
1cb5d2a603
* some missing make_simple_ref calls added, resolves #8948
...
git-svn-id: trunk@8904 -
2007-10-21 20:19:04 +00:00
peter
43c2694d50
* fixed REX placement for xmm opcodes
...
git-svn-id: trunk@8850 -
2007-10-18 23:30:35 +00:00
peter
658d9fcc92
* reset subregister before writing mm register names
...
git-svn-id: trunk@8846 -
2007-10-18 21:52:04 +00:00
peter
ad944fd198
* move x86_64 specific int_to_real conversion to nx64cnv
...
* fix x86_64 code for none loc_register/loc_reference location
git-svn-id: trunk@8844 -
2007-10-18 20:46:44 +00:00
florian
6eff22d466
* remove disassembler hint \331 from comisd, it causes rex to be
...
generated too early. rex must be generated after the 0x66 prefix.
There might be more problems like this which must be fixed.
git-svn-id: trunk@8787 -
2007-10-14 09:32:01 +00:00
florian
6d53d3b4cd
* fixed assembling of comisd with rex, there are probably more similiar fixes necessary, must be checked first
...
git-svn-id: trunk@8785 -
2007-10-14 09:04:45 +00:00
florian
342ba323cf
* fixed assembling of cvtsi2ss with rex
...
git-svn-id: trunk@8777 -
2007-10-13 14:53:27 +00:00
peter
1e28adac60
* there can be a tai_stab between lock/rep and the next opcode
...
git-svn-id: trunk@8716 -
2007-10-01 19:23:49 +00:00
peter
9715eceee7
* fixed expectloc setting for x86_64
...
git-svn-id: trunk@8704 -
2007-09-30 21:02:33 +00:00
Jonas Maebe
c84744b27f
* fixed a_jmp_name() for darwin/i386 (go via a stub)
...
* fixed g_external_wrapper for darwin/i386 (both with and without pic,
by using a_jmp_name(), because the darwin jump stubs can always
be called directly)
git-svn-id: trunk@8669 -
2007-09-28 14:12:46 +00:00
peter
c19217f846
* only for jump instructions we need to look at the relative
...
offset of an symbol
git-svn-id: trunk@8664 -
2007-09-27 20:10:30 +00:00
Jonas Maebe
3266f4e483
+ Compiler support for pic on darwin/i386. The i386 rtl still needs
...
to be made pic-safe (mainly accesses to the global default8087cw)
* At the same time also made the non-pic code abi-compliant (access
external data via indirect symbol pointers etc)
Darwin/i386 also puts the got into a virtual register (like
Darwin/ppc), a.o. because the register allocator fails to colour
a routine in aasmcpu.pas if we take away ebx from it.
git-svn-id: trunk@8657 -
2007-09-26 21:42:27 +00:00
peter
6b8aed593f
* remove registers{int/mmx/fpu} from firstpass
...
* small cleanups of unused variables in firstpass
* node_resources_fpu() created to get an approximation of the
required fpu registers
* for the moment use node_complexity in the CG until the
node_resource_int() is created
git-svn-id: trunk@8655 -
2007-09-26 21:12:01 +00:00
Jonas Maebe
9750e49d5a
* fixed x86 compilation after r8651
...
git-svn-id: trunk@8652 -
2007-09-26 17:25:38 +00:00
Jonas Maebe
70c2414daa
* split off sec_rodata_norel from sec_rodata, and only put constant data
...
without relocations in sec_rodata_norel. It should be possible to make
this new section read-only on all platforms, although currently it
is only done for darwin, and for non-pic code written using the
-Aas assembler writer.
Most platforms also have a special section for "constant but with
relocations" data, but such a section is currently only used for
Darwin (others still use plain .data sections for that, like they
did before)
git-svn-id: trunk@8650 -
2007-09-26 15:49:01 +00:00
Jonas Maebe
ecd2445602
+ segment register support in g_concatcopy (should fix #9667 , but I
...
can't test since I don't have Dos/Windows -- at least the changes
don't break Linux/i386)
git-svn-id: trunk@8608 -
2007-09-22 20:10:56 +00:00
Jonas Maebe
b4b715f213
* make sure tai_align.calculatefillbuf no longer destroys the fillsize
...
field, because it can still be read afterwards
git-svn-id: trunk@8602 -
2007-09-22 13:01:30 +00:00
tom_at_work
b0bb3f94a7
* improve powerpc64/linux stub for external procedures in units: also consider GOT change in call to this external procedure
...
* refactored above mentioned stub code generation, allowing the CG to define a cpu specific method for this task by overriding new g_external_wrapper() method
git-svn-id: trunk@8566 -
2007-09-19 20:41:39 +00:00
peter
2f044481ae
* release temp when downgrading fpuregister value
...
git-svn-id: trunk@8530 -
2007-09-17 20:52:24 +00:00
Jonas Maebe
89ed91509a
* Some fixes for r8515:
...
* fixed set add-nodes in case left and right are swapped (taddset4)
* fixed "in" expressions with packed sets in case left is < setbase
(now tested by tw8258b, which was missing a {$packset 1} directive)
git-svn-id: trunk@8519 -
2007-09-16 22:24:42 +00:00
Jonas Maebe
0040eecf9f
+ support for extra packing of sets whose lower element number
...
is <> 0 (Delphi compatible now, + various tests)
+ support for enums and sets in is_in_limit()
* fixed converting smallset expressions to varsets
* improved choosing an appropriate common set type when mixing
set types in an expression
- removed no longer used normalset code from nadd.pas
- disabled large set (>256 elements) support for now, because
they are not yet supported entirely throughout the compiler
and this causes errors at run time in several situations
git-svn-id: trunk@8515 -
2007-09-16 20:04:45 +00:00
Jonas Maebe
a8191abd16
* fixed parsing of "rcl/rcr rm,imm" (mantis #9025 )
...
git-svn-id: trunk@8272 -
2007-08-12 13:50:52 +00:00
florian
4151029ee5
+ .fini section support
...
git-svn-id: trunk@8174 -
2007-07-28 08:40:10 +00:00
peter
89eddc7504
* check for valid reference before parsing extra constant values
...
git-svn-id: trunk@8154 -
2007-07-23 20:16:23 +00:00
peter
67e16340be
* revert r8118
...
git-svn-id: trunk@8139 -
2007-07-22 19:59:00 +00:00
florian
447276c5bb
* Jcc reads the flags, this was not in the dat yet, resolves #9278
...
* disabled 4 ops variant of insertq for now
git-svn-id: trunk@8133 -
2007-07-22 16:40:44 +00:00
daniel
21293f5818
+ Add common type integer promotion.
...
- {$intpromotion common_type} or -CIcommon_type switches to common type promotion.
- {$intpromotion native_integer} or -CIcommon_type switches to current behaviour.
- Default in tp mode is common_type, native_integer in other modes
- Compiler can cycle with -CIcommon_type
- Still needs checking on other architectures than i386
git-svn-id: trunk@8118 -
2007-07-21 19:16:24 +00:00
daniel
a05d228679
- Remove IE from g_concatcopy again.
...
git-svn-id: trunk@8065 -
2007-07-15 16:15:13 +00:00
daniel
f0633187f4
+ Change constants in g_concatcopy to make the right decisions on x86_64.
...
* Fix move copy in g_concatcopy for x86_64.
git-svn-id: trunk@8058 -
2007-07-14 21:29:57 +00:00
daniel
4f6eb50391
+ Internalerror if g_concatcopy is called with len=0.
...
git-svn-id: trunk@8052 -
2007-07-14 18:56:16 +00:00
Jonas Maebe
e23a8655e8
* fixed generic in-code in case left = LOC_JUMP
...
* fixed generic and x86 in-code in case genjumps=true and
complexity(right)>complexity(left) (not sure if possible
in practice currently, but better safe than sorry)
git-svn-id: trunk@7912 -
2007-07-01 19:35:22 +00:00
Jonas Maebe
26a4f693da
* more packed set operand size problems fixed (include/exclude, mantis
...
#9167 )
git-svn-id: trunk@7833 -
2007-06-27 19:50:09 +00:00
Jonas Maebe
8caad93eaf
* fixed several problems with packed set operand sizes
...
* added LOC_CONSTANT to the list of allowed locations for the left
hand side of an in-node, so it doesn't get forced into a register
anymore in that case
git-svn-id: trunk@7831 -
2007-06-27 17:26:18 +00:00
daniel
9adb202a92
* Rework the constexprint to allow operations from low(int64) to high(qword).
...
+ Some initial work on a formaldef which also carries the typinfo of a parameter.
git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
florian
c7100799ed
+ forbid usage of $E on targets supporting no fpu emulation
...
- disabled -Cfsoft on i386
git-svn-id: trunk@7625 -
2007-06-10 17:03:26 +00:00
florian
0e96eda236
+ some sse4 instructions supported, resolves #9046
...
git-svn-id: trunk@7613 -
2007-06-09 19:45:06 +00:00
florian
fe69d19f9c
* align stack properly if no stack frame is generated, should resolve #8986
...
git-svn-id: trunk@7611 -
2007-06-09 18:46:35 +00:00
Jonas Maebe
8bcb6e689d
* only check validity of assembler instructions in pass_2, after all
...
local operands have been resolved (mantis #8950 )
git-svn-id: trunk@7516 -
2007-05-29 16:53:28 +00:00
Jonas Maebe
a0b57eddb5
* new internal set format for big endian systems. Advantages:
...
* varsets ({$packset x}) are now supported on big endian targets
* gdb now displays sets properly on big endian systems
* cleanup of generic set code (in, include/exclude, helpers), all
based on "bitpacked array[] of 0..1" now
* there are no helpers available yet to convert sets from the old to
the new format, because the set format will change again slightly
in the near future (so that e.g. a set of 24..31 will be stored in
1 byte), and creating two classes of set conversion helpers would
confuse things (i.e., it's not recommended to use trunk currently for
programs which load sets stored to disk by big endian programs compiled
by previous FPC versions)
* cross-endian compiling has been tested and still works, but one case
is not supported: compiling a compiler for a different endianess
using a starting compiler from before the current revision (so first
cycle natively, and then use the newly created compiler to create a
cross-compiler)
git-svn-id: trunk@7395 -
2007-05-19 17:15:15 +00:00
daniel
182fca72f2
* Change spill_* routines to return Taicpu instead of Tai to increase
...
strong typing.
* Fix PowerPC R0 register allocation
git-svn-id: trunk@7317 -
2007-05-12 15:43:16 +00:00
daniel
3ad8257ecb
* Fix replace spilling of shld/shrd.
...
git-svn-id: trunk@7252 -
2007-05-03 20:56:09 +00:00
daniel
f3660976bc
+ Allow replace spilling for "opcode register,const" and "opcode const,register"
...
git-svn-id: trunk@7183 -
2007-04-28 19:11:17 +00:00
daniel
c43855a8f7
* Improve comment for [0..31]-x optimization
...
git-svn-id: trunk@7177 -
2007-04-27 13:35:25 +00:00
daniel
ea79e69176
+ Add optimization to optimize [0..31]-x set expression to use one less
...
register. This construction is used in our Shootout meteor contest
implementation.
git-svn-id: trunk@7176 -
2007-04-26 21:48:18 +00:00
peter
29ffdefacb
* secrel32 relocation support required by dwarf2 under windows
...
git-svn-id: trunk@7172 -
2007-04-25 09:06:36 +00:00
florian
f87e96dfb0
* properly release open array value parameters on x86-64 or if they contain automated types, resolves #8664
...
git-svn-id: trunk@7100 -
2007-04-13 19:20:56 +00:00
Jonas Maebe
5f169f97ff
* fixed SSE2 substraction when both operands are on the 80x87 fpu stack
...
git-svn-id: trunk@6959 -
2007-03-23 00:21:46 +00:00
Tomas Hajny
30b78920cd
* OS/2 compilation fixes (not completely finished yet)
...
git-svn-id: trunk@6937 -
2007-03-20 00:49:20 +00:00
florian
d55dbf92d3
* fixed assembling of cvt(t)ss2si
...
git-svn-id: trunk@6918 -
2007-03-18 17:35:22 +00:00
florian
4fc85cb084
* new test
...
* fix compilation on i386
git-svn-id: trunk@6861 -
2007-03-14 21:09:05 +00:00
florian
bae83ee777
* set expectloc correctly on x86-64
...
* decide properly if we inline trunc or not on x86-64
git-svn-id: trunk@6860 -
2007-03-14 21:05:15 +00:00
florian
f4840620f0
* location.size of trunc/round must be OS_S64
...
* fixed assembling of cvt*2si
+ optimized trunc/round for x86_64/sse
* only floats need no type cast for trunc/round
git-svn-id: trunk@6859 -
2007-03-14 20:56:14 +00:00
pierre
d1d6413443
* use S_IQ opsize for A_FISTP instruction
...
git-svn-id: trunk@6848 -
2007-03-14 17:09:42 +00:00
florian
bcb1cf0d28
* make no use of int registers in trunc to reduce register pressure
...
git-svn-id: trunk@6844 -
2007-03-14 10:23:52 +00:00
pierre
f07349a774
* force S_IQ size for movq instruction, needed for nasm
...
git-svn-id: trunk@6835 -
2007-03-13 23:17:09 +00:00
florian
c4f65df9f9
* fixed expectloc setting
...
git-svn-id: trunk@6833 -
2007-03-13 22:45:41 +00:00
florian
8aa259401c
* fixed x86-64
...
git-svn-id: trunk@6828 -
2007-03-13 21:12:40 +00:00
florian
1cd41b68f7
* compiler handled round/trunc for x86
...
git-svn-id: trunk@6827 -
2007-03-13 20:23:24 +00:00
florian
e6e1a3a09b
* fixed assembling of sse instructions on x86-64 with regs > xmm7
...
git-svn-id: trunk@6714 -
2007-03-04 19:16:20 +00:00
florian
9a0f769b2f
* cleaned up set conversion
...
* fixed conversion of var sets
git-svn-id: trunk@6644 -
2007-02-25 16:29:39 +00:00
florian
05e0a804cc
* fixes cardinal in reg -> real on x86-64, resolves #8225
...
git-svn-id: trunk@6588 -
2007-02-21 16:53:57 +00:00
daniel
9256c180de
* Fix register allocation bug that happens when a coalesced
...
move is spilled in its entirely.
git-svn-id: trunk@6408 -
2007-02-10 22:47:13 +00:00
florian
08f48f5fc9
* completed jrcxz support
...
git-svn-id: trunk@6401 -
2007-02-10 21:14:05 +00:00
florian
a19ed91cc3
* fix for jcxz, jecxz and jrcxz on 64 bit platforms
...
git-svn-id: trunk@6400 -
2007-02-10 21:05:27 +00:00
Jonas Maebe
9813a8708c
* fixed encoding of jcxz
...
git-svn-id: trunk@6398 -
2007-02-10 20:38:38 +00:00
Jonas Maebe
1863fb4c55
* make more use of location_force_register in in-code, should fix
...
cycle on x86-64
git-svn-id: trunk@6376 -
2007-02-08 14:14:32 +00:00
Jonas Maebe
21cef2cdb1
* r6372 for x86(-64)
...
git-svn-id: trunk@6373 -
2007-02-07 23:10:54 +00:00
Jonas Maebe
f38d29cfab
* optimized previous patch for "byte in set" (Thorsten Engler)
...
* fixed storing/loading of setdefs to/from ppu + test (Thorsten Engler)
* fixed ppudump for new setdef format in ppus
git-svn-id: trunk@6363 -
2007-02-07 20:22:29 +00:00
Jonas Maebe
fc3852e59a
* in non-TP modes, 'ord_larger_than_256 in set' now always returns
...
false instead of triggering a range error (mantis #8258 ,
based on patch provided by Thorsten Engler)
git-svn-id: trunk@6357 -
2007-02-07 18:57:19 +00:00
Jonas Maebe
1a32e4fdf5
* fixed pushing of words in intel assembler (indirectly related to
...
wrong bug report 7808)
git-svn-id: trunk@6274 -
2007-01-30 21:52:11 +00:00
Jonas Maebe
cc67ed17b5
* fixed uninitialised variable (mantis 8198, already tested by
...
webtbs/tw3931a.pp)
git-svn-id: trunk@6183 -
2007-01-25 11:43:15 +00:00
Jonas Maebe
cdb67cfc8b
* fixed bug with set comparisons after r6172
...
git-svn-id: trunk@6181 -
2007-01-24 22:28:25 +00:00
florian
2579cd139f
+ support for sets with size 1 and 2
...
git-svn-id: trunk@6172 -
2007-01-24 20:06:56 +00:00
Jonas Maebe
c866400823
+ support for VMTOFFSET in assembler readers to get VMT offset of virtual
...
methods (mantis #8153 )
git-svn-id: trunk@6168 -
2007-01-24 18:26:23 +00:00
Jonas Maebe
c1df4454fe
* cmpxchg8b doesn't have a size suffix
...
git-svn-id: trunk@6164 -
2007-01-24 15:15:04 +00:00
Jonas Maebe
11528c9da6
* better fix for tw8171 (now also works for with-statements)
...
git-svn-id: trunk@6158 -
2007-01-24 09:55:45 +00:00
Jonas Maebe
ed13c7f60e
+ support for [recordfield.field] in assembler blocks in methods in
...
intel assembler (mantis 8171)
git-svn-id: trunk@6150 -
2007-01-23 17:34:11 +00:00
Jonas Maebe
302a2a3ec2
* fixed calling qualified methods in assembler + tests for ppc/ppc64/
...
i386/x86_64
git-svn-id: trunk@6112 -
2007-01-21 22:16:42 +00:00
florian
2da51bce72
+ cmpxchg16b
...
git-svn-id: trunk@6095 -
2007-01-21 11:04:19 +00:00
florian
5e2042cff8
* correct assembling of test rm8,reg8
...
git-svn-id: trunk@5972 -
2007-01-14 18:08:37 +00:00
Jonas Maebe
abef29c1d5
* fixed x86 vector mmloads and use scalar loads in ncgcnv
...
git-svn-id: trunk@5967 -
2007-01-14 13:36:26 +00:00
Jonas Maebe
fc99b0ad48
* fixed floating point precision conversions for loc_mmregister and
...
between loc_fpuregister and loc_mmregister
git-svn-id: trunk@5942 -
2007-01-13 15:00:00 +00:00
Jonas Maebe
e815b923d5
* a_loadfpu_* gets two size parameters: fromsize and tosize
...
* fixed downsizing the precision of floating point values
* floating point constants are now treated using only the minimal
precision required (e.g. 2.0 is now a single, 1.1 extended etc)
(Delphi compatible)
git-svn-id: trunk@5927 -
2007-01-12 18:33:51 +00:00
florian
36a500c38c
* don't coalescate with frame/stack pointer
...
git-svn-id: trunk@5880 -
2007-01-11 10:47:07 +00:00
florian
c238bb15d1
* .init section support
...
git-svn-id: trunk@5835 -
2007-01-07 10:03:52 +00:00
florian
db3f8575ae
* fixed library creating on x86_64-linux
...
git-svn-id: trunk@5828 -
2007-01-06 20:27:59 +00:00
florian
c759b114bf
* allow second operand being am imm in intel assembler, fixed #7719
...
git-svn-id: trunk@5823 -
2007-01-05 23:15:25 +00:00
Jonas Maebe
1d96dcc50d
* renamed nf_swaped to nf_swapped
...
git-svn-id: trunk@5818 -
2007-01-05 12:47:22 +00:00
Jonas Maebe
a4a54a105d
* fixed sse float substraction in case of swapped operands
...
git-svn-id: trunk@5817 -
2007-01-05 12:37:14 +00:00
Jonas Maebe
a23fa2e81e
* moved (unfinished) routines related to writing taicpu's to ppu files
...
from x86/aasmcpu to aasmtai and (new) aasmsym, so that when they're
finished they're available for all targets
* added dummy implementation of tai_cpu_abstract.pass1 and pass2 so there
are no more hundreds of warnings on non-x86 about constructing taicpu
instances with abstract methods
git-svn-id: trunk@5787 -
2007-01-02 18:28:05 +00:00
pierre
fc66d46beb
+ added several warnings about use of references
...
involving (%ebp) or (%esp) in assembler code.
Useful to track code that might suffer from regcall
convention.
git-svn-id: trunk@5736 -
2006-12-29 09:37:15 +00:00
Jonas Maebe
05a07a7dd2
* better fix for previous revision
...
* also applied to x86 and m68k
git-svn-id: trunk@5512 -
2006-11-30 20:55:32 +00:00
florian
836dbad1b2
* bitpacked stuff fixed for x86-64
...
git-svn-id: trunk@5503 -
2006-11-26 21:57:34 +00:00
florian
6118c3e477
* fixed assembling of movd with 64 bit registers
...
* fixed passing of floats to c varargs
git-svn-id: trunk@5477 -
2006-11-25 20:32:32 +00:00
peter
0557ddc342
* removed typed const, it is now handled by staticvarsym
...
* globalvarsym renamed to staticvarsym
* fixed invalid regvar use in init when the finalize also uses the var
git-svn-id: trunk@5290 -
2006-11-08 21:04:22 +00:00
peter
e17b424e28
* refactor procsym procdef list
...
git-svn-id: trunk@5210 -
2006-11-03 18:44:46 +00:00
peter
658c46b903
* remove tdictionary and tindexarray
...
* symtables based on TFPHashObjectList and TFPObjectList
* rename torddef.typ to torddef.ordtype
* rename tfloatdef.typ to tfloatdef.floattype
* rename tdef.deftype to tdef.typ
* remove obsolete browser code, browcol is kept so the ide
can still be compiled
git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
peter
1684a6fc32
* replaced tdictionary with tfphashlist
...
git-svn-id: trunk@5148 -
2006-11-01 14:26:50 +00:00
peter
05183ac829
* AsmSymbolDict changed to FPHashObjectList
...
git-svn-id: trunk@5139 -
2006-11-01 00:22:13 +00:00
peter
cb246eb781
* Remove dos,strings units, use SysUtils instead
...
* replace split* functions with Extract* functions
* Add Directory caching
git-svn-id: trunk@5102 -
2006-10-30 23:29:35 +00:00
florian
ef7bd58c54
* germanism removed (aktfilepos -> current_filepos)
...
git-svn-id: trunk@5099 -
2006-10-30 22:37:31 +00:00
florian
85d63d9fa9
* settings refactored
...
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
3078a1927f
* remove ttype
...
* rename old ttype variables *type to *def
* rename resulttypepass to pass_typecheck
* rename pass_2 to pass_generate_code
git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
daniel
3125ed73cf
* Add one more call to get_alias
...
git-svn-id: trunk@5000 -
2006-10-22 09:18:37 +00:00
daniel
01afee1f73
* Add extra calls to get_alias to properly recognize coalesced
...
registers to be spilled.
git-svn-id: trunk@4997 -
2006-10-21 21:31:08 +00:00
peter
076fb20774
* don't apply typesize of record if a field size is applied
...
git-svn-id: trunk@4971 -
2006-10-18 21:22:00 +00:00
peter
1de2f94b28
* fixed typo in r4848
...
git-svn-id: trunk@4966 -
2006-10-18 20:19:44 +00:00
florian
b22e688ad8
* fixed fstenv instruction dat
...
git-svn-id: trunk@4907 -
2006-10-14 16:53:39 +00:00
florian
66b1932d52
* fixed rex writing for floating point instructions
...
git-svn-id: trunk@4898 -
2006-10-14 11:21:17 +00:00
peter
71665dbc4c
* initial addr_pic support for x86_64 binary writer
...
git-svn-id: trunk@4848 -
2006-10-10 18:36:41 +00:00
florian
fb5e396881
+ experimental -Sv option to support vector arithmetics
...
git-svn-id: trunk@4825 -
2006-10-07 21:39:48 +00:00
peter
d07f470b71
* remove ifdef fpc
...
git-svn-id: trunk@4819 -
2006-10-07 13:43:34 +00:00
micha
d704af7216
fix compilation for {$T+} linux/win
...
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +00:00
peter
cc1f9f8a9b
* handle . in a reference like +
...
git-svn-id: trunk@4769 -
2006-10-02 17:39:22 +00:00
peter
5de217f04c
* movzx reference size fallback to byte for delphi mode
...
git-svn-id: trunk@4768 -
2006-10-02 17:33:52 +00:00
peter
0bb22a2d17
* don't generate fwait by default anymore
...
* SAVEFPUEXCEPTIONS switch added to enable fwait inserts
git-svn-id: trunk@4733 -
2006-09-26 19:22:45 +00:00
florian
efd24ba7a0
* x86_64 abis ensure that the direction flag is clear at procedure entry
...
git-svn-id: trunk@4689 -
2006-09-23 10:08:47 +00:00
Jonas Maebe
2000c7d3e3
* used "gas" instead of "as" for Solaris (both sparc and x86)
...
and not for linux/sparc
git-svn-id: trunk@4659 -
2006-09-19 13:38:44 +00:00
florian
abc957d80d
* fixed stack initialization on Win x64, still not sure if it is necessary
...
git-svn-id: trunk@4617 -
2006-09-12 20:49:18 +00:00
Jonas Maebe
51259b697b
* more mmx/sse register spilling fixes:
...
* operand read/write info for movaps and movapd
* use "movapd reg,reg" instead of "movaps reg,reg" if appropriate
so the spilling code can spill the correct size to memory
* replace movaps/movapd with movss/movsd when spilling to memory
instead of movq
git-svn-id: trunk@4612 -
2006-09-12 11:07:45 +00:00
Jonas Maebe
cd0c38b9d9
* fixed spilling of mmx registers
...
git-svn-id: trunk@4604 -
2006-09-10 15:59:58 +00:00
Jonas Maebe
e2872c9aea
* fixed more missing subsetreg/subsetref support
...
git-svn-id: trunk@4595 -
2006-09-09 22:10:32 +00:00
Jonas Maebe
b9f32e1828
* use expectloc instead of location.loc in pass1
...
git-svn-id: trunk@4594 -
2006-09-09 22:06:46 +00:00
florian
b3ae0c51a4
* sizes2load handles OS_NO properly if one size is given
...
git-svn-id: trunk@4586 -
2006-09-09 18:12:07 +00:00
Jonas Maebe
1a8c2f405d
* fixed for subsetref/subsetreg
...
git-svn-id: trunk@4578 -
2006-09-09 09:31:14 +00:00
florian
930086df3f
* fixed cvtsi2sd for 64 bit ints
...
git-svn-id: trunk@4575 -
2006-09-08 21:34:12 +00:00
florian
55484f9bb7
* shifting can operate on 64 bit values on x86_64
...
git-svn-id: trunk@4561 -
2006-09-07 19:41:02 +00:00
peter
d79df4c74a
* 64bit support for shrd
...
git-svn-id: trunk@4541 -
2006-09-03 08:56:10 +00:00
florian
e1d1f92672
* don't write rex twice
...
git-svn-id: trunk@4525 -
2006-08-31 21:58:13 +00:00
florian
6d0a078441
* do stack page initialization on i386-wince as well
...
git-svn-id: trunk@4521 -
2006-08-31 14:23:29 +00:00
florian
5118e35016
* another mayewriterex added, fixes #7261
...
git-svn-id: trunk@4511 -
2006-08-27 18:49:12 +00:00
Jonas Maebe
6845c1e05a
+ subsetref support
...
git-svn-id: trunk@4492 -
2006-08-23 17:59:02 +00:00
florian
9e66674ff9
+ first part of qwordbool implementation
...
git-svn-id: trunk@4462 -
2006-08-19 23:16:17 +00:00
Jonas Maebe
90cacb4cf5
* changed result type of dwarf_reg from byte to shortint to avoid
...
warning about comparison which can never be true
git-svn-id: trunk@4183 -
2006-07-14 17:25:16 +00:00
Jonas Maebe
502556bd46
+ subsetreg support
...
git-svn-id: trunk@4059 -
2006-07-02 08:07:10 +00:00
peter
34a58e5287
* fix alignment padding for x86_64
...
git-svn-id: trunk@4001 -
2006-06-29 20:34:54 +00:00
peter
28720c4173
* remove unneeded check
...
git-svn-id: trunk@3986 -
2006-06-27 22:29:19 +00:00
Jonas Maebe
a3a74c3fbe
* fixed interface wrappers for darwin in case they end up in
...
a shared library
git-svn-id: trunk@3980 -
2006-06-27 14:32:14 +00:00
florian
6ef3a158e6
* fixed code generation for <word>+<word> saturated
...
git-svn-id: trunk@3969 -
2006-06-26 19:43:35 +00:00
peter
3167d18e6b
* fix modrm for r13, it has the same limitations as rbp
...
git-svn-id: trunk@3944 -
2006-06-25 17:21:16 +00:00
peter
55053a586b
* fix comisd
...
git-svn-id: trunk@3927 -
2006-06-23 21:41:19 +00:00
peter
2f147715f4
* more rex fixes
...
git-svn-id: trunk@3917 -
2006-06-21 19:51:09 +00:00
peter
b672df519a
* flexible position of REX, required for SSE2 commands
...
git-svn-id: trunk@3906 -
2006-06-20 22:38:30 +00:00
peter
56e56d0bd6
* simplified sse conversion code
...
git-svn-id: trunk@3905 -
2006-06-20 22:29:31 +00:00
peter
41c762a08d
* remove extdebug around rex checking
...
* move optional rex writing to routine and add call also for code 15
git-svn-id: trunk@3903 -
2006-06-20 18:59:27 +00:00