Jonas Maebe
53052f26a0
* changed output parameter of process_ea_ref() from "out" to "var", as it is
...
already partially initialised by its caller (part of mantis #29439 )
git-svn-id: trunk@32968 -
2016-01-18 22:20:26 +00:00
nickysn
439ab331e9
* factored out some of the duplicated (between x86 targets) parts of process_ea() to a common function
...
git-svn-id: trunk@32940 -
2016-01-14 18:00:37 +00:00
nickysn
db5e67c3fe
+ introduced a new type TRelocDataInt for use as the 'data' parameter for
...
TObjData.writeReloc; on i8086 it was changed to longint to allow using 32-bit
relocations
+ added support for writing 32-bit OMF relocations
git-svn-id: trunk@32936 -
2016-01-13 17:57:36 +00:00
nickysn
d4c21cf13a
* also check for 386+ when emitting a reference with a fs: or gs: prefix
...
git-svn-id: trunk@32926 -
2016-01-11 16:30:06 +00:00
nickysn
80b3e3020a
* the SEGFS and SEGGS prefixes are 386+
...
git-svn-id: trunk@32925 -
2016-01-11 15:51:40 +00:00
nickysn
741a3eedf9
* fixed the cpu level of several 186+ instructions, that were mistakenly marked as either 286+ or 8086+
...
git-svn-id: trunk@32921 -
2016-01-11 13:22:08 +00:00
nickysn
ef9504ffd7
* made the \325 x86 prefix to generate a 0x66 prefix on i8086, thus fixing many
...
32-bit instructions on i8086, when using the internal obj writer
git-svn-id: trunk@32890 -
2016-01-08 17:20:37 +00:00
nickysn
6037976202
* several imul variants, featuring 32-bit or 64-bit registers marked 386+, instead of 286+
...
git-svn-id: trunk@32889 -
2016-01-08 17:07:36 +00:00
nickysn
e6ac1a4af5
+ added check for the compatibility of each instruction with the selected target
...
cpu in the i8086's internal obj writer
git-svn-id: trunk@32888 -
2016-01-08 16:44:28 +00:00
nickysn
e877bae4fc
+ add 'jmp rm16' and 'call rm16' before the rm32 versions on i8086, so the
...
16-bit version is picked up by default for opsize=S_NO. Previously the 386
version was picked on i8086, but the generated code was correct, because we
don't yet generate a 0x66 prefix for "\325", which leads to many 32-bit
instructions not being assembled correctly with the internal asm obj writer on
the i8086
git-svn-id: trunk@32887 -
2016-01-08 16:41:21 +00:00
nickysn
a508f9e5d3
+ added check if the selected cpu is 386+ when writing a 66h or 67h prefix in
...
the i8086 internal object writer. This allows weeding out spurious 386
instructions, as is similarly done by NASM when using it as an external
assembler.
git-svn-id: trunk@32871 -
2016-01-07 15:40:32 +00:00
nickysn
22b6e00147
* extracted the writing of 0x66 and 0x67 prefixes in the x86 internal assembler
...
to local procedures write0x66prefix and write0x67prefix
git-svn-id: trunk@32869 -
2016-01-07 14:18:14 +00:00
nickysn
21c9712ea2
* allow 32-bit operand sizes in the i8086 version of Tx86Operand.SetSize, so
...
32-bit operands can work properly in i8086's inline asm. Fixes mantis #29188 .
git-svn-id: trunk@32866 -
2016-01-06 18:06:34 +00:00
sergei
f69f6336e9
* Replaced hacks with resetting 'c' to zero and decreasing inputpointer by boolean parameter to skipcomment and skipoldtpcomment. This parameter specifies whether first character of comment should be read.
...
- in_asm_string also rendered useless by r32828, removed.
git-svn-id: trunk@32836 -
2016-01-03 17:07:15 +00:00
sergei
bbfbab7e0c
* Moved handling of comments and line breaks in assembler blocks from scanner to tokenizer level. Handling them at character level was causing compiler to accept comments in the middle of any assembler token, which should never happen. It was also causing Mantis #27459 : a newline immediately after closing 'end' token was first handled in asmgetchar and then by normal parser, causing all subsequent line numbering to be off by one.
...
git-svn-id: trunk@32828 -
2016-01-02 06:17:14 +00:00
nickysn
66bad5a1cf
* pushf and popf are 8086 level instructions, not 186+
...
git-svn-id: trunk@32677 -
2015-12-17 15:23:21 +00:00
florian
a3964d9ee0
+ support for RDTSCP, resolves issue #28916
...
git-svn-id: trunk@32652 -
2015-12-13 13:28:51 +00:00
Jonas Maebe
da696057ab
* converted register_maybe_adjust_setbase() to the high level code generator
...
git-svn-id: trunk@32591 -
2015-12-05 18:03:37 +00:00
Jonas Maebe
ab22aaa2b7
* adjust the set base for i8086 before loading it into cx as a shift count
...
git-svn-id: trunk@32590 -
2015-12-05 18:03:34 +00:00
sergei
1b965e6766
* x86: Don't save/restore integer registers that are volatile per calling convention of current procedure. It implies that nothing will be saved for procedures with OLDFPCCALL, FAR16 and PASCAL and calling conventions. OLDFPCCALL restores behavior that was in effect before r25224.
...
git-svn-id: trunk@32542 -
2015-11-27 05:48:49 +00:00
sergei
a78250a78b
* x87 FBSTP and FBLD instructions cannot have size suffix in ATT syntax. Mantis #29095 .
...
git-svn-id: trunk@32541 -
2015-11-27 03:59:06 +00:00
Jonas Maebe
fd0c2f36e5
* don't parse "flags" as a register name in the Intel assembler reader
...
(mantis #29040 )
git-svn-id: trunk@32368 -
2015-11-19 19:40:06 +00:00
Jonas Maebe
33d711794e
* adaptation for symx86 to r32340
...
git-svn-id: trunk@32341 -
2015-11-15 23:15:43 +00:00
nickysn
78362ed6ae
* RELOC_ABSOLUTE32 made different than RELOC_ABSOLUTE on i8086 (and fixed all
...
the i8086 bugs, related to code that assumes that they are the same)
+ also added RELOC_RELATIVE32 on i8086
* RELOC_ABSOLUTE32 and RELOC_RELATIVE32 are not yet implemented in the OMF
object writer and linker (and currently produce an internal error), but will
be implemented in the future, as the OMF format supports both 16-bit and
32-bit relocations
git-svn-id: trunk@32311 -
2015-11-13 15:56:26 +00:00
nickysn
8046826e4e
+ also allow x86 call ref for references that contain only non-imaginary registers (no infinite spilling problems there either)
...
git-svn-id: trunk@32290 -
2015-11-11 16:33:48 +00:00
nickysn
9de7830c8c
+ allow call ref on x86 for references that don't contain any registers, as the register allocator doesn't fail on them, if all registers are allocated
...
git-svn-id: trunk@32286 -
2015-11-11 15:58:10 +00:00
nickysn
a553b15a1c
+ handle properly inline asm segment constants different than word:
...
o 'DB SEG symbol' produces an error
o 'DD SEG symbol' (and anything larger than DW, like DQ) adds extra high zeros
to the segment constant (this is Turbo Pascal 7 compatible)
git-svn-id: trunk@32283 -
2015-11-10 21:18:34 +00:00
nickysn
606b64a7f1
* fixed indentation
...
git-svn-id: trunk@32282 -
2015-11-10 20:57:52 +00:00
nickysn
3b80ca4376
+ implemented the 'SEG @CODE' inline assembler directive for i8086
...
git-svn-id: trunk@32281 -
2015-11-10 18:02:10 +00:00
nickysn
995ca4fb12
+ implemented the 'SEG @DATA' inline assembler directive for i8086
...
git-svn-id: trunk@32280 -
2015-11-10 17:26:21 +00:00
nickysn
43dabca8ab
* moved the handling of the @Code and @Data inline assembler symbols to new methods Tx86operand.SetupCode and .SetupData
...
git-svn-id: trunk@32279 -
2015-11-10 14:04:40 +00:00
florian
094a3c4350
* fixes masm code generation for rep mov*
...
git-svn-id: trunk@32259 -
2015-11-06 19:06:57 +00:00
nickysn
ca24b006ef
+ support 'dw SEG symbol' in the inline assembler on i8086
...
git-svn-id: trunk@32256 -
2015-11-06 15:35:20 +00:00
nickysn
44b04e250e
+ implemented support for aitconst_seg (emits a 'DW SEG symbol') in the nasm assembler writer for i8086
...
git-svn-id: trunk@32250 -
2015-11-05 16:05:22 +00:00
pierre
1abf9df1b0
Solaris assembler does not accept %st instead of %st(0), at least for some instructions
...
git-svn-id: trunk@32198 -
2015-10-30 11:20:10 +00:00
pierre
6b0e87b95c
Correct error in last commit that generate new failures in tbs/tb0587 test for GNU as, as the change was not correctly limited to Solaris Assembler
...
git-svn-id: trunk@32196 -
2015-10-30 08:34:01 +00:00
nickysn
2e30b92c79
* removed the 'near ignored' and 'far ignored' inline asm warning messages on
...
the i8086, as 'near' and 'far' actually work there. Some forms may even work
on the i386, but that's not tested very well for now, so we leave the messages
there on i386 and x86_64.
git-svn-id: trunk@32195 -
2015-10-29 22:47:40 +00:00
nickysn
9e110e8e7e
* treat interrupt procedures as 'near' in the i8086 inline assembler for TP7
...
compatibility
git-svn-id: trunk@32194 -
2015-10-29 22:43:41 +00:00
nickysn
dd9e5ea6f6
* convert 'call/jmp [proc]' properly to a near or far call/jmp, depending on
...
proc's call model
git-svn-id: trunk@32193 -
2015-10-29 22:05:09 +00:00
nickysn
ed09b4fcaa
* in i8086 inline asm, convert 'call/jmp [proc/label]' to 'call/jmp proc/label'.
...
This is BP7 compatible and fixes e.g. 'call near ptr label' and 'call far ptr label'.
git-svn-id: trunk@32192 -
2015-10-29 17:07:23 +00:00
nickysn
77159d2806
+ also add a cs: prefix to references such as [2+label]
...
git-svn-id: trunk@32191 -
2015-10-29 16:17:34 +00:00
nickysn
823deb39ac
+ also add an implicit cs: prefix on i8086 in tx86intreader.BuildOperand.AddLabelOperand
...
git-svn-id: trunk@32189 -
2015-10-29 15:35:09 +00:00
pierre
90ff332b49
Add -Aas-sol to use native Solaris assembler
...
git-svn-id: trunk@32188 -
2015-10-29 15:10:27 +00:00
nickysn
92a39c93f5
+ add a CS: override for references without an explicitly set segment override, which are relative to a function entry point
...
git-svn-id: trunk@32187 -
2015-10-29 14:48:59 +00:00
Jonas Maebe
4f7b4a2735
* changed {$ifdef x86} code in defcmp into virtual methods
...
git-svn-id: trunk@32180 -
2015-10-28 18:06:27 +00:00
nickysn
ef5e368327
+ support local label data access in the i8086 inline asm (fixes test tlbldat1.pp)
...
git-svn-id: trunk@32179 -
2015-10-28 17:22:37 +00:00
nickysn
dc6119bab7
* also convert 'jmp farprocsymbol' to 'jmp far farprocsymbol' in the i8086
...
inline assembler
git-svn-id: trunk@32170 -
2015-10-28 00:19:42 +00:00
nickysn
cb36b2d3bd
* i8086 inline asm: convert 'call symbol' to 'call far symbol' only for symbols
...
that are an entry point of a function with a far call model
git-svn-id: trunk@32169 -
2015-10-28 00:17:54 +00:00
nickysn
c068c96302
* on i8086 convert the 'ret' inline asm instruction to either 'retn' or 'retf',
...
depending on the call model of the current function (which is BP7 compatible
behaviour)
git-svn-id: trunk@32157 -
2015-10-26 16:01:50 +00:00
Jonas Maebe
9b310ea9b4
* simplified tx86pointerdef.createx86
...
git-svn-id: trunk@32064 -
2015-10-16 19:15:34 +00:00