Commit Graph

727 Commits

Author SHA1 Message Date
Jonas Maebe
aaf6015b51 * converted tai directive string from pshortstring to ansistring (some
AIX directives are quite long)

git-svn-id: trunk@20799 -
2012-04-11 18:01:41 +00:00
pierre
20eaf3240a Accept x86_64_netbsd system for GNU as
git-svn-id: trunk@20745 -
2012-04-07 15:54:17 +00:00
pierre
2b5cadf271 + Add system_x86_64_openbsd to list of supported systems for as assembler
git-svn-id: trunk@20716 -
2012-04-05 21:08:14 +00:00
florian
fc569e224d * handle all operand combinations of xadd, resolves #21146
git-svn-id: trunk@20177 -
2012-01-25 21:26:59 +00:00
sergei
cbad0abab5 + Platform-specific exception support for x86_64-win64. Enable by cycling with OPT=-dTEST_WIN64_SEH.
git-svn-id: trunk@20098 -
2012-01-16 23:13:31 +00:00
florian
c4a5499d2a * handle flag to reg./ref. conversion correctly for boolean64
git-svn-id: trunk@19914 -
2011-12-29 17:28:35 +00:00
florian
a59a37dddd * handle assignments of qword bools with LOC_FLAGS correctly, resolves #20874
git-svn-id: trunk@19912 -
2011-12-29 16:48:46 +00:00
sergei
b3335abe75 * MOVSXD destination operand cannot be in memory, resolves #20850.
git-svn-id: trunk@19848 -
2011-12-13 22:56:24 +00:00
florian
60cccdcdbd * improve heuristics for copy_move vs. copy_string when optimizing for size, #20664
git-svn-id: trunk@19758 -
2011-12-04 21:18:56 +00:00
pierre
85862e476b Fix for test tw19368
git-svn-id: trunk@19643 -
2011-11-16 22:04:28 +00:00
sergei
ce3f850a68 * x86_64, use rip-relative references when taking address of local code labels, fixes test/library/tlib1a.pp for Linux and FreeBSD and passing exception address to FPC_RAISEEXCEPTION on Darwin.
git-svn-id: trunk@19616 -
2011-11-09 05:12:59 +00:00
sergei
e11c880b1e x86 assembler improvements:
* Don't generate rex.w for "CALL|JMP|LCALL|LJMP regmem", they are 64-bit by default.
* LCALL,LJMP flagged as calljump instructions.
* LCALL,LJMP encode only far jumps and don't accept register operands.
* GAS writer: fixed writing rip-relative operands of calljump instructions.
+ test.

git-svn-id: trunk@19413 -
2011-10-08 11:34:04 +00:00
florian
111d05c68f o patch by Alexander Shishkin, resolves #20409
* eliminate warnings in compiler (i386 & i368->x86_64) and minor refactorings
    - comment out unused vars and types
    - comment out unneeded comparisons (Longword <=> 0)
    - suppress some "comparison always true|false" warnings
    - tweak visiblity sections

git-svn-id: trunk@19385 -
2011-10-05 20:11:09 +00:00
sergei
c6d382fe18 * Moved procedure genlinearlist from ti386casenode to tx86casenode. This optimization works well on x86_64, resulting in approximately twice less instructions than when using generic code.
git-svn-id: trunk@19363 -
2011-10-04 11:48:33 +00:00
paul
7a74d2c2f8 compiler: reduce amount of hints and notes
git-svn-id: trunk@19293 -
2011-09-30 08:56:05 +00:00
sergei
4c21beb48e win64 unwinding, misc fixes:
* Insert seh_endprologue directive after the last prologue instruction, not before it
* Omit seh_stackalloc for zero bytes
* (For now) ignore SEH directives in NASM and MASM writers, instead of failing with internal error.

git-svn-id: trunk@19246 -
2011-09-26 13:55:21 +00:00
sergei
d94460e3b3 * Made the x86-specific scalefactor optimization of tvecnode available on x86_64 as well, by moving update_reference_reg_mul method from ti386vecnode to newly introduced tx86vecnode.
git-svn-id: trunk@19245 -
2011-09-26 12:58:59 +00:00
sergei
b997094755 + Generate unwind bytecode for function prologues on win64.
* For now placed actual processing of unwind info under {$ifdef TEST_WIN64_UNWIND}, because in the current state it doesn't add much value.

git-svn-id: trunk@19200 -
2011-09-23 21:22:25 +00:00
sergei
782cdd8e9a x86 external Intel assembler:
+ Write name of sec_threadvar
+ Also write actual section alignment instead of always using PARA.

git-svn-id: trunk@19069 -
2011-09-15 15:05:14 +00:00
pierre
5a671336c7 Fix go32v2 rtl compilation error and add warning for %es:Const
git-svn-id: trunk@19057 -
2011-09-13 16:20:12 +00:00
paul
4b24a58871 compiler: remove/hide few unused variables
git-svn-id: trunk@18912 -
2011-08-30 01:32:23 +00:00
florian
7e537161c4 * allow %seg. register:offset without (...), resolves #20035
git-svn-id: trunk@18861 -
2011-08-27 15:41:39 +00:00
florian
46cc0209de * make use of mulps/mulpd and haddps/haddpd/hsubpd/hsubps to optimze x*x+y*y and x*x-y*y where x and y might be single or double
git-svn-id: trunk@18790 -
2011-08-20 12:34:37 +00:00
florian
13ac5d185f * fix add_move_instruction for sse moves
git-svn-id: trunk@18789 -
2011-08-20 12:30:47 +00:00
florian
ca1f33aae1 * extended do_spill_replace with some sse instructions
git-svn-id: trunk@18788 -
2011-08-20 12:29:41 +00:00
florian
e8dafe4dde * fixed change information for a lot of sse instructions
git-svn-id: trunk@18787 -
2011-08-20 12:28:49 +00:00
florian
c011949765 + iretq for x86_64
git-svn-id: trunk@18273 -
2011-08-19 12:56:26 +00:00
florian
860d753055 * treat registers (and identifiers of register parameter) as normal identifiers when parsing record fields in intel assembler, resolves #19555
git-svn-id: trunk@18268 -
2011-08-18 21:58:30 +00:00
florian
87696a4b70 * cr*, dr*, tr* registers are 64 bit on x86-64
git-svn-id: trunk@18243 -
2011-08-17 11:42:11 +00:00
florian
8308b46a94 + support for assembler instructions with four operands
+ support for insertq, resolves #19910

git-svn-id: trunk@18206 -
2011-08-14 16:46:35 +00:00
florian
58d1a66cd0 * set max_operands to 4 on x86 to be prepared for avx and to be able to fix #19910,
- memory usage of a compiler compilation increases by approx. 2 per cent due to this
  - actually docs say avx has operations with 5 parameter, however I were not able to find
    an instruction having 5 operands

git-svn-id: trunk@18202 -
2011-08-14 09:09:57 +00:00
pierre
bafbbe9f0f * Fix bug report 7210
git-svn-id: trunk@18154 -
2011-08-09 15:52:03 +00:00
sergei
0231863fce + Added missing PMULLD instruction, part of Mantis #19910
git-svn-id: trunk@18106 -
2011-08-06 06:59:33 +00:00
pierre
cff85bdb3b * Rename ag386nsm.pas unit source to agx86nsm.pas
git-svn-id: trunk@17933 -
2011-07-04 09:13:55 +00:00
pierre
f6ab12d677 * Move ag386nsm.pas to x86 directory
git-svn-id: trunk@17932 -
2011-07-04 09:08:54 +00:00
florian
01e9eacf5c * merge changes committed to the wrong branch
git-svn-id: trunk@17857 -
2011-06-28 18:23:02 +00:00
pierre
3fd3cc8099 * Avoid warning for i386 cpu
git-svn-id: trunk@17851 -
2011-06-28 08:02:35 +00:00
florian
26850e3425 * fix full cycle after adding new boolean types
git-svn-id: branches/pasboolxx@17847 -
2011-06-27 20:11:08 +00:00
florian
d35d1ed357 + initial support for pascal booleans with sizes 2, 4 and 8
git-svn-id: branches/pasboolxx@17836 -
2011-06-26 15:02:37 +00:00
sergei
7d99f95c45 * Always create a section before emitting data to current_asmdata.asmlists[al_typedconsts]. Without it, such data ends up in sections created elsewhere, creating very non-obvious dependencies on other parts of compiler.
git-svn-id: trunk@17816 -
2011-06-24 02:05:56 +00:00
pierre
8a0ed92957 * Remove useless code for i386
git-svn-id: trunk@17806 -
2011-06-23 14:50:31 +00:00
sergei
19c8000056 64-bit masm writer:
* fixed writing rip-relative references
* use correct name to close the last section

git-svn-id: trunk@17710 -
2011-06-10 03:47:13 +00:00
sergei
354d0520b7 + x86 assembler: fixed MOVABS instruction (it is a x86_64-only subset of MOV with 8-byte immediates/offsets) and same-form encodings of MOV instruction.
git-svn-id: trunk@17666 -
2011-06-05 17:32:18 +00:00
florian
2005f6869b * cycling with $R+ fixed
git-svn-id: trunk@17600 -
2011-05-28 21:18:35 +00:00
sergei
5bda700410 * External assemblers: moved some common code into the base class, 4 copies reduced to one.
git-svn-id: trunk@17561 -
2011-05-26 13:10:49 +00:00
sergei
d89aeeadaf x86 assembler:
* Adjust rip-relative offsets using values known from calcsize, instead of reinterpreting the tail of instruction. This is simpler and remains the same regardless of particular codes used in opcode table.
* Reduced maxinfolen to 8.
- 'jmp imm64' and 64-bit versions of 'in' do not exist, removed.

git-svn-id: trunk@17546 -
2011-05-23 20:43:50 +00:00
sergei
504e0c6816 x86 assembler fixes:
* mkx86ins.pp: 'regmem' operand type in x86ins.dat must be converted to OT_RM_GPR, not OT_REGMEM. The latter does not restrict register type, allowing to use e.g. xmm registers in place of regular ones. 
* Finished 'movd' and 'movq', added some tests for them to tasm2.pp.

git-svn-id: trunk@17515 -
2011-05-20 20:39:35 +00:00
sergei
08ff5ff051 * x86 Intel assembler reader: disallow more than one register name per register operand, resolves #15672.
git-svn-id: trunk@17507 -
2011-05-19 20:00:15 +00:00
sergei
08e895cf7c * Fixed handling of 'movq' instruction by assembler reader, resolves #18205.
git-svn-id: trunk@17497 -
2011-05-19 06:44:24 +00:00
sergei
1aa5c4ac0e * Fixed wrong ModRM byte in movq encoding, causing regression of test/cg/tcalext6 in r17490.
git-svn-id: trunk@17493 -
2011-05-18 14:55:26 +00:00