nickysn
fd9e0d7266
* i8086 binary writer fixes for asm codes 0320..0322
...
git-svn-id: trunk@30526 -
2015-04-09 23:10:47 +00:00
nickysn
db5276af61
* i8086 binary writer fixes for asm codes 0300..0302
...
git-svn-id: trunk@30525 -
2015-04-09 22:56:47 +00:00
nickysn
0aa8e9d829
+ i8086 fixes in the binary writer for asm codes 0310 and 0311
...
git-svn-id: trunk@30524 -
2015-04-09 22:47:21 +00:00
nickysn
8597208ed9
* fixed emitting a 66h prefix for push/pop of segment registers on i8086 in the internal asm writer
...
git-svn-id: trunk@30523 -
2015-04-09 22:01:24 +00:00
nickysn
ff20a3c7bc
+ support 16-bit addresses for codes 36..38 in the internal asm writer on i8086
...
git-svn-id: trunk@30521 -
2015-04-09 21:16:22 +00:00
nickysn
470fb65e80
+ implemented aasmcpu.process_ea for i8086
...
git-svn-id: trunk@30495 -
2015-04-08 12:54:09 +00:00
Jonas Maebe
67b8aceaee
* synchronized with privatetrunk till r30095
...
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
pierre
da55d9ded2
Also disable overflow where range check is disabled in aasmcpu unit
...
git-svn-id: trunk@29989 -
2015-02-24 15:58:49 +00:00
Jonas Maebe
1a949eae1f
* fixed i8086 compilation
...
git-svn-id: trunk@29807 -
2015-02-23 08:51:59 +00:00
florian
5946328ed6
* CPUs not having CMOV apparently do not support the newly introduced Multibyte NOPs (Agner, Optimizing subroutines in assembly
...
language, An optimization guide for x86 platforms, Page 87), so restored the 32 Bit part of the old alignment
bytes for use on those old CPUs and use it depending on the CPU switches
git-svn-id: trunk@29777 -
2015-02-21 20:50:42 +00:00
florian
255c4feef6
* new code alignment fillings based on the discussion at http://www.lazarusforum.de/viewtopic.php?f=10&t=8487
...
git-svn-id: trunk@29772 -
2015-02-21 10:09:39 +00:00
florian
d6e4af8279
+ applied remaining patches of Torsten Grundke: adds gather instructions of avx2
...
git-svn-id: trunk@29745 -
2015-02-17 21:43:46 +00:00
florian
d540d56908
* unified internal errors
...
git-svn-id: trunk@29280 -
2014-12-13 11:46:59 +00:00
florian
ed11244632
* improved formatting
...
git-svn-id: trunk@28742 -
2014-10-04 17:52:17 +00:00
florian
8635894de4
* merged new changes to avx2 branch (AVX2 vectory-memory support) by Torsten Grundke
...
git-svn-id: trunk@28527 -
2014-08-27 21:06:23 +00:00
Jonas Maebe
7949bebb8d
* synchronised with r28168 of trunk
...
git-svn-id: branches/hlcgllvm@28169 -
2014-07-05 21:30:28 +00:00
sergei
e7cd5319f0
* Put under {$ifndef x86_64} more cases of instructions that do not exist in 64-bit mode.
...
git-svn-id: trunk@27933 -
2014-06-11 12:51:38 +00:00
Jonas Maebe
bacd303208
* synchronized with trunk up to r27758
...
git-svn-id: branches/hlcgllvm@27779 -
2014-05-12 16:12:34 +00:00
michael
36c662f69f
* Extention -> extension (By Reinier, bug ID #25979 )
...
git-svn-id: trunk@27750 -
2014-05-10 15:29:29 +00:00
nickysn
c9f8703679
+ set ref.segment to NR_SS for all temps/localvars on i8086. This allows the
...
segment to survive e.g. several nested vecnodes, which cause the base register
to change from BP to something else. In the cases where the ss: prefix is not
needed, it is removed by make_simple_ref.
+ remove the ss: prefix in the several cases where make_simple_ref isn't called
(namely spilling and tcg8086.a_call_reg_far)
git-svn-id: trunk@27714 -
2014-05-01 21:18:47 +00:00
florian
842e027a9f
+ prove of concept how FMA4 could be supported in inline assembler
...
git-svn-id: trunk@27214 -
2014-03-20 21:25:38 +00:00
florian
a79be2b05c
+ support for FMA instructions in inline assembler
...
+ extended avx test code with FMA
git-svn-id: trunk@27209 -
2014-03-20 20:06:56 +00:00
florian
aa107b914c
* merged avx2 branch, developed by Torsten Grundke
...
git-svn-id: trunk@27200 -
2014-03-20 12:03:52 +00:00
Jonas Maebe
e9268a0a14
* synchronised with trunk up till r26975
...
git-svn-id: branches/hlcgllvm@26976 -
2014-03-06 21:36:58 +00:00
nickysn
c83032992d
* more fixes to the 3-op IMUL spilling:
...
o Return the correct operation type for all forms of IMUL in
taicpu.spilling_get_operation_type
o Properly support 3-op IMUL in trgx86.do_spill_replace
git-svn-id: trunk@26514 -
2014-01-18 21:46:13 +00:00
sergei
e6a9f3b15b
* Fixed spilling of 3-operand IMUL instruction (went unnoticed this far because such instructions were not emitted by compiler).
...
git-svn-id: trunk@26510 -
2014-01-18 19:21:48 +00:00
florian
4d5119bf1c
* fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
...
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
Jonas Maebe
1df3039424
+ LLVM temp allocator based on new R_TEMPREGISTER register class. For every
...
temp we allocate, we set the base register to a newly allocated
R_TEMPREGISTER. This allows for uniquely identifying a temp even if its
offset is modified.
git-svn-id: branches/hlcgllvm@26033 -
2013-11-11 11:14:59 +00:00
florian
f132a804d6
+ handle 32 bit references on x86-64 so lea can be used for 32 bit arithmetics
...
git-svn-id: trunk@25909 -
2013-11-01 19:01:39 +00:00
nickysn
f6e846c574
+ added the NEC V20/V30 instructions
...
git-svn-id: trunk@25750 -
2013-10-11 21:27:56 +00:00
sergei
5af873ee5b
* x86 targets: Profiling shows that quite a bit of time is spent in findreg_by_number(), despite it uses binary search. Worse, it is repeated for every piece of register information. Trying to get rid of some of these calls: rearranged registers so that their "opcode" matches 3 LSBs of superregister number (with a few exceptions described at the beginning of x86reg.dat). This allows to lookup opcodes in regval() with O(1) complexity, and removes need in rXXXop.inc files.
...
git-svn-id: trunk@25627 -
2013-10-03 08:08:04 +00:00
sergei
2c79314d59
* IF_SANDYBRIDGE designates CPU family, not feature. Mostly a cosmetic change, since we don't use these flags for anything.
...
git-svn-id: trunk@25626 -
2013-10-03 06:06:34 +00:00
sergei
7e6a7f20cc
- Removed unused variables and dead assignments.
...
git-svn-id: trunk@25424 -
2013-09-05 09:05:56 +00:00
florian
9b6094a58c
+ added a few BMI instructions to see if they can be encoded
...
git-svn-id: trunk@24907 -
2013-06-16 09:35:21 +00:00
florian
e81d2d1f3b
* basic avx support for floating point operations (use -Cfavx to activate)
...
git-svn-id: trunk@24896 -
2013-06-14 20:03:01 +00:00
nickysn
92afd7cccd
+ R_SUBH support added in x86/aasmcpu.spilling_create_load and spilling_create_store
...
git-svn-id: trunk@24477 -
2013-05-09 14:10:45 +00:00
nickysn
fef3732884
* i8086 compilation fixes
...
git-svn-id: branches/i8086@24244 -
2013-04-14 16:34:02 +00:00
florian
ad0b0455d8
* extended comment
...
git-svn-id: branches/i8086@24152 -
2013-04-04 21:06:10 +00:00
nickysn
c3aaa37c0c
* fixed a bug which caused non commutative fpu instructions to be wrong when using an intel-style external assembler and compiling a smartlinked unit
...
git-svn-id: branches/i8086@24151 -
2013-04-04 20:17:50 +00:00
florian
24f9d0d770
* cancel warning on i8086 because it stops compilation (the compiler is normally build with -Sew)
...
git-svn-id: branches/i8086@23933 -
2013-03-19 20:10:52 +00:00
Jonas Maebe
5d628b29bb
* set the subregsize of OS_M64 SSE registers to R_SUBQ so we can
...
differentiate between 64 bit and 128 bit (R_SUBMMWHOLE) SSE vector regs,
and support spilling/assembling for R_SUBQ SSE registers (8 bytes)
(mantis #23962 )
We currently never use the full 128 bit of an SSE register, and
spilling for those hasn't been implemented yet either (R_SUBMMWHOLE
SSE regs are spilled into a 4-byte temp currently -> can overwrite data)
git-svn-id: trunk@23700 -
2013-03-06 12:42:46 +00:00
florian
a499a30ca9
* fixes to avx support by Torsten Grundke
...
git-svn-id: trunk@22773 -
2012-10-19 16:45:53 +00:00
florian
283ff05127
* merged avx support in inline assembler developed by Torsten Grundke
...
git-svn-id: trunk@22568 -
2012-10-06 19:47:18 +00:00
sergei
21524c56c6
* If subtrahend symbol belongs to current section, generate a RELATIVE relocation instead of PIC_PAIR. Now the corresponding relative expressions in assembler operands compile correctly on all i386 targets (and x86_64 too, although such feature is less important there).
...
+ Test.
git-svn-id: trunk@21864 -
2012-07-11 09:05:21 +00:00
Jonas Maebe
313e976256
* avoid spurious range errors due to longint+qword expressions (results in
...
both values getting converted to a qword, which causes a range error
in case the longint is smaller than 0)
git-svn-id: trunk@21621 -
2012-06-15 16:58:27 +00:00
paul
4b24a58871
compiler: remove/hide few unused variables
...
git-svn-id: trunk@18912 -
2011-08-30 01:32:23 +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
pierre
8a0ed92957
* Remove useless code for i386
...
git-svn-id: trunk@17806 -
2011-06-23 14:50:31 +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
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
9e8a31193b
x86 assembler:
...
* Optimized the opcode representation of movq and remaining 3DNow instructions
* Disallow immediates not fitting in 32 bits (Mantis #14685 ) + test
* Disallow push/pop with 32-bit operands in x86_64 + test
git-svn-id: trunk@17490 -
2011-05-17 20:06:12 +00:00
sergei
d908fb42f7
x86 assembler fixes:
...
* Factored repeating REX operations into a separate function.
* Fixed instruction matching bug which was preventing compilation of 3-operand SIMD instructions with RIP-relative operand + test.
* Do not adjust offset of RIP-relative reference if it is a literal number, this was causing 0x123(%rip) to assemble as 0x122(%rip) in 3-operand instructions. Now tasm2.pp is the same with and without -Aas. Also fixed the expected result, improved verbosity of diagnostic and removed %norun, so it is actually executed.
+ Disallow high-byte registers in instructions requiring REX + test.
git-svn-id: trunk@17478 -
2011-05-16 20:18:03 +00:00
sergei
86d0c7f4c5
* x86 assembler: write REX prefix before the first literal byte of instruction (this becomes possible once the instruction table has all $66,$F2,$F3 prefixes changed to non-literal control codes). This way it is no longer necessary to manually specify position of REX in every instruction entry (code \323 becomes obsolete), and the situation when REX is not written (IE 200603191) is hopefully gone forever.
...
git-svn-id: trunk@17456 -
2011-05-14 16:02:31 +00:00
sergei
6d0d8734e0
* x86 assembler: operand type declarations rewritten using expressions instead of literal numbers where possible. Reassigned bit values to match the current NASM (the values themselves don't actually matter and can be chosen pretty arbitrary. What matters is the clean separation between different parts of the bitmask. In particular, the old value of XMM register class bit was equal to OT_BITS80, causing matching algorithm to effectively ignore it and accept e.g. MMX registers in place of XMM ones, part of Mantis #14387 ).
...
* Fixed matching of memory references with OT_XMMRM and OT_MMXRM.
git-svn-id: trunk@17449 -
2011-05-14 00:07:07 +00:00
sergei
de8ae0f873
x86 assembler improvements:
...
* Simplified REX handling: instead of useless adjusting instruction length on every REX change, adjust it just once, based on the final REX value.
* Similar for omitting REX.W in certain instructions: set a flag and consider it once the entire instruction has been processed. This removes the requirement for \335 to be the last opcode.
* maybewriterex also after $F2 prefix
* Fixed behavior of codes \310 and \311 (16- and 32-bit address respectively), this is needed for a few fancy instructions like LOOP and JCXZ, which honor address-size prefix instead of REX.
+ control code \361 for $66 prefix
+ IF_SSSE3, IF_SSE41, IF_SSE42 instruction flags (with dummy values)
x86/x86ins.dat:
* replaced literal $67 prefixes with \310 or \311
* marked encodings containing code \310 as NOX86_64
* replaced literal $48 prefixes with \326
git-svn-id: trunk@17433 -
2011-05-12 13:09:51 +00:00
sergei
d288592c5a
+ Declared operand types OT_XMMRM (matches either xmm register or 128-bit memory reference) and OT_MMXRM (same for mmx).
...
* Modified taicpu.Pass2 to exclude non-definitely assigned variable and issue InternalError if impossible segment prefix is used.
git-svn-id: trunk@17374 -
2011-04-26 16:34:36 +00:00
Jonas Maebe
0da9d36116
* fixed internal assembler for x86-64 so that it correctly handles
...
relocations for addr_pic_no_got references (do not go via the GOT)
* fixed code generator so that it generates addr_pic_no_got references
also for platforms that use the internal assembler (this will break linking
of some tests that check static data > 2GB on Linux/x86-64, but they were
already broken before as well because we don't use the "huge" x86-64
execution model)
* fixed x86-64 Linux syscall code to not expect GOT-based relocations for
the system unit's errno variable (it's an implementation-only variable)
git-svn-id: trunk@16717 -
2011-01-06 09:28:25 +00:00
pierre
386478cd77
* Allow any register for GOT if current procedure has assembler code
...
git-svn-id: trunk@16110 -
2010-10-08 13:20:28 +00:00
pierre
d2939bce3d
* i386 _GLOBAL_OFFSET_TABLE_ label special treatment moved to taicpu.pass2
...
git-svn-id: trunk@16100 -
2010-10-07 14:14:25 +00:00
mazen
b127fc154a
* Fixed spell error revealed by lintian.
...
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
pierre
292e85a59a
* Partial fix for i386 linux PIC code generation
...
git-svn-id: trunk@16080 -
2010-10-05 08:07:15 +00:00
Jonas Maebe
28cd8271c9
* initial version of internal Mach-O/i386 assembler by Dmitry Boyarintsev
...
(mantis #15163 )
git-svn-id: trunk@14628 -
2010-01-12 19:52:55 +00:00
florian
4123e0425c
* don't generate instruction alignment fill bytes in non exectuable sections
...
git-svn-id: trunk@14251 -
2009-11-21 22:34:46 +00:00
Jonas Maebe
ec8fee45fe
* do not access local data via the GOT on x86_64, because
...
a) it's unnecessary
b) it's slower than "direct" RIP-relative accessing
c) it's not supported on darwin/x86_64 in certain cases
* never use absolute addressing on darwin/x86_64 (like on win64)
* when not generating PIC, make sure that a_loadaddr_ref_reg on x86_64
also uses RIP-relative addressing for darwin/x86_64 and win64
git-svn-id: trunk@13760 -
2009-09-27 13:43:56 +00:00
Jonas Maebe
146a819615
* fixed spilling of and operations on spilled 32 bit values for x86_64
...
(mantis #14403 )
git-svn-id: trunk@13573 -
2009-08-21 16:20:16 +00:00
yury
92ad06f1e8
* Always use RIP relative symbol addressing for x86_64 Windows targets. Bug #13657 .
...
* Support for simple form of RIP relative addressing by x86_64 assembler writer. Example: movl rax,SomeSymbol(%rip)
git-svn-id: trunk@13135 -
2009-05-13 10:07:44 +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
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
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
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
peter
d74bd34a91
* fix 32bit truncation in type determination of constant operands
...
git-svn-id: trunk@8909 -
2007-10-22 16:36:41 +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
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
peter
67e16340be
* revert r8118
...
git-svn-id: trunk@8139 -
2007-07-22 19:59:00 +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
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
0e96eda236
+ some sse4 instructions supported, resolves #9046
...
git-svn-id: trunk@7613 -
2007-06-09 19:45:06 +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
florian
d55dbf92d3
* fixed assembling of cvt(t)ss2si
...
git-svn-id: trunk@6918 -
2007-03-18 17:35:22 +00:00
Jonas Maebe
9813a8708c
* fixed encoding of jcxz
...
git-svn-id: trunk@6398 -
2007-02-10 20:38:38 +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
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
florian
ef7bd58c54
* germanism removed (aktfilepos -> current_filepos)
...
git-svn-id: trunk@5099 -
2006-10-30 22:37:31 +00:00
peter
1de2f94b28
* fixed typo in r4848
...
git-svn-id: trunk@4966 -
2006-10-18 20:19:44 +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
micha
d704af7216
fix compilation for {$T+} linux/win
...
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +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
florian
e1d1f92672
* don't write rex twice
...
git-svn-id: trunk@4525 -
2006-08-31 21:58:13 +00:00
florian
5118e35016
* another mayewriterex added, fixes #7261
...
git-svn-id: trunk@4511 -
2006-08-27 18:49:12 +00:00
peter
34a58e5287
* fix alignment padding for x86_64
...
git-svn-id: trunk@4001 -
2006-06-29 20:34:54 +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
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
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
florian
307315cef6
* movq is also a pure move
...
git-svn-id: trunk@3588 -
2006-05-19 23:52:10 +00:00
florian
ac4bde88ac
* fix 3 operand instructions with third operand being a constant
...
git-svn-id: trunk@3502 -
2006-05-13 19:51:32 +00:00
florian
98d428ff30
* fixed coding style
...
git-svn-id: trunk@3338 -
2006-04-26 18:13:14 +00:00
peter
22ada6da0d
* initialize output of process_ea
...
git-svn-id: trunk@3323 -
2006-04-23 19:19:49 +00:00
florian
f702b481f0
* fixed assembling of (%rbp)
...
git-svn-id: trunk@3239 -
2006-04-17 07:58:37 +00:00
peter
583668896a
* rex is x86_64 only
...
git-svn-id: trunk@3078 -
2006-03-30 06:21:38 +00:00
florian
8ba4fcaad9
* fixed handling of code 214
...
git-svn-id: trunk@3075 -
2006-03-29 20:24:36 +00:00
florian
2cfd698273
* sib is required for r12 based addressing too
...
git-svn-id: trunk@3069 -
2006-03-28 21:15:00 +00:00
florian
7a34d58a15
* encode new 8 bit registers correctly
...
git-svn-id: trunk@3064 -
2006-03-27 20:41:28 +00:00
florian
e1147755df
* fixed cmp
...
* correct sign extension for 8 byte constants
git-svn-id: trunk@3063 -
2006-03-27 20:24:57 +00:00
florian
56dc874476
* rsp based addressing fixed
...
git-svn-id: trunk@3045 -
2006-03-26 20:14:17 +00:00
florian
5d243f665a
* fixed <instr> reg,reg with regs>=r8
...
* fixed section naming
* fixed relocations
git-svn-id: trunk@3041 -
2006-03-26 17:54:02 +00:00
florian
42fab68bc8
* fixed disp32 and rip relative addressing
...
git-svn-id: trunk@3039 -
2006-03-26 13:38:21 +00:00
florian
4c9a08b12b
* more x86_64 assembler support, rtl compilation works, executables don't work yet
...
git-svn-id: trunk@3038 -
2006-03-26 09:38:05 +00:00
florian
5519158dff
+ no rex.w prefix support
...
git-svn-id: trunk@3037 -
2006-03-25 19:45:09 +00:00
florian
ec768f88ae
+ improved x86-64 assembler
...
git-svn-id: trunk@2983 -
2006-03-19 22:24:01 +00:00
peter
37c81492ad
Merged revisions 2827,2831,2837,2932-2980 via svnmerge from
...
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler
r2827 (peter)
* smartlinking of resourcestrings
r2831 (peter)
* process_ea 64bit fixes
r2837 (peter)
* linker script
git-svn-id: trunk@2981 -
2006-03-19 22:12:52 +00:00
peter
b7fe6797bf
Merged revisions 2921-2922,2925 via svnmerge from
...
http://svn.freepascal.org/svn/fpc/branches/linker/compiler
........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines
* pass ObjectWriter to ObjectOuput
........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines
* refactor asmdata
........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines
* add cfi to asmdata
* move asmlist, asmcfi, asmdata to own unit
........
git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
eb725d4e44
Merged revisions 2908,2911,2913-2917 via svnmerge from
...
http://svn.freepascal.org/svn/fpc/branches/linker/compiler
........
r2908 | peter | 2006-03-13 13:35:48 +0100 (Mon, 13 Mar 2006) | 2 lines
* merge trunk upto r2907
........
r2911 | peter | 2006-03-13 18:08:00 +0100 (Mon, 13 Mar 2006) | 2 lines
* rename values to make room for operand size codes
........
........
........
r2915 | peter | 2006-03-14 13:51:35 +0100 (Tue, 14 Mar 2006) | 2 lines
* check aktcputype
........
r2916 | peter | 2006-03-14 15:06:32 +0100 (Tue, 14 Mar 2006) | 3 lines
* merge 300 opcodes
* more 64bit versions of opcodes
........
r2917 | peter | 2006-03-14 17:34:03 +0100 (Tue, 14 Mar 2006) | 3 lines
* x86_64 tables
* convert movq with normal registers to mov
........
git-svn-id: trunk@2931 -
2006-03-16 08:09:28 +00:00
peter
94d9a89774
* only set OT_SHORT if the source and target are in the same objsection
...
git-svn-id: trunk@2905 -
2006-03-13 12:28:22 +00:00
peter
17bc033747
Merged revisions 2791-2793,2798-2800,2806-2825,2829-2830,2833,2839,2898 via svnmerge from
...
http://svn.freepascal.org/svn/fpc/branches/linker/compiler
........
r2791 | peter | 2006-03-06 14:57:20 +0100 (Mon, 06 Mar 2006) | 3 lines
* disable internal linker if -s is used
* enable section smartlink by default for internal linker
........
r2792 | peter | 2006-03-06 14:58:23 +0100 (Mon, 06 Mar 2006) | 2 lines
* support long sectionnames
........
r2793 | peter | 2006-03-06 15:04:12 +0100 (Mon, 06 Mar 2006) | 2 lines
* register symbols in section also when reading .o files
........
r2798 | peter | 2006-03-07 10:08:07 +0100 (Tue, 07 Mar 2006) | 2 lines
* symbolrefs need to be loaded from relocations when loading a .o
........
r2799 | peter | 2006-03-07 16:17:52 +0100 (Tue, 07 Mar 2006) | 3 lines
* remove unreferenced sections
* set stacksize in peopthaeder
........
r2800 | peter | 2006-03-07 17:02:46 +0100 (Tue, 07 Mar 2006) | 2 lines
* objsection.fullname added
........
........
r2807 | peter | 2006-03-08 08:18:04 +0100 (Wed, 08 Mar 2006) | 2 lines
* powerpc64 fixes
........
r2808 | peter | 2006-03-08 08:35:53 +0100 (Wed, 08 Mar 2006) | 2 lines
* register x86_64_pecoff
........
r2809 | peter | 2006-03-08 11:26:38 +0100 (Wed, 08 Mar 2006) | 2 lines
* optimize and cleanup matches()
........
r2810 | peter | 2006-03-08 12:25:28 +0100 (Wed, 08 Mar 2006) | 2 lines
* small tweak to readdata to copy values direct without calling move()
........
r2811 | peter | 2006-03-08 15:55:21 +0100 (Wed, 08 Mar 2006) | 2 lines
* compile fix
........
........
........
........
........
........
r2817 | peter | 2006-03-09 14:20:52 +0100 (Thu, 09 Mar 2006) | 2 lines
* more readable with long secnames
........
........
........
........
........
........
........
........
r2825 | peter | 2006-03-10 09:52:05 +0100 (Fri, 10 Mar 2006) | 2 lines
* don't initialize/finalize external variables
........
r2829 | peter | 2006-03-10 10:58:08 +0100 (Fri, 10 Mar 2006) | 2 lines
* merge 64bit assembler
........
r2830 | peter | 2006-03-10 12:25:08 +0100 (Fri, 10 Mar 2006) | 2 lines
* TElfAssembler rename
........
r2833 | peter | 2006-03-10 15:22:27 +0100 (Fri, 10 Mar 2006) | 3 lines
* support & prefix to force identifier parsing, used to access fields that
have the names of a register
........
r2839 | peter | 2006-03-10 19:37:11 +0100 (Fri, 10 Mar 2006) | 2 lines
* merge stabs section flags
........
r2898 | peter | 2006-03-12 23:18:18 +0100 (Sun, 12 Mar 2006) | 2 lines
* reorder instructions for better first match
........
git-svn-id: trunk@2902 -
2006-03-13 09:29:57 +00:00
florian
5ece7cbc2f
* first part of x86-64 assembler
...
git-svn-id: trunk@2824 -
2006-03-09 22:05:16 +00:00
Jonas Maebe
ab5f5ca15e
* fixed ppc compilation
...
git-svn-id: trunk@2778 -
2006-03-05 22:06:44 +00:00
peter
785550d7e3
Merged revisions 2669,2673,2677,2683,2696,2699-2702,2704,2708,2712-2715,2718,2722-2723,2728-2730,2740,2769 via svnmerge from
...
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler
........
r2669 | peter | 2006-02-23 09:31:21 +0100 (Thu, 23 Feb 2006) | 2 lines
* add compiler dir
........
r2673 | peter | 2006-02-23 17:08:56 +0100 (Thu, 23 Feb 2006) | 2 lines
* enabled more code
........
r2677 | peter | 2006-02-24 17:46:29 +0100 (Fri, 24 Feb 2006) | 2 lines
* pe stub and headers
........
r2683 | peter | 2006-02-25 23:13:24 +0100 (Sat, 25 Feb 2006) | 2 lines
* section options cleanup
........
r2696 | peter | 2006-02-26 20:27:41 +0100 (Sun, 26 Feb 2006) | 2 lines
* fixed typecasts
........
r2699 | peter | 2006-02-26 23:04:32 +0100 (Sun, 26 Feb 2006) | 2 lines
* simple linking works
........
r2700 | peter | 2006-02-27 09:44:50 +0100 (Mon, 27 Feb 2006) | 2 lines
* internal linker script
........
r2701 | peter | 2006-02-27 12:05:12 +0100 (Mon, 27 Feb 2006) | 2 lines
* make elf working again
........
r2702 | peter | 2006-02-27 14:04:43 +0100 (Mon, 27 Feb 2006) | 3 lines
* disable dwarf for smartlinking with .a
* fix section start in new .a file
........
r2704 | peter | 2006-02-27 18:30:43 +0100 (Mon, 27 Feb 2006) | 2 lines
* stab section fixes
........
r2708 | peter | 2006-02-28 19:29:17 +0100 (Tue, 28 Feb 2006) | 2 lines
* basic work to merge stabs sections
........
r2712 | peter | 2006-02-28 23:17:48 +0100 (Tue, 28 Feb 2006) | 2 lines
* unload tmodules before linking
........
r2713 | peter | 2006-02-28 23:18:51 +0100 (Tue, 28 Feb 2006) | 2 lines
* fixed stabs linking
........
r2714 | peter | 2006-02-28 23:19:19 +0100 (Tue, 28 Feb 2006) | 2 lines
* show code and data size
........
r2715 | peter | 2006-02-28 23:25:35 +0100 (Tue, 28 Feb 2006) | 2 lines
* unload .stabs from objdata after it is merged
........
r2718 | peter | 2006-03-01 12:24:38 +0100 (Wed, 01 Mar 2006) | 3 lines
* memsize/datasize cleanup
* check for exports/resources when adding module to linker
........
r2722 | peter | 2006-03-03 09:12:20 +0100 (Fri, 03 Mar 2006) | 2 lines
* new TObjSymbol splitted from TAsmSymbol
........
r2723 | peter | 2006-03-03 14:08:55 +0100 (Fri, 03 Mar 2006) | 2 lines
* coff fixes after recent objsymbol changes
........
r2728 | peter | 2006-03-03 22:43:04 +0100 (Fri, 03 Mar 2006) | 2 lines
* fixed coff writer
........
r2729 | peter | 2006-03-04 01:10:32 +0100 (Sat, 04 Mar 2006) | 2 lines
* fix read-only opening
........
r2730 | peter | 2006-03-04 01:11:16 +0100 (Sat, 04 Mar 2006) | 2 lines
* Read edata from DLLs, basic work
........
r2740 | peter | 2006-03-04 21:13:43 +0100 (Sat, 04 Mar 2006) | 3 lines
* deletedef added
* don't remove defs from index when we are already clearing everything
........
r2769 | peter | 2006-03-05 21:42:33 +0100 (Sun, 05 Mar 2006) | 4 lines
* moved TObj classes to ogbase
* ObjSection.SymbolRefs and SymbolDefines list
* DLL importing
........
git-svn-id: trunk@2771 -
2006-03-05 21:10:37 +00:00
florian
de3ae0edd2
+ some new instructions added (VT, Geode etc), will regenerate later
...
git-svn-id: trunk@2680 -
2006-02-25 17:22:43 +00:00
florian
6ad3930a5d
* fixed broken powerpc compilation
...
* fixed imm24 constant matching on the arm
git-svn-id: trunk@1074 -
2005-09-11 16:13:55 +00:00
daniel
86da715b86
* Internal assembler refuses instructions with constant operand but
...
without opsize.
* Opsize added for int,ret,push by assembler reader if not specified
by programmer.
git-svn-id: trunk@608 -
2005-07-10 09:55:59 +00:00
florian
21ae782854
* fixed more xmm stuff
...
+ some win64 stuff added
git-svn-id: trunk@330 -
2005-06-09 20:50:17 +00:00
florian
ebcb69478f
* fixed a lot of stuff for fpu/mm register variables
...
git-svn-id: trunk@199 -
2005-06-04 21:23:15 +00:00
fpc
790a4fe2d3
* log and id tags removed
...
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3
initial import
...
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496
* truncate log
2005-02-14 17:13:06 +00:00
peter
ba3516dff6
* A_IMUL readwrite operand 1
2004-12-19 21:34:09 +00:00
florian
0037f4a199
* fixed operand size calculation for sse operands
...
+ all nasm assembler targets to help page output added
2004-12-12 10:50:34 +00:00
peter
6458bd0ce1
* tvarsym splitted
2004-11-08 22:09:58 +00:00
peter
c95a859f0a
* generic tlocation
...
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
peter
4bdae840a3
* reverted a minor move in the order of tinschange. The order
...
is required by the optimizer. Added also a remark
2004-10-04 21:11:24 +00:00
peter
f10c319261
* fix x86_64 compile
2004-10-04 20:55:04 +00:00
peter
ee3585f56f
* spilling code rewritten for x86. It now used the generic
...
spilling routines. Special x86 optimization still needs
to be added.
* Spilling fixed when both operands needed to be spilled
* Cleanup of spilling routine, do_spill_readwritten removed
2004-10-04 20:46:22 +00:00
peter
30a4185153
* IE when expecting top_ref
2004-09-27 15:12:47 +00:00
florian
8a9758c5e2
* logs truncated
2004-06-20 08:55:28 +00:00
florian
588e2c38bf
* dwarf branch merged
2004-06-16 20:07:06 +00:00
peter
38373b90d8
* check for top_ref instead of OT_MEMORY in needaddrprefix
2004-03-16 16:19:19 +00:00
michael
2f26f9ebb4
+ Fix from peter: fixes crash when inlining assembler code referencing local vars
2004-03-15 08:44:51 +00:00
peter
b601863598
* top_none in create_ot, it is used in error situations
2004-03-04 17:25:38 +00:00
florian
fabb9c33ac
* top_symbol killed
...
+ refaddr to treference added
+ refsymbol to treference added
* top_local stuff moved to an extra record to save memory
+ aint introduced
* tppufile.get/putint64/aint implemented
2004-02-27 10:21:04 +00:00
peter
e6929a1a32
* more x86_64 parameter fixes
...
* tparalocation.lochigh is now used to indicate if registerhigh
is used and what the type is
2004-02-09 22:14:17 +00:00
Jonas Maebe
71202a141d
* taicpu.is_same_reg_move() now gets a regtype parameter so it only
...
removes moves of that particular register type. This is necessary so
we don't remove the live_start instruction of a register before it
has been processed
2004-02-08 23:10:21 +00:00
Jonas Maebe
9495f77117
- removed taicpu.is_reg_move because it's not used anymore
...
+ support tracking fpu register moves by rgobj for the ppc
2004-02-08 20:15:42 +00:00
peter
221090453c
* x86_64 fixes for opsize
2004-02-05 18:28:37 +00:00
peter
663fa583d9
* real fix for the short jmp out of range problem. Only forward jumps
...
needs an offset correction. For backward jumps both the address of
the symbol and the instruction are already updated so no correction
is required.
2004-02-03 21:21:23 +00:00
daniel
97e87aaebc
* reginfo now also only allocated during register allocation
...
* third round of gdb cleanups: kick out most of concatstabto
2004-01-26 16:12:27 +00:00
florian
541955ad91
+ x86 instruction tables for x86-64 extended
2004-01-15 14:01:18 +00:00
peter
c34c9af5ce
* moved spilling code from taicpu to rg
2004-01-12 16:37:59 +00:00
peter
1c7e6fc380
* sparc updates
...
* use registertype in spill_register
2003-12-26 14:02:30 +00:00
florian
dd2bb53aa5
+ possible sse2 unit usage for double calculations
...
* some sse2 assembler issues fixed
2003-12-25 12:01:35 +00:00
florian
06442fa677
+ $fputype directive support
...
+ single data type operations with sse unit
* fixed more x86-64 stuff
2003-12-25 01:07:09 +00:00
peter
1367e342db
* reg allocations for imaginary register are now inserted just
...
before reg allocation
* tregister changed to enum to allow compile time check
* fixed several tregister-tsuperregister errors
2003-12-15 21:25:48 +00:00
daniel
7061f04355
* Register allocator speed optimizations
...
- Worklist no longer a ringbuffer
- No find operations are left
- Simplify now done in constant time
- unusedregs is now a Tsuperregisterworklist
- Microoptimizations
2003-12-14 20:24:28 +00:00
florian
1af574ceca
* assembler readers OOPed
...
+ typed currency constants
+ typed 128 bit float constants if the CPU supports it
2003-11-12 16:05:39 +00:00
peter
48ef24605a
* support scalefactor for opr_local
...
* support reference with opr_local set, fixes tw2631
2003-10-30 19:59:00 +00:00
peter
5925d38ac7
* support indexing and offset retrieval for locals
2003-10-29 15:40:20 +00:00
peter
4a1ecb07d1
* splitted buildderef and buildderefimpl to fix interface crc
...
calculation
2003-10-23 14:44:07 +00:00
peter
6878c55c80
* write derefdata in a separate ppu entry
2003-10-22 20:39:59 +00:00
peter
96f9973b46
* taicpu_abstract.oper[] changed to pointers
2003-10-21 15:15:35 +00:00
peter
d0de3b3ea8
* 64k registers supported
...
* fixed some memory leaks
2003-10-17 14:38:32 +00:00
daniel
b2343f4b16
* Register allocator splitted, ans abstract now
2003-10-09 21:31:37 +00:00
peter
70fe77ca7c
* procinfo unit contains tprocinfo
...
* cginfo renamed to cgbase
* moved cgmessage to verbose
* fixed ppc and sparc compiles
2003-10-01 20:34:48 +00:00
peter
540691bf02
* optimized releasing of registers
2003-09-29 20:58:55 +00:00
peter
a028d221cc
* fixed invalid opcode handling in spill registers
2003-09-28 21:49:30 +00:00
peter
36c2bb1e1a
* give error for wrong register number
2003-09-28 13:37:07 +00:00
florian
f6e456268f
* fixed make cycle
2003-09-24 21:15:49 +00:00
florian
0b48a6a3ec
* x86-64 adaptions
2003-09-24 17:12:36 +00:00
peter
8af51ea6d3
* locals and paras are allocated in the code generation
...
* tvarsym.localloc contains the location of para/local when
generating code for the current procedure
2003-09-23 17:56:05 +00:00
daniel
1e02028986
* Fixed incorrect movzx spilling
2003-09-14 14:22:51 +00:00
daniel
c82243df4d
* Add BTR to destination memory location check in spilling
2003-09-12 20:25:17 +00:00
daniel
079751b894
* Failed attempt to restore broken fastspill functionality
2003-09-10 19:14:31 +00:00
marco
305226dd23
* fix from peter for bts reg32,mem32 problem
2003-09-10 11:23:09 +00:00
florian
f495796796
* x86 instruction table updated to nasm 0.98.37:
...
- sse3 aka prescott support
- small fixes
2003-09-09 12:54:45 +00:00
peter
b9d09a4e5c
* preparations for different default calling conventions
...
* various RA fixes
2003-09-07 22:09:34 +00:00
peter
6a8d5eb25d
* NEWRA branch merged
2003-09-03 15:55:00 +00:00
peter
6b12cc11e5
* first spill the registers of top_ref before spilling top_reg
2003-08-21 17:20:19 +00:00
peter
b9afdc6a36
* fix reg-supreg range check error
2003-08-21 14:48:36 +00:00
daniel
2ce08bd157
* Some old register convention code removed
...
* A few changes to eliminate a few lines of code
2003-08-20 16:52:01 +00:00
daniel
ebb1f3a361
* New register coding now mandatory, some more convert_registers calls
...
removed.
2003-08-20 09:07:00 +00:00
daniel
82b0cf41a6
* Made internal assembler use new register coding
2003-08-20 07:48:03 +00:00
daniel
41211715ff
* Corrected a comment.
2003-08-19 13:58:33 +00:00
daniel
878498029f
* Fixed newra compilation
2003-08-15 14:44:20 +00:00
peter
52c73e80d1
* start of sparc support for newra
2003-08-11 21:18:20 +00:00
daniel
42c320cb29
* cs_regalloc renamed to cs_regvars to avoid confusion with register
...
allocator
* Some preventive changes to i386 spillinh code
2003-08-09 18:56:54 +00:00
daniel
268bfcf784
* Fixed register allocator. *Lots* of fixes.
2003-07-06 15:31:20 +00:00
Jonas Maebe
d29c96896f
* fixed newra cycle for x86
...
* added constants for indicating source and destination operands of the
"move reg,reg" instruction to aasmcpu (and use those in rgobj)
2003-06-14 14:53:50 +00:00
daniel
41e0bc4cec
* Register allocator finished
2003-06-03 13:01:59 +00:00
peter
414bd5fa22
* more sparc cleanup
...
* accumulator removed, splitted in function_return_reg (called) and
function_result_reg (caller)
2003-05-30 23:57:08 +00:00
peter
437ce7f8a2
* removed some unit dependencies
2003-05-22 21:32:28 +00:00
florian
754a34200a
* merged i386/aasmcpu and x86_64/aasmcpu to x86/aasmcpu
2003-04-25 12:43:40 +00:00
florian
37194d2f61
* fixed more problems with cpubase and x86-64
2002-04-25 16:12:09 +00:00