Jonas Maebe
ce598c15ec
* factored out the conditions under which add nodes need to perform
...
overflow checks
o in particular ensure that cpu-specific overrides don't perform overflow
checks when nf_internal is set
git-svn-id: trunk@42573 -
2019-08-03 12:19:50 +00:00
Jonas Maebe
3fee990218
* on Mach-O, PECOFF and ELF platforms, write local symbols as hidden/
...
private_extern (or plain global in case of PECOFF, as the effect is
the same there): visible across object files, but they become local
when linked into a binary/library. This enables cross-unit inlining
of functions accessig implementation-only symbols.
git-svn-id: trunk@42340 -
2019-07-07 21:33:43 +00:00
pierre
af03c0208b
Use tcgint typecast instead of aint, as it is the type of the second parameter of loadconst taicpu method
...
git-svn-id: trunk@42281 -
2019-06-25 04:24:56 +00:00
Jonas Maebe
c262c5dbc9
* synchronised with trunk till r42256
...
git-svn-id: branches/debug_eh@42257 -
2019-06-20 17:21:34 +00:00
nickysn
697f2fcf75
* prettify the "Use of -offset(%esp), access may cause a crash or value may be
...
lost" warning by showing the exact register used (esp or rsp) and using the
asm syntax (Intel or AT&T) used originally in the code
git-svn-id: trunk@42211 -
2019-06-10 16:19:06 +00:00
nickysn
ce8ec3ab5d
+ introduced the asmmodes_x86_intel constant set
...
git-svn-id: trunk@42209 -
2019-06-10 15:44:19 +00:00
nickysn
4f2ab3fb11
* prettify the "Use of -offset(%ebp) is not recommended for local variable
...
access" warning by showing the exact register used (bp, ebp or rbp) and using
the original asm syntax
git-svn-id: trunk@42208 -
2019-06-10 15:26:46 +00:00
nickysn
1e07606cbf
* prettify the "Use of +offset(%ebp) is not compatible with regcall convention"
...
and "Use of +offset(%ebp) for parameters invalid here" warning messages by
showing the exact register used (bp, ebp or rbp) and using the original asm
syntax (Intel: [EBP+offset]; AT&T: +offset(%ebp) )
git-svn-id: trunk@42207 -
2019-06-10 15:08:46 +00:00
Jonas Maebe
faf75095cd
* synchronised with trunk till r42189
...
git-svn-id: branches/debug_eh@42190 -
2019-06-07 18:24:38 +00:00
nickysn
914426e703
* fixed an i8086 inline assembler bug, where 'call word ptr [label]' (an
...
indirect call) was assembled as 'call near label' (direct call) instead of
'call near [label]' and 'call dword ptr [label]' was assembled as
'call near label' instead of 'call far [label]'
git-svn-id: trunk@42176 -
2019-06-05 15:49:39 +00:00
Jonas Maebe
1b6425176b
* synchronised with trunk till r42049
...
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +00:00
Jonas Maebe
ba1b4b1c92
+ support for verifying whether a case statements handles all possibilities
...
(based on patch by Martok)
o enabled by default in ISO and Extended Pascal: compile-time error if not
the case in ISO mode, warning and run-time error in Extended Pascal mode
o warning enabled by default in all other modes for boolean, enumeration and
subrange integer types with ranges different from the default ones
(i.e., different from 0..255, -128..127, 0..65536, etc)
o warnings for all ordinal types can be enabled in all modes with
-CC
git-svn-id: trunk@42047 -
2019-05-12 14:29:11 +00:00
Jonas Maebe
281b3ad276
* fix case completeness and unreachable code warnings in compiler that would
...
be introduced by the next commit
git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
a7bd37d17a
* synchronised with trunk till r40776
...
git-svn-id: branches/debug_eh@41867 -
2019-04-13 15:16:09 +00:00
nickysn
8f8aa70074
+ OpenBSD i386 and x86_64 support in tcgx86.g_profilecode
...
git-svn-id: trunk@41760 -
2019-03-21 17:09:21 +00:00
Jonas Maebe
dc2cbf8018
* synchronised with trunk till r41725
...
git-svn-id: branches/debug_eh@41726 -
2019-03-17 15:25:31 +00:00
florian
d657373933
* patch by J. Gareth Moreton which avoids that the optimizer causes reads of invalid memory, resolves #35187
...
git-svn-id: trunk@41667 -
2019-03-10 10:48:50 +00:00
Jonas Maebe
866331de34
* fixed CFI registers for leave on x86-64, and place CFI directives closer to
...
the instructions they apply to
git-svn-id: branches/debug_eh@41576 -
2019-03-03 17:14:56 +00:00
florian
367bc18bc5
* cfa for x86-64 fixed
...
git-svn-id: branches/debug_eh@41563 -
2019-03-02 23:03:32 +00:00
Jonas Maebe
50c82b6468
* synchronised with trunk till r41537
...
git-svn-id: branches/debug_eh@41538 -
2019-03-01 16:20:22 +00:00
yury
a04e4971fc
* i386: Do not request GOT for every function call. GOT is requested only for external calls in thlcgcpu.a_call_name(). Local calls are always PC relative.
...
git-svn-id: trunk@41464 -
2019-02-25 15:48:41 +00:00
yury
e5c2d13671
* Do not set pi_needs_got in current_procinfo.flags at the node level, since the GOT usage can only be estimated there. Instead set the pi_needs_got flag at places where the GOT register is accessed during the code generation. This eliminates generation of the unneeded initialization of the GOT register and fixes linker errors when the _GLOBAL_OFFSET_TABLE_ symbol is referenced but no actual GOT references are present.
...
git-svn-id: trunk@41460 -
2019-02-25 13:35:40 +00:00
florian
db6916453d
* warning fixed
...
git-svn-id: branches/debug_eh@41452 -
2019-02-24 20:03:23 +00:00
Jonas Maebe
a079e5fa80
* synchronised with trunk till r41449
...
git-svn-id: branches/debug_eh@41450 -
2019-02-24 20:01:53 +00:00
Jonas Maebe
07bd4ba517
* let all the case code generation work with tconstexprint instead of aint,
...
so it also works for 32 bit targets and a high level code generator
(where aint is still 32 bit, but 64 bit operations are not decomposed)
git-svn-id: trunk@41441 -
2019-02-24 19:58:37 +00:00
florian
18fb53e012
* set cfa offset always properly
...
git-svn-id: branches/debug_eh@41413 -
2019-02-22 22:00:20 +00:00
florian
a8c8cc1890
* create proper cfi, when registers are pushed
...
git-svn-id: branches/debug_eh@41382 -
2019-02-19 22:16:39 +00:00
florian
3567d01ee4
* improved CFI
...
git-svn-id: branches/debug_eh@41356 -
2019-02-17 20:26:32 +00:00
florian
72a02b467c
+ generate more cfi on x86
...
git-svn-id: branches/debug_eh@41287 -
2019-02-10 18:00:24 +00:00
florian
27ab140dd9
+ gcc_except_table section
...
+ support exception related sections in the default LD linker script
git-svn-id: branches/debug_eh@41285 -
2019-02-10 17:57:48 +00:00
Jonas Maebe
a0d796e98d
* synchronised with trunk till r41159
...
git-svn-id: branches/debug_eh@41160 -
2019-02-01 17:01:54 +00:00
florian
597a23d278
+ tls support for x86_64-linux (not yet enabled by default)
...
git-svn-id: trunk@41081 -
2019-01-27 09:37:25 +00:00
florian
c7bb028d35
* factored out OptPass1FLD, used bx x86-64 now as well
...
- removed unused function
git-svn-id: trunk@41061 -
2019-01-24 20:10:29 +00:00
florian
6cb6517411
* better recognization of procedure exit code
...
git-svn-id: trunk@41060 -
2019-01-24 19:53:51 +00:00
florian
24f6cc0da5
* factored out OptPass1FSTP, used by x86-64 now as well
...
git-svn-id: trunk@41059 -
2019-01-24 19:38:32 +00:00
florian
cfd0790f89
* avoid assembler errors for the MovOpMov2MovOp optimziation in case the size of the instruction
...
gets changed and the first one contains a constant, resolves #34933
git-svn-id: trunk@41021 -
2019-01-23 21:02:14 +00:00
florian
4fb7b5d3ff
* fix MovOpMov2MovOp optimization if no -Cpcoreavx2 is used
...
git-svn-id: trunk@40979 -
2019-01-21 21:57:07 +00:00
florian
4f0da5fcc3
+ patch by Marģers to support the x86 assembler instructions blsi, blsr, blsmsk, adcx, adox, movbe, pclmulqdq, resolves #34815 and #34799
...
+ avxopcodes tests also movbe and pclmulqdq
git-svn-id: trunk@40951 -
2019-01-20 18:50:12 +00:00
Jonas Maebe
b3a8543a56
* synchronised with trunk till r40942
...
git-svn-id: branches/debug_eh@40943 -
2019-01-20 17:37:07 +00:00
florian
75a89d2115
* fix and enable MovOpMov2MovOp optimization on x86-64
...
git-svn-id: trunk@40941 -
2019-01-20 17:00:43 +00:00
florian
94d7a02fae
* modified patch by Gareth Moreton to pool TmpUsedRegs in the assembler optimizers, resolves #34679
...
git-svn-id: trunk@40938 -
2019-01-20 14:16:38 +00:00
florian
b223d1c304
* modified patch by Gareth Moreton to make ie unique, resolves #34849
...
git-svn-id: trunk@40849 -
2019-01-12 14:44:54 +00:00
Jonas Maebe
51b58f342f
* synchronised with trunk till r40775
...
git-svn-id: branches/debug_eh@40776 -
2019-01-05 22:12:28 +00:00
Károly Balogh
2f7fe0e737
haiku-x86_64: add target to the compiler and ppudump, enable it in fpmake and fpcmake
...
git-svn-id: trunk@40753 -
2019-01-04 02:16:24 +00:00
Jonas Maebe
11511e13d5
* synchronised with trunk till r40723
...
git-svn-id: branches/debug_eh@40724 -
2019-01-01 13:22:17 +00:00
florian
a2cee252e8
* when optimizing range checks in case nodes, unsigned comparisions must be used, resolves #34782
...
git-svn-id: trunk@40721 -
2019-01-01 01:11:13 +00:00
florian
bd4b7a6bc4
* more case fixes
...
git-svn-id: trunk@40706 -
2018-12-29 21:53:52 +00:00
florian
f6e32ae90e
* (modified) path by Gareth Moreton to fix case handling
...
git-svn-id: trunk@40686 -
2018-12-28 20:56:43 +00:00
florian
7f5c2fa3aa
* (modified) patch by Gareth Moreton: Speed improvement in case blocks, resolves #0034762
...
This patch improves the compiler where "case" statements are concerned, using jump tables more often and creating more efficient machine code in some situations:
* If a case block only contains one branch (not including the else block), the initial range check is removed, since this becomes wasted effort.
* If the else block is empty, the else label is set to the end label - though this doesn't decrease the code size, it takes a bit of strain off the peephole optimizer.
* On -O2 and above, some node analysis is now done on the branch labels. Most of the time this just redirects it to the end
label for empty blocks, but if the block contains a goto statement, it will redirect it to its destination instead,
thus increasing performance by not having multiple jumps (this won't get picked up by the peephole optimiser if the label addresses are in a jump table).
* Some checks now use what I call the 'true count' rather than the 'label count'. The true count includes each
individual value in a range - for example, 0..2 counts as 3. This increases the chance that a jump table will be
utilised in situations where it is more efficient than a linear list.
* For jump tables, if the case block almost covers the entire range (32 entries or fewer from full coverage),
the initial range check is removed and the gaps included in the jump table (pointing to the else label).
git-svn-id: trunk@40676 -
2018-12-27 18:31:55 +00:00
Jonas Maebe
9630eb7ce9
* synchronised with trunk till r40466
...
git-svn-id: branches/debug_eh@40467 -
2018-12-04 19:54:31 +00:00
Jonas Maebe
122d0d36d6
+ volatile() expression that marks an expression as volatile
...
* disable matching volatile references in the assembler optimisers, so they
can't be removed (more conservative than needed, but better than removing
too many)
o the CSE optimiser will ignore them by default, because they're an unknown
inline node for it
* also removed no longer used fpc_in_move_x and fpc_in_fillchar_x inline node
identifiers from rtl/inc/innr.inc, and placed fpc_in_unaligned_x at the
right place
git-svn-id: trunk@40465 -
2018-12-04 19:53:20 +00:00
Jonas Maebe
cf235a36a1
* synchronised with trunk till r40378
...
git-svn-id: branches/debug_eh@40379 -
2018-11-27 20:11:49 +00:00
florian
c43cae9231
* disable MovOpMov2MovOp optimization on x86-64 for now as it seems to break
...
git-svn-id: trunk@40361 -
2018-11-21 21:22:54 +00:00
florian
477d7be651
* building on i386-linux fixed
...
git-svn-id: trunk@40360 -
2018-11-21 19:19:24 +00:00
florian
ac37a54d79
+ MovOpMov2MovOp optimization
...
git-svn-id: trunk@40359 -
2018-11-20 22:20:43 +00:00
Jonas Maebe
bfc7c58a69
* synchronised with trunk till r40348
...
git-svn-id: branches/debug_eh@40349 -
2018-11-18 12:01:50 +00:00
florian
6dbde11f5a
* three operand shl for shifting by 2, 4 or 8 can be simulated by lea
...
git-svn-id: trunk@40337 -
2018-11-17 15:08:22 +00:00
Jonas Maebe
4d262e0eca
* fixed return value of fpc_eh_return_data_regno(1) on x86-64
...
git-svn-id: branches/debug_eh@40336 -
2018-11-17 09:40:37 +00:00
florian
6a6ea6729f
* i8086 compiler fixed, resolves #34552
...
git-svn-id: trunk@40316 -
2018-11-14 18:05:35 +00:00
florian
72416edcc4
+ support for tlsm_general on i386-linux
...
git-svn-id: trunk@40281 -
2018-11-11 17:32:20 +00:00
florian
e157939b41
* compilation on x86-64 and i8086 fixed
...
git-svn-id: trunk@40275 -
2018-11-08 18:45:16 +00:00
florian
063415fa72
+ i386-linux support for tls-based threadvars
...
git-svn-id: trunk@40272 -
2018-11-07 22:03:02 +00:00
pierre
8d5cfa8731
Disable range checking in rax86int unit
...
git-svn-id: trunk@40237 -
2018-11-06 07:41:15 +00:00
yury
30d64cec68
* Removed unused local vars.
...
git-svn-id: trunk@40185 -
2018-11-02 18:51:19 +00:00
yury
4357caaad8
* Removed unused local vars.
...
git-svn-id: trunk@40183 -
2018-11-02 18:44:29 +00:00
florian
59d5d6ec95
+ factored out TX86AsmOptimizer.PrePeepholeOptIMUL, used now by x86-64 and i386
...
* generalized and simplified the code
git-svn-id: trunk@40162 -
2018-11-01 20:49:20 +00:00
florian
cdce68451a
- x86 align does not use a register anymore, code removed
...
git-svn-id: trunk@40157 -
2018-11-01 20:49:15 +00:00
pierre
9c90f593ab
Add global range check disable for i8086 cgcpu and x86 nx86add units
...
git-svn-id: trunk@40124 -
2018-10-31 23:20:29 +00:00
pierre
e5dffebdc7
Avoid range check error in MaskLength evaluation
...
git-svn-id: trunk@40110 -
2018-10-31 14:51:23 +00:00
Jonas Maebe
8555ec1438
+ fpc_eh_return_data_regno() intrinsic to get the return register numbers
...
for the Dwarf EH exception handler result
git-svn-id: branches/debug_eh@40070 -
2018-10-28 18:16:38 +00:00
pierre
d26fb3b663
Try to fix compilation error after commit #40027
...
git-svn-id: trunk@40028 -
2018-10-25 06:39:42 +00:00
pierre
740a26d879
Fix compilation of RTL for watcom target
...
git-svn-id: trunk@40027 -
2018-10-24 21:37:54 +00:00
pierre
c6977a0a7a
Explicitly disable range checking
...
git-svn-id: trunk@40026 -
2018-10-24 21:37:22 +00:00
pierre
92acd38f40
Fix for bug report #34380
...
git-svn-id: trunk@39986 -
2018-10-18 20:21:54 +00:00
florian
9805214d34
* properly take care of register allocations between the first and second instruction for the FoldLea optimization
...
* check for ait_instruction after a GetNextInstruction function call
* cosmetics
git-svn-id: trunk@39983 -
2018-10-18 18:28:03 +00:00
yury
4643a0b1ff
* Register external gas assembler for aarch64-android and x86_64-android.
...
git-svn-id: trunk@39969 -
2018-10-18 11:48:27 +00:00
Jonas Maebe
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
tg74
60a75a2277
delete testcode
...
git-svn-id: branches/tg74/avx512@39936 -
2018-10-15 10:46:41 +00:00
tg74
1ef9cc01e6
avx512 disp8*N
...
git-svn-id: branches/tg74/avx512@39909 -
2018-10-09 21:19:52 +00:00
florian
8943c0584e
+ patch by J. Gareth Moreton to support BMI2 instructions
...
+ extended avx test generator with the newly added BMI2 instructions
git-svn-id: trunk@39875 -
2018-10-07 10:10:19 +00:00
tg74
7deacdd036
bugfix avx512 opcodes VFNMSUB231PS,VFPCLASSPS
...
git-svn-id: branches/tg74/avx512@39783 -
2018-09-21 05:34:04 +00:00
tg74
fba72b280b
avx512 broadcast vcvt...,vfpclass...
...
git-svn-id: branches/tg74/avx512@39778 -
2018-09-19 15:28:15 +00:00
tg74
4265f4d6a5
avx512 broadcast for special opcodes vfpclass.., vcvt...
...
git-svn-id: branches/tg74/avx512@39768 -
2018-09-19 06:25:42 +00:00
florian
49e7e5f512
* support aitconst_*bit_unaligned in the intel assembler writer, resolves #34222
...
git-svn-id: trunk@39761 -
2018-09-16 15:27:03 +00:00
tg74
f3e18cedf6
bugfix opcode definition vrsqrt..., vscale...
...
git-svn-id: branches/tg74/avx512@39755 -
2018-09-14 09:09:35 +00:00
tg74
865563fc82
bugfixes x86ins.dat avx512-opcodes vpexpand..., vptest..., vrcp...
...
git-svn-id: branches/tg74/avx512@39754 -
2018-09-14 05:19:28 +00:00
tg74
2c40a09d04
bugfixes x86ins.dat avx512-opcodes vf...
...
git-svn-id: branches/tg74/avx512@39753 -
2018-09-13 22:01:23 +00:00
tg74
1bc0ecec11
bugfix opcode definition vfmadd132pd/ps
...
git-svn-id: branches/tg74/avx512@39751 -
2018-09-13 11:04:09 +00:00
tg74
ac26adf7c9
bugfix avx512-opcodes
...
git-svn-id: branches/tg74/avx512@39745 -
2018-09-12 13:59:29 +00:00
tg74
dd967ecfee
remove any gather/scatter opcodes for nights mill
...
git-svn-id: branches/tg74/avx512@39742 -
2018-09-12 09:59:04 +00:00
tg74
3759eac608
bugfix avx512 add ZMMReg for gather/scatter in intelOS32
...
git-svn-id: branches/tg74/avx512@39741 -
2018-09-12 06:11:44 +00:00
tg74
c611e4814a
new avx512 opcodes
...
git-svn-id: branches/tg74/avx512@39720 -
2018-09-10 06:19:45 +00:00
tg74
8b9d7be8e5
bugfix OS32
...
git-svn-id: branches/tg74/avx512@39719 -
2018-09-10 06:18:48 +00:00
tg74
1d9cbb4dcb
new AVX512 opcodes
...
git-svn-id: branches/tg74/avx512@39705 -
2018-09-03 05:40:44 +00:00
tg74
5e1dc1a807
bugfix for test tasm9 32bit
...
git-svn-id: branches/tg74/avx512@39695 -
2018-09-01 08:26:18 +00:00
tg74
914e31dbd1
new AVX512 instructions vextracti..,vextractf..
...
git-svn-id: branches/tg74/avx512@39674 -
2018-08-27 06:06:27 +00:00
tg74
6f64177c6a
bugfix avx512 OS32bit EVEX-coding
...
git-svn-id: branches/tg74/avx512@39661 -
2018-08-21 22:12:36 +00:00
tg74
15cc00164a
bugfix avx512 - process operand-extention e.g. {SAE} correctly
...
git-svn-id: branches/tg74/avx512@39653 -
2018-08-20 13:30:17 +00:00
tg74
b9de736b33
change insdat vmovq for test tasm9
...
git-svn-id: branches/tg74/avx512@39652 -
2018-08-20 13:27:37 +00:00
tg74
29690162b8
bugfix OS32
...
git-svn-id: branches/tg74/avx512@39650 -
2018-08-19 18:41:45 +00:00
tg74
d6bd114b74
bugfix OS32
...
git-svn-id: branches/tg74/avx512@39649 -
2018-08-19 16:37:20 +00:00
tg74
7c5cefad36
bugfix OS32
...
git-svn-id: branches/tg74/avx512@39648 -
2018-08-19 16:35:23 +00:00
tg74
7b8715184a
bugfix OS32
...
git-svn-id: branches/tg74/avx512@39647 -
2018-08-19 16:31:09 +00:00
tg74
2b1da37d66
new avx512 instructions and bugfixes avx512
...
git-svn-id: branches/tg74/avx512@39636 -
2018-08-19 10:18:32 +00:00
tg74
867d145e50
support vector operand bcst,{sae},{er} + k-register
...
git-svn-id: branches/tg74/avx512@39457 -
2018-07-16 17:06:57 +00:00
nickysn
9272bf59b2
+ added x86 (i8086, i386 and x86_64) intrinsics fpc_x86_get_cs/ss/ds/es/fs/gs
...
for getting the value of x86 segment registers
git-svn-id: trunk@39433 -
2018-07-11 14:19:40 +00:00
nickysn
ff2fff365f
+ added x86 compiler intrinsics fpc_x86_sti and fpc_x86_cli, which generate the
...
'sti' and 'cli' instructions
git-svn-id: trunk@39388 -
2018-07-04 16:48:34 +00:00
nickysn
6cd88a24dc
* release al/ax/eax immediately after the 'in', before (instead of after) moving
...
it to the destination imaginary register. This generates better code.
git-svn-id: trunk@39380 -
2018-07-04 13:09:47 +00:00
nickysn
f34710faa0
+ use the in and out instructions with immediate constant port number for ports
...
that are evaluated as a compile-time constant in the range 0..255
git-svn-id: trunk@39365 -
2018-07-03 20:15:20 +00:00
nickysn
fdc896ad0a
+ inline support for the x86 'in' and 'out' instructions. Currently only enabled
...
in the i8086-msdos 'ports' unit, but will be enabled on other targets (e.g.
go32v2) in the future as well. 32-bit 'in' and 'out' not inlined on i8086, but
will be on i386 and x86_64.
git-svn-id: trunk@39362 -
2018-07-03 17:01:42 +00:00
tg74
4dc5442fa5
support vector operand writemask,zeroflag
...
git-svn-id: branches/tg74/avx512@39359 -
2018-07-02 20:20:03 +00:00
florian
5782acc32d
* patch by J. Gareth Moreton to fix 33909
...
git-svn-id: trunk@39353 -
2018-07-01 12:54:30 +00:00
florian
78943ea843
+ patch by J. Gareth Moreton: x86 optimisations for Jcc and SETcc, resolves #33899
...
* optimization also added for i386
git-svn-id: trunk@39307 -
2018-06-25 20:40:05 +00:00
florian
1472a81768
* patch by J. Gareth Moreton to unify the x86 assembler optimizer method headers, resolves #33908
...
git-svn-id: trunk@39305 -
2018-06-25 20:13:34 +00:00
nickysn
45337b67fe
+ when using the i8086 with section based smartlinking, create OMF section
...
groups, named 'CGROUP' or 'CGROUP_UNITNAME', which include all the code
sections, that need to be put in the same segment
git-svn-id: trunk@39277 -
2018-06-22 15:02:39 +00:00
nickysn
ab47c8b899
+ introduce the omf_section_primary_group function. Use it instead of
...
section_belongs_to_dgroup, to allow sections to belong to groups, other than
dgroup.
git-svn-id: trunk@39268 -
2018-06-21 13:21:53 +00:00
nickysn
1631d9ac0a
+ support segments (sections) with a primary group, other than 'DGROUP' in the
...
NASM assembler writer
git-svn-id: trunk@39246 -
2018-06-20 16:14:41 +00:00
florian
0d168796d7
* patch by J. Gareth Moreton: More Peephole optimizations for AND and MOV
...
git-svn-id: trunk@39242 -
2018-06-18 20:50:08 +00:00
florian
a0b343a787
* patch by J. Gareth Moreton for less invasive DEBUG_AOPTCPU
...
git-svn-id: trunk@39239 -
2018-06-17 14:56:19 +00:00
florian
8c0d5411d0
* dwarf numbers corrected
...
* zmm14 definition fixed
+ commented definitions for bnd/k registers added
* made reg. cound a longint
git-svn-id: branches/tg74/avx512@39209 -
2018-06-10 14:17:37 +00:00
tg74
31e4d4ef5e
AVX512 support for MMRegister xmm16..31 and ymm16..31, zmm0..31, vpaddsb support AVX512
...
git-svn-id: branches/tg74/avx512@39196 -
2018-06-08 06:53:35 +00:00
nickysn
49b414ffee
+ support ugly constructs like 'DD BYTE PTR 5' in the x86 intel syntax inline
...
assembler; these are TP7 and Delphi compatible
git-svn-id: trunk@39143 -
2018-05-29 15:43:08 +00:00
nickysn
e5de7d0eac
* set all 16/32-bit specific stabs/dwarf register numbers of x86_64-only
...
registers to -1 in x86reg.dat. The values that used to be there weren't used
at all (most were just copies of the 32-bit version of the register). This can
be easily demonstrated by the fact that running 'make regdat' in the compiler
directory doesn't change any of the generated files for i8086/i386/x86_64.
git-svn-id: trunk@39098 -
2018-05-23 15:29:33 +00:00
nickysn
a275d15da2
+ added an i8086-specific column in x86reg.dat for the dwarf register numbers
...
and filled it with the dwarf register mapping, used by Open Watcom (Watcom
also uses this mapping on i386, but we don't need to support their debugger on
i386 for now)
git-svn-id: trunk@39097 -
2018-05-23 15:12:58 +00:00
nickysn
61e6d2afec
+ introduce asd_omf_linnum_line directives; they will be used for writing LINNUM
...
entries in the OMF object format
git-svn-id: trunk@39007 -
2018-05-16 17:05:02 +00:00
nickysn
d9925f7074
- removed pocall_far16 from the supported calling conventions of the i8086
...
code generator
git-svn-id: trunk@38938 -
2018-05-06 15:14:40 +00:00
nickysn
0a12bc4697
- removed pocall_oldfpccall from the supported calling conventions of the i8086
...
code generator
git-svn-id: trunk@38935 -
2018-05-06 14:07:31 +00:00
nickysn
c530e031b1
* synchronize get_saved_registers_int and get_volatile_registers_int for all
...
calling conventions on i386
* generated code at the caller side for pocall_pascal routines on i386 no longer
assumes the routine destroys all registers (except ebp) - instead now it
assumes that it preserves the ebx,esi,edi and ebp registers. This is
compatible with the pascal calling convention of 32-bit delphi and was already
honoured by FPC on the callee side.
* updated the list of calling conventions that save all registers, used in
tx86callnode.can_call_ref, so it is accurate on all x86 platforms - i8086,
i386 and x86_64.
git-svn-id: trunk@38904 -
2018-05-04 16:16:24 +00:00
nickysn
8a32d7c663
+ also support constants like 'dd [5]' in the intel syntax inline asm (for BP7
...
compatibility)
git-svn-id: trunk@38855 -
2018-04-27 11:21:51 +00:00
nickysn
a8a627f334
- removed the _count_asmdirectives and _count_asmoperators constants from the
...
rax86int unit. Instead, the _asmoperators and _asmdirectives arrays now use
tasmtoken directly as index.
git-svn-id: trunk@38854 -
2018-04-27 11:02:54 +00:00
nickysn
16e0172021
+ partial support for BP7 reference-like inline asm constants
...
git-svn-id: trunk@38850 -
2018-04-26 14:31:13 +00:00
nickysn
74f5436563
* also replaced the 3 boolean output parameters of tx86intreader.BuildConstSymbolExpression with a set
...
git-svn-id: trunk@38833 -
2018-04-24 15:40:37 +00:00
nickysn
e05c0d0168
* replaced the 3 boolean input parameters of tx86intreader.BuildConstSymbolExpression with a set
...
git-svn-id: trunk@38832 -
2018-04-24 14:59:39 +00:00
Jonas Maebe
4686f61002
* keep track of the temp position separately from the offset in references,
...
so that they can still be freed after the reference has been changed
(e.g. in case of array indexing or record field accesses) (mantis #33628 )
git-svn-id: trunk@38814 -
2018-04-22 17:03:16 +00:00
nickysn
518cdf9674
* replaced the saved_XXX_registers arrays with virtual methods inside
...
tcpuparamanager, very similar to the existing get_volatile_registers_XXX. The
new methods are called get_saved_registers_XXX, where XXX is the register
type ("int", "address", "fpu" or "mm")
git-svn-id: trunk@38794 -
2018-04-19 21:22:16 +00:00
florian
088af633ba
Fix casing, bug ID #38660
...
git-svn-id: trunk@38660 -
2018-04-02 08:53:31 +00:00
nickysn
c3483d1274
* make near/far procs/procvars compatible only with their matching (near vs far)
...
pointer type on i8086
git-svn-id: trunk@38646 -
2018-03-29 15:59:58 +00:00
florian
fa3ee68004
o patch by Dávid Pethes: Fixes for compilation with nasm 2.10 and higher on Win64:
...
* disable generation of RVA and SECREL32 symbols (according to comment in taiconst_type, they are win32 only)
* use lowercase cpu names (it was changed from case-insensitive names sometime after 2.10)
git-svn-id: trunk@38579 -
2018-03-20 21:55:01 +00:00
nickysn
602dd31a45
+ added a warning for using cs/ds/es/ss segment overrides in inline assembly on
...
the x86_64 target
git-svn-id: trunk@38517 -
2018-03-13 14:41:21 +00:00
nickysn
daf13d8750
* print a "Cannot use local variable or parameters here" error (instead of
...
internal error) in case of expressions that add two local variables using the
[expr1[expr2]] syntax
git-svn-id: trunk@38514 -
2018-03-13 12:25:54 +00:00
florian
8b0bbdcaab
* fix flag subregs after r38206
...
git-svn-id: trunk@38502 -
2018-03-11 20:30:11 +00:00
florian
9b18e39c81
* enable Lea2AddBase and Lea2AddIndex in TX86AsmOptimizer.PostPeepholeOptLea as we have flag tracking now
...
* some flag allocations fixed
git-svn-id: trunk@38501 -
2018-03-11 20:30:09 +00:00
florian
d86ffb9bfb
+ tcg.a_op_loc_reg
...
+ optimized tx86addnode.second_ordinal for x86
git-svn-id: trunk@38500 -
2018-03-11 16:32:26 +00:00
florian
5fbecc5501
+ use TX86AsmOptimizer.OptPass1SHLSAL on x86-64
...
git-svn-id: trunk@38499 -
2018-03-11 14:35:22 +00:00
florian
47927f053a
* factored out TX86AsmOptimizer.OptPass1SHLSAL
...
git-svn-id: trunk@38498 -
2018-03-11 14:35:19 +00:00
nickysn
77c782c89b
* when adding OPR_LOCAL with OPR_REFERENCE in tx86intreader.AddReferences, add
...
the offsets correctly:
1) localconstoffset is added with constoffset
2) localsymofs is added with ref.offset
git-svn-id: trunk@38470 -
2018-03-09 14:17:19 +00:00
nickysn
68be282507
+ support adding an OPR_REFERENCE to a OPR_LOCAL in the x86 intel syntax asm
...
reader; this fixes stuff like 'mov ax,cs:localvar[5]'
git-svn-id: trunk@38457 -
2018-03-08 14:32:31 +00:00
florian
78878f59b1
+ generic TAOptObj.AllocRegBetween
...
- removed x86 specific AllocRegBetween
git-svn-id: trunk@38445 -
2018-03-07 22:17:35 +00:00
nickysn
6e79c8ba86
+ support adding an OPR_LOCAL to a OPR_REFERENCE in
...
tx86intreader.AddReferences(); this allows things like mov ax,[cs:[local]] to
work
git-svn-id: trunk@38444 -
2018-03-07 17:31:25 +00:00
nickysn
d3cb61b651
* refactored tx86intreader.AddReferences to use a pair of case statements,
...
depending on the combination of operand types; this is done, so that adding
OPR_LOCAL with OPR_REFERENCE operands can be supported later.
git-svn-id: trunk@38443 -
2018-03-07 16:43:39 +00:00