Commit Graph

523 Commits

Author SHA1 Message Date
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