Commit Graph

1108 Commits

Author SHA1 Message Date
nickysn
5dc42404cf * capitalize omf segment class names, as that's how other 16-bit compilers write them
git-svn-id: trunk@31371 -
2015-08-22 19:07:04 +00:00
nickysn
e09ab50724 * capitalize the group name 'DGROUP' in the generated omf object files, because
that's how it is usually written by other 16-bit compilers

git-svn-id: trunk@31369 -
2015-08-22 16:28:36 +00:00
Jonas Maebe
5d15a28e75 - reverted workaround from r15939 that hasn't been necessary since FPC 2.6.0,
since that version already shiped with GNU AS 2.21 (mantis #17337)

git-svn-id: trunk@31196 -
2015-07-06 08:05:37 +00:00
Jonas Maebe
1bcc276dcf * remove implicit typecast to extended automatically inserted for trunc/round
(due to the declaration in the system unit) on x86_64 if this allows us
    to use SSE code instead (mantis #28366)

git-svn-id: trunk@31192 -
2015-07-03 21:01:18 +00:00
Károly Balogh
7ca62febcd AROS/x86_64: initial AROS/x86_64 support and implement syscalls for AROS/x86_64
git-svn-id: trunk@31169 -
2015-06-28 19:16:40 +00:00
Jonas Maebe
b21610050f * don't store reusable defs based on other defs from localsymtables into the
static/globalsymtable. The static/global symtable is stored to the PPU
    while the localsymtables are not, which means we get dangling references
    when reloading such defs from the ppu afterwards

git-svn-id: trunk@31149 -
2015-06-23 21:23:25 +00:00
Jonas Maebe
f402b0d7df * changed getpointerdef() into a tpointerdef.getreusable() class method
o allows removing the ugly x86 hacks

git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
nickysn
0da38dbc79 + implemented support for the 'dgroup' (addr_dgroup) relocation type in the omf
internal object writer

git-svn-id: trunk@30800 -
2015-05-04 17:07:19 +00:00
nickysn
778a678956 * use a 4 byte alignment for the dwarf debug sections on i8086 (not sure if
that's correct for 16-bit dwarf, but currently the compiler emits 4-byte
  tai_aligns, so setting the section alignment to 4 avoids problems in the
  internal object writer)

git-svn-id: trunk@30685 -
2015-04-20 13:15:26 +00:00
nickysn
5a1ce6162b * set the bss, rodata and rodata_norel section alignment to 2 bytes for the i8086-msdos target
git-svn-id: trunk@30680 -
2015-04-20 01:27:26 +00:00
nickysn
a6e39edb8f * moved the insertion of fwaits for 8087 from the nasm asm writer to ti8086procinfo.postprocess_code
git-svn-id: trunk@30634 -
2015-04-17 23:27:03 +00:00
nickysn
5c8965fea5 * in the inline asm reader, treat [var] reference as "word" instead of "dword"
when "var" is of dword size. This fixes spurious generation of a $66 prefix
  and makes the code consistent with what Tx86Operand.SetSize does (and what is
  then used for checking the operand sizes of all operands of the instruction in
  Tx86Instruction.CheckOperandSizes).

git-svn-id: trunk@30629 -
2015-04-17 19:58:06 +00:00
nickysn
3b5395e0e3 * set 16-bit opsize for OPR_SYMBOL operands on i8086
git-svn-id: trunk@30626 -
2015-04-17 19:10:13 +00:00
nickysn
c3515f743f * generate 16-bit (instead of 32-bit) instructions for push/pop of a segment
register in an inline asm block on i8086

git-svn-id: trunk@30616 -
2015-04-17 00:51:00 +00:00
Jonas Maebe
3be51e1455 * fixed endless recursion in tabstractrecorddef.contains_float_field() in
case a record contains an internal typed constant of its own type
    (which happened becuase such a typed constant is also fieldvarsym, solved
     by checking for sp_static) (mantis #27880)
  * fixed several other similar cases in the compiler where we are only
    interested in instance fields, but processed all fieldvarsyms

git-svn-id: trunk@30614 -
2015-04-16 21:25:22 +00:00
nickysn
25a834087e + choose the correct version of "Jcc near" to use on i8086 (386+ or 8086+)
depending on the specified target cpu type
+ support the \60..\62 magic codes on i8086 in the internal asm writer

git-svn-id: trunk@30613 -
2015-04-16 19:49:22 +00:00
nickysn
2cf6852910 + added i8086 instruction entries for Jcc near (which is actually a 386+
instruction), that encode it as two i8086 compatible instructions:
    JNcc short +3
    JMP near target

git-svn-id: trunk@30612 -
2015-04-16 17:07:07 +00:00
nickysn
bfd5670cc8 + support new magic code \23 in the internal asm writer - same as \13, but with
the condition inverted; this will be used to simulate near conditional jumps
  on processors earlier than 386 (i.e. "Jcc near target" will be encoded as
  "JNcc short +3; JMP target")

git-svn-id: trunk@30611 -
2015-04-16 16:53:48 +00:00
nickysn
955c29618a + support far calls and jumps in the internal asm writer
git-svn-id: trunk@30601 -
2015-04-15 00:12:40 +00:00
nickysn
a7e059c875 + support segment relocations in the omf writer
git-svn-id: trunk@30600 -
2015-04-14 22:46:01 +00:00
nickysn
f5ddd351fe * allow use of the imm8 form of 16-bit instructions on i8086
git-svn-id: trunk@30594 -
2015-04-14 19:14:47 +00:00
nickysn
bd460eec43 * emit 16-bit addresses on i8086 for asm codes &64..&66 in the internal asm
git-svn-id: trunk@30580 -
2015-04-13 22:13:15 +00:00
nickysn
22fb1a3e7e * converted all the magic nasm codes in the x86 internal asm writer from decimal
to octal in the compiler source, so they match the strings in x86ins.dat

git-svn-id: trunk@30566 -
2015-04-13 01:13:39 +00:00
nickysn
fe30b53e95 * use 16-bit operand types for call/jmp immediate on i8086 in taicpu.create_ot
git-svn-id: trunk@30563 -
2015-04-12 23:53:15 +00:00
nickysn
a25a906d56 * i8086 internal asm fixes for the 0324 and 0361 asm codes
git-svn-id: trunk@30562 -
2015-04-12 22:56:28 +00:00
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
Jonas Maebe
9079227c56 * don't give an internalerror when trying to prefetch a regvar or even
something without a location at all; it's a hint/optional operation,
    so if there's nothing to prefetch just don't do anything
    (mantis #27811)

git-svn-id: trunk@30502 -
2015-04-08 20:35:13 +00:00
nickysn
470fb65e80 + implemented aasmcpu.process_ea for i8086
git-svn-id: trunk@30495 -
2015-04-08 12:54:09 +00:00
nickysn
6a7fff644a * align non-code sections with zeros, instead of nops in the nasm asm output
writer, so they match the behaviour of the internal object writer (so it
  becomes easier to compare to the binary output of the omf object writer)

git-svn-id: trunk@30472 -
2015-04-06 20:30:06 +00:00
nickysn
877a769ac3 + support align directive with a given use_op/fillop in the NASM asm writer
git-svn-id: trunk@30459 -
2015-04-06 01:03:22 +00:00
Jonas Maebe
9d4c8f68d4 * fixed first_fpu_immreg definition
git-svn-id: trunk@30427 -
2015-04-04 14:29:09 +00:00
Jeppe Johansen
e2272c8a7e Added aitconst_gs for AVR pointer references to Flash.
git-svn-id: trunk@30419 -
2015-04-04 10:29:11 +00:00
Jonas Maebe
687bb15299 * renamed getdatalabel() to getglobaldatalabel
git-svn-id: branches/hlcgllvm@30336 -
2015-03-27 21:25:34 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
florian
99635658ec * corrects change flags for VSQRTSD
git-svn-id: trunk@30037 -
2015-02-28 22:42:25 +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
2ab7f5c35d * moved x86-specific requirements from the generic bsr/bsf code to the
x86 code generator (register size constraints)

git-svn-id: trunk@29984 -
2015-02-23 22:57:18 +00:00
Jonas Maebe
fa328436ab * regenerated for iphonesim/x86-64
git-svn-id: trunk@29974 -
2015-02-23 22:56:41 +00:00
Jonas Maebe
79a06b1514 + iphonesim/x86_64 target (64 bit iOS simulator)
git-svn-id: trunk@29970 -
2015-02-23 22:56:09 +00:00
Jonas Maebe
d6de2c03cb * generic part of r26050 from the hlcgllvm branch: made tcgvecnode hlcg-safe
o in particular, add tdef size information to the update_reference*()
     methods, and factored out offset adjustments into its own method
   o also make sure the passed size to update_reference*() corresponds to the
     actual size of the index, as it's no longer guaranteed to be ptruint
     since the previous commit

git-svn-id: trunk@29967 -
2015-02-23 22:56:00 +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
de17e9fa1c + cpu capability CPUX86_HAS_CMOV
git-svn-id: trunk@29776 -
2015-02-21 20:47:40 +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
7c1cf07484 + support section smartlinking with nasm
+ set alignment for smartlinked sections in nasm
* enable section smartlinking for nasm/coff win32

git-svn-id: trunk@29654 -
2015-02-08 12:33:50 +00:00