florian
ad01f059e8
* after a LdiMov/Cp2Ldi/Cpi optimization, the compiler should not continue to optimize this instruction because then reg. alloc info is wrong
...
git-svn-id: trunk@37604 -
2017-11-19 18:05:14 +00:00
nickysn
4fc2fa7899
* alloc/dealloc NR_DEFAULTFLAGS in the a_cmp_* methods in the i8086 code
...
generator
git-svn-id: trunk@37601 -
2017-11-17 19:28:37 +00:00
Károly Balogh
4b113579a5
some tabs to spaces indentation cleanup. no functional change
...
git-svn-id: trunk@37599 -
2017-11-17 11:31:49 +00:00
Károly Balogh
e6aed467b5
renamed script unit to cscript to avoid namespace conflict with univint package on Darwin. this makes it possible to build the textmode IDE on Darwin
...
git-svn-id: trunk@37598 -
2017-11-17 11:27:19 +00:00
florian
7fa9d267e3
* correctly set cpu defines after r37582, even if architecture and cpu type defines are equal (like CPUMIPS32), resolves #32687
...
git-svn-id: trunk@37590 -
2017-11-13 21:13:53 +00:00
florian
f22a6629c1
* set types correctly for char -> shortstring conversions, resolves #32686
...
git-svn-id: trunk@37585 -
2017-11-12 22:14:23 +00:00
florian
826f208e45
* define CPU and FPU type macros before the second parsing of the parameters so they can be used in config files
...
git-svn-id: trunk@37582 -
2017-11-12 22:14:18 +00:00
florian
674398c5a5
* i8086 compilation fixed after r37572
...
git-svn-id: trunk@37573 -
2017-11-11 13:25:02 +00:00
florian
73fda1ccb6
* factored out OptPass1Sub
...
+ make use of OptPass1Sub on x86_64 and i8086 as well
git-svn-id: trunk@37572 -
2017-11-10 20:55:22 +00:00
nickysn
ae92973196
+ added support for the retw, retnw, retfw, retd, retnd, retfd, retq, retnq and
...
retfq x86 instructions. These are variants of the ret instruction with the
return offset size set explicitly, e.g. retfw is a 16-bit far ret (i.e. pops
a 16-bit offset and a 16-bit segment), retfd is a 32-bit far ret (pops a
32-bit offset, followed by a 16-bit segment), etc.
git-svn-id: trunk@37571 -
2017-11-10 16:53:29 +00:00
pierre
ba3afefa4c
Regenerate register include files after commit 37564: Fix value of NR_DR6 and NR_DR7
...
git-svn-id: trunk@37565 -
2017-11-07 07:30:42 +00:00
pierre
176cec14c9
Fix value of NR_DR6 and NR_DR7
...
git-svn-id: trunk@37564 -
2017-11-07 07:29:54 +00:00
nickysn
034b753e10
* commented out PostPeepholeOptMov, because it breaks the pascal port of cwsdpmi
...
git-svn-id: trunk@37563 -
2017-11-06 23:30:11 +00:00
nickysn
24d447716e
* fixed support for access from inline asm to absolute vars, pointing to an
...
array element (previously, it would always point to the start of the array)
git-svn-id: trunk@37558 -
2017-11-06 16:06:34 +00:00
florian
2140b586a6
* i386 building fixed
...
git-svn-id: trunk@37554 -
2017-11-04 19:42:08 +00:00
florian
1556599ad5
* symbols with bind type AB_EXTERNAL_INDIRECT need to be declared as EXTERN for masm/nasm etc.
...
git-svn-id: trunk@37553 -
2017-11-04 19:10:17 +00:00
florian
c36c4d838d
+ PostPeepHoleOptsCpu for i8086
...
git-svn-id: trunk@37552 -
2017-11-04 19:10:15 +00:00
florian
4da4b768ec
* factored out PostPeepholeOptTest
...
+ use PostPeepholeOptTest on x86-64
git-svn-id: trunk@37551 -
2017-11-04 19:10:14 +00:00
florian
3097eaf8ee
* made PostPeepholeOptMov a function
...
git-svn-id: trunk@37550 -
2017-11-04 19:10:12 +00:00
florian
a7ea7fb569
* factored out PostPeepholeOptCmp
...
+ use PostPeepholeOptCmp for x86_64
git-svn-id: trunk@37549 -
2017-11-04 19:10:09 +00:00
florian
194c0c7073
* compilation fixed
...
git-svn-id: trunk@37546 -
2017-11-01 16:54:08 +00:00
florian
c7d5525b56
+ implemented some AVR specific intrinsics
...
git-svn-id: trunk@37544 -
2017-11-01 16:33:34 +00:00
florian
4752b0ef96
+ tinlinenode calls cpu specific routines for unknown inline numbers
...
git-svn-id: trunk@37543 -
2017-11-01 16:33:32 +00:00
nickysn
e5dad9c98c
+ set oper.haslabelref in several other places, where a reference, containing a
...
label is created in the intel syntax x86 assembler. This fixes tfarcal3.pp and
tfarcal4.pp after r37538
git-svn-id: trunk@37541 -
2017-11-01 14:31:16 +00:00
nickysn
9649154368
* fixed the token2str const array for intel syntax x86 asm
...
git-svn-id: trunk@37540 -
2017-11-01 13:36:16 +00:00
nickysn
9450beb99c
* fixed bug in intel syntax i8086 inline asm, when certain 'jmp/call [v]'
...
instructions got erroneously converted to 'jmp/call v', if 'v' is an external
far variable that points to certain things (like a local label, exported via
public)
git-svn-id: trunk@37538 -
2017-10-31 16:49:38 +00:00
nickysn
49a96af874
+ also support 'external near' var declarations on i8086
...
git-svn-id: trunk@37536 -
2017-10-30 21:52:03 +00:00
florian
3bcf774c7b
* compilation fixed
...
git-svn-id: trunk@37534 -
2017-10-30 21:01:10 +00:00
nickysn
303309b28f
+ added support for 'external far' variables for i8086
...
git-svn-id: trunk@37532 -
2017-10-30 18:03:44 +00:00
nickysn
29558a74cd
+ support exporting labels from asm blocks in intel syntax asm blocks via the
...
'public' directive
git-svn-id: trunk@37530 -
2017-10-30 16:44:13 +00:00
nickysn
d318ab086a
* when handling absolute vars from within intel inline assembly, take the
...
absolute var size into account (not the type of the var it points to or no
size at all, if it points to a fixed address)
git-svn-id: trunk@37525 -
2017-10-26 15:58:48 +00:00
nickysn
8a0d8f025b
* fixed another i8086 inline asm 32-bit constant bug (e.g. in 'or eax, 80000001h')
...
git-svn-id: trunk@37521 -
2017-10-25 19:38:37 +00:00
nickysn
325e66287c
* fix for inline asm of instructions with 32-bit constant operands on i8086
...
git-svn-id: trunk@37519 -
2017-10-25 18:03:22 +00:00
nickysn
2af5c9d508
* changed type used for section alignment from byte/shortint to longint, so the
...
internal object writer and the internal linker support object files with
sections with alignment >=256
git-svn-id: trunk@37518 -
2017-10-25 15:47:29 +00:00
nickysn
8cc230ef1a
- don't switch index into base in the gas assembly writer. This optimization
...
(and others) are performed in optimize_ref().
git-svn-id: trunk@37517 -
2017-10-25 13:42:18 +00:00
nickysn
d7e4b50068
+ also optimize x86_64 references by switching [rbp+reg64] to [reg64+rbp],
...
[r13+reg64] to [reg64+r13] and [r13d+reg32] to [reg32+r13d]
git-svn-id: trunk@37516 -
2017-10-24 16:18:43 +00:00
nickysn
5ae32a0ec5
+ always do the x86_64 reference optimizations as if SS=DS, because the CPU
...
basically ignores these segments in long mode
git-svn-id: trunk@37515 -
2017-10-24 15:38:59 +00:00
nickysn
e58bad8eef
+ check for the 'pop cs' instruction in the x86 inline assembler and print a
...
warning (on the i8086 target) or an error (on i386 and x86_64) when this
instruction is used (because it only works on 8086 and 8088 CPUs)
git-svn-id: trunk@37514 -
2017-10-24 15:07:20 +00:00
nickysn
0d1f7910d7
+ also apply optimize_ref() on references of inline asm instructions
...
git-svn-id: trunk@37512 -
2017-10-23 22:28:08 +00:00
nickysn
875339993f
* strip segment overrides, for segments, which should be equal in the current
...
model to the default segment of the reference in optimize_ref, when
inlineasm=false
git-svn-id: trunk@37511 -
2017-10-23 15:51:33 +00:00
nickysn
d220d6f2c6
* use get_default_segment_of_ref() in the seg() handling on i8086
...
git-svn-id: trunk@37510 -
2017-10-23 14:55:52 +00:00
nickysn
80226e3af4
+ added an optimization pass, that optimizes x86 references
...
git-svn-id: trunk@37494 -
2017-10-20 15:55:55 +00:00
nickysn
67a0e9bdae
+ added x86 helper function get_default_segment_of_ref, which returns the
...
default segment base for the ref, in case there's no segment override
* in the internal assembler, use get_default_segment_of_ref to strip redundant
prefixes, instead of always assuming all refs are DS-based
git-svn-id: trunk@37486 -
2017-10-18 14:24:58 +00:00
svenbarth
530213711f
* change the class references in a class' field table to indirect references
...
git-svn-id: trunk@37482 -
2017-10-17 20:34:21 +00:00
nickysn
e8bbc4eef9
+ support the xlat x86 instruction syntax with a memory operand. This allows
...
specifying the address size (e.g. xlat byte ptr [bx] or xlat byte ptr [ebx])
git-svn-id: trunk@37478 -
2017-10-17 16:40:06 +00:00
nickysn
9cebeeffa9
+ check for address size mismatch in intel syntax assembler as well
...
git-svn-id: trunk@37475 -
2017-10-16 16:19:15 +00:00
nickysn
353efcb163
* fixed rdi register name in error message
...
git-svn-id: trunk@37474 -
2017-10-16 16:14:18 +00:00
nickysn
cece021bd1
+ check whether the address sizes match for x86 string instructions with two
...
memory operands, when using the at&t syntax inline assembler
git-svn-id: trunk@37473 -
2017-10-16 16:01:38 +00:00
nickysn
4cb1a96ec1
* use get_ref_address_size in the nasm writer, when handling the parameterized
...
string instructions
git-svn-id: trunk@37471 -
2017-10-16 14:21:03 +00:00
nickysn
6f2e64ff90
+ added function get_ref_address_size
...
git-svn-id: trunk@37470 -
2017-10-16 14:13:03 +00:00