svenbarth
0149d26adb
* in PeepHoleOptPass1Cpu when an instruction contains a segment, don't replace the current instruction with the next, cause then we get an infinite loop when compiling on Win32 with -dTEST_WIN32_SEH -O4
...
git-svn-id: trunk@43704 -
2019-12-20 16:44:54 +00:00
Jonas Maebe
54d3c26e27
* renamed abi_linux386_sysv to abi_i386_dynalignedstack, and also use it
...
for Darwin-based i386 platforms
git-svn-id: trunk@43650 -
2019-12-05 19:38:01 +00:00
Jonas Maebe
0802edb710
* fix Linux/i386 and Win32 after r43578
...
git-svn-id: trunk@43583 -
2019-11-25 07:55:57 +00:00
Jonas Maebe
e775ecdc43
* cleaned up safecall support: use a hidden localvarsym instead of result
...
register hacking
o this also allowed fixing/adding safecall support for LLVM
git-svn-id: trunk@43578 -
2019-11-24 20:23:22 +00:00
florian
9e307f5c3a
- removed code not used for years
...
git-svn-id: trunk@43575 -
2019-11-24 19:50:27 +00:00
florian
d444f750f9
* factored out TX86AsmOptimizer.OptPass1Cmp
...
* fixed it
* activated it for x86-64
git-svn-id: trunk@43574 -
2019-11-24 16:33:50 +00:00
florian
dea1855126
o patch by J. Gareth Moreton, resolves #36352 :
...
* The supplied patch cleans up some vestigial code from the i386 peephole
optimizer that has since been superseded by the jump optimisations over
at #36271 .
* The PrePeepholeOptsCPU method has had a minor restructuring to better
handle the rare case where InsContainsSegRef() returns True and
p becomes something that is no longer an instruction (it ultimately
removes a conditonal check and some overhead from repeated function calls).
git-svn-id: trunk@43573 -
2019-11-24 16:12:02 +00:00
pierre
c882828fd0
Minimalist change to avoid Invalid Typecast error on class when compiled with '-CriotR -O2' for i386-go32v2 target
...
git-svn-id: trunk@43565 -
2019-11-23 22:44:30 +00:00
svenbarth
3e9bfedbc4
* ensure that the required functions are referenced for Win32 SEH for packages as well
...
git-svn-id: trunk@43552 -
2019-11-21 21:45:21 +00:00
svenbarth
2e259ee3cc
* the VMT of the exception class needs to be referenced indirectly
...
git-svn-id: trunk@43543 -
2019-11-21 21:44:48 +00:00
florian
2d3ef8b4bc
* pushf/push cs on all platforms when directly calling an interrupt procedure, with the
...
recent changes needed for 16 byte stack alignment it should work now
git-svn-id: trunk@43508 -
2019-11-17 14:16:32 +00:00
florian
87b3b089d6
* i386: more clean up of TCPUAsmOPtimizer.PeepHoleOptPass1Cpu
...
git-svn-id: trunk@43465 -
2019-11-14 21:26:48 +00:00
florian
632f13c47a
* i386 does not use anymore its own assembler optimizer loops
...
git-svn-id: trunk@43464 -
2019-11-14 21:14:01 +00:00
florian
7747c5fc27
-- Zusammenführen von r43307 bis r43443 in ».«:
...
D tests/webtbs/tw32219.pp
U compiler/i386/i386att.inc
U compiler/i386/i386atts.inc
U compiler/i386/i386int.inc
U compiler/i386/i386nop.inc
U compiler/i386/i386op.inc
U compiler/i386/i386prop.inc
U compiler/i386/i386tab.inc
U compiler/i8086/i8086att.inc
U compiler/i8086/i8086atts.inc
U compiler/i8086/i8086int.inc
U compiler/i8086/i8086nop.inc
U compiler/i8086/i8086op.inc
U compiler/i8086/i8086prop.inc
U compiler/i8086/i8086tab.inc
U compiler/x86/x86ins.dat
U compiler/x86_64/x8664ats.inc
U compiler/x86_64/x8664att.inc
U compiler/x86_64/x8664int.inc
U compiler/x86_64/x8664nop.inc
U compiler/x86_64/x8664op.inc
U compiler/x86_64/x8664pro.inc
U compiler/x86_64/x8664tab.inc
U tests/utils/avx/avxopcodes.pas
-- Aufzeichnung der Informationen für Zusammenführung von r42706 bis r43443 in ».«:
U .
git-svn-id: trunk@43444 -
2019-11-10 16:44:34 +00:00
tg74
1454e8b29d
new avx512-opcodes VBMI2,VNNI,BITALG ...
...
git-svn-id: branches/tg74/avx512merge@43406 -
2019-11-06 19:51:01 +00:00
florian
20a47afe13
* more aggressive LeaCallLeaRet2Jmp
...
git-svn-id: trunk@43373 -
2019-11-02 22:37:31 +00:00
florian
3487c34ed9
* unified TX86AsmOptimizer.OptPass1MOVAP and TX86AsmOptimizer.OptPass1VMOVAP
...
git-svn-id: trunk@43370 -
2019-11-02 18:48:23 +00:00
florian
fa9c7a92c7
-- Zusammenführen von r42725 bis r43306 in ».«:
...
A tests/webtbs/tw32219.pp
U tests/utils/avx/avxopcodes.pas
U tests/utils/avx/asmtestgenerator.pas
U compiler/i386/i386tab.inc
U compiler/i386/i386nop.inc
U compiler/i8086/i8086tab.inc
U compiler/i8086/i8086nop.inc
U compiler/x86_64/x8664tab.inc
U compiler/x86_64/x8664nop.inc
U compiler/x86/aasmcpu.pas
U compiler/x86/x86ins.dat
U compiler/x86/rax86.pas
-- Aufzeichnung der Informationen für Zusammenführung von r42706 bis r43306 in ».«:
U .
git-svn-id: trunk@43307 -
2019-10-23 18:17:50 +00:00
florian
c2a36826a7
* regenerated
...
git-svn-id: branches/tg74/avx512merge@43300 -
2019-10-21 20:08:27 +00:00
florian
14167ca84a
* potential fix for assembler MOVNTSD
...
git-svn-id: branches/tg74/avx512merge@43276 -
2019-10-20 15:51:18 +00:00
florian
fb91899457
* adapted 16 byte alignment handling on linux: it is now assumed that the callee tries to clear the stack, so in the caller, the stack is re-adjusted
...
git-svn-id: trunk@43176 -
2019-10-12 21:51:13 +00:00
tg74
05429fc4c2
bugfix 35700 - replace x86insdat-opcodeflags SCL_32,SCL_64 with \336\,\337\)
...
git-svn-id: branches/tg74/avx512merge@43152 -
2019-10-08 09:13:43 +00:00
florian
8ecdb2e9ca
+ dwarf support for tls threadvars
...
git-svn-id: trunk@43134 -
2019-10-05 20:48:31 +00:00
florian
a2d3522812
* general-dynamic -> global-dynamic
...
git-svn-id: trunk@43132 -
2019-10-05 20:48:29 +00:00
florian
03f7ef4c63
* renamed tls model switches and symbols to match gcc
...
git-svn-id: trunk@43122 -
2019-10-05 20:48:20 +00:00
tg74
f0002fe644
bugfix 35700 without opcode flags
...
git-svn-id: branches/tg74/avx512merge@43106 -
2019-10-02 20:39:41 +00:00
florian
11319353fd
* loading a got depends only on the fact if a got is needed and not if pic shall be generated
...
git-svn-id: trunk@43075 -
2019-09-25 21:19:06 +00:00
florian
56d91b4ca7
+ support tls threadvars with the internal assembler
...
git-svn-id: trunk@43070 -
2019-09-25 21:19:03 +00:00
florian
bd1d6f335d
* if we load a got depends only if one is needed, not if PIC is generated as this could be also caused by tls support
...
git-svn-id: trunk@43055 -
2019-09-22 15:27:51 +00:00
pierre
0fa70759a2
* cutils.pas (size_2_align): Move to..
...
globals.pas (size_2_align): ...here.
Change parameter type to asizeuint to avoid overflows.
(var_align_size, const_align_size): Also change parameter type to asizeuint.
i386/cpupara.pas, i8086/cpupara.pas, x86_64/cpupara.pas: Add globals
to implementation uses clause because of size_2_align move.
git-svn-id: trunk@43022 -
2019-09-16 14:50:43 +00:00
florian
896e031e84
* interrupt procedures fixed for i386 targets with a fixed stack with 16 byte alignment
...
git-svn-id: trunk@43006 -
2019-09-15 17:17:27 +00:00
tg74
11c46f9345
bugfix 35700 xmmrm - zmmrm, mem32/64
...
git-svn-id: branches/tg74/avx512merge@42955 -
2019-09-08 19:12:36 +00:00
tg74
41c500e51a
preparing for bugfix 35700
...
git-svn-id: branches/tg74/avx512merge@42838 -
2019-08-26 19:33:12 +00:00
florian
ba203c0564
+ x86 makes use of fpu_capabilities
...
* moved CPUX86_HAS_AVXUNIT to FPUX86_HAS_AVXUNIT
+ mm register allocator can be initialized with 32 mm registers of AVX512
git-svn-id: trunk@42707 -
2019-08-16 11:35:03 +00:00
florian
70a2b0b260
* restored change information for FMA instructions which got lost somewhere
...
git-svn-id: branches/tg74/avx512@42651 -
2019-08-11 16:59:10 +00:00
florian
f883dd6dbb
Synchronized with trunk, part 2 (make all works, avx-512 support not yet tested, no regression testing yet)
...
git-svn-id: branches/tg74/avx512@42643 -
2019-08-10 19:38:35 +00:00
florian
746bfced25
Synchronized with trunk, part 1 (only make cycle tested, make all is broken, avx-512 support not yet tested
...
git-svn-id: branches/tg74/avx512@42642 -
2019-08-10 13:53:20 +00:00
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
Jonas Maebe
449a14dddf
- disabled ogmacho, as it can no longer deal with the assembly we generate
...
git-svn-id: trunk@42339 -
2019-07-07 21:33:39 +00:00
Jonas Maebe
a0e35fd1bc
* synchronised with trunk till r42118
...
git-svn-id: branches/debug_eh@42119 -
2019-05-25 13:19:06 +00:00
Jonas Maebe
77658b925b
* disable regular array -> dynamic array type coversion support unless
...
{$modeswitch arraytodynarray} is active (mantis #35576 )
o changed compiler to compile without this modeswitch
o added the modeswitch to a test that depends on it
git-svn-id: trunk@42118 -
2019-05-25 12:31:32 +00:00
pierre
c752aa5cf5
Avoid incomplete case warning when compiled with -dTEST_WIN32_SEH
...
git-svn-id: trunk@42115 -
2019-05-24 10:14:51 +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
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
Károly Balogh
2c1639003c
* reinstate the internalerror removed in r41730 for i386, as that was a valid condition to verify
...
git-svn-id: trunk@41731 -
2019-03-18 13:21:58 +00:00
Károly Balogh
5358851f84
* clean up some things regarding explicit paraloc handling. this should fix m68k-amiga and powerpc-morphos builds after r41716
...
git-svn-id: trunk@41730 -
2019-03-18 01:19:18 +00:00
Jonas Maebe
5d28e2156b
+ support for generating Dwarf CFI using .cfi_* directives
...
o adjust peephole optimisers so they don't remove cfi_endproc directives
in case of tail call optimisation
git-svn-id: branches/debug_eh@41578 -
2019-03-03 17:15:03 +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
039aee9568
* i386 PIC: Do not force EBX as a GOT register if tf_section_threadvars is not set. Actually forcing EBX here is a bad idea anyway.
...
git-svn-id: trunk@41463 -
2019-02-25 15:05:26 +00:00
yury
4da16992df
* i386: Minor PIC initialization improvement if the GOT register is forced to EBX.
...
git-svn-id: trunk@41462 -
2019-02-25 14:43:46 +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
yury
a277a5f8db
* Removed unused local vars.
...
git-svn-id: trunk@41457 -
2019-02-25 11:22:49 +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
Jonas Maebe
ac883969a9
* synchronised with trunk till r41423
...
git-svn-id: branches/debug_eh@41424 -
2019-02-23 17:08:03 +00:00
Jonas Maebe
8b9e90dc7a
* keep track of whether a routine has a C-style variadic parameter in the
...
procoptions even when it's through an array-of-const parameter
* always call create_varargs_paraloc_info() instead of create_paraloc_info()
in the former case, even when no varargs parameters are specified (because
on some platforms even some non-variadic parameters need to be passed
differently, such as on ARM with gnueabihf)
git-svn-id: trunk@41420 -
2019-02-23 15:42:45 +00:00
florian
9514bd9162
* refactored psabieh handling, most code is now in psabiehpi
...
git-svn-id: branches/debug_eh@41367 -
2019-02-17 21:20:40 +00:00
florian
3567d01ee4
* improved CFI
...
git-svn-id: branches/debug_eh@41356 -
2019-02-17 20:26:32 +00:00
florian
dfe37de0a1
* do not use push/pop based exception reason handling on i386 if dwarf based exceptions are used
...
git-svn-id: branches/debug_eh@41282 -
2019-02-10 17:49:40 +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
Jonas Maebe
4869d0ace9
* perform extension of parameters to 32 bit for Darwin in the paraloc instead
...
of in the cgpara (cgpara should always correspond to the real parameter)
git-svn-id: trunk@41134 -
2019-01-29 21:39:12 +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
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
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
51b58f342f
* synchronised with trunk till r40775
...
git-svn-id: branches/debug_eh@40776 -
2019-01-05 22:12:28 +00:00
Jonas Maebe
91d5457b38
* moved around/replaced the following procedures to stop nflw from depending
...
on pdecsub (node units should not depend on parser units):
o maybe_add_public_default_java_constructor()
o handle_calling_convention()
o create_finalizer_procdef() (replaced with create_outline_procdef())
o insert_record_hidden_paras()
o handle_calling_convention()
o proc_add_definition()
o build_parentfpstruct()
o maybe_guarantee_record_typesym()
o get_first_proc_str()
* factored out the creation of a procinfo for a nested procdef based on a
subnodetree of the current procdef into tprocinfo.create_for_outlining()
git-svn-id: trunk@40773 -
2019-01-05 16:26:33 +00:00
Jonas Maebe
882d676bc9
* synchronised with trunk till r40635
...
git-svn-id: branches/debug_eh@40636 -
2018-12-24 22:12:19 +00:00
Jonas Maebe
acf02ab64b
* when creating wrappers, add a prefix to parameter names to prevent them
...
hiding the method name of the wrapped routine
o also add a few more '&' prefixes to the generated wrapper code to
prevent issues when keywords are used as identifiers
git-svn-id: trunk@40634 -
2018-12-24 22:10:06 +00:00
Jonas Maebe
4cd6f59bc3
* changed create_hlcodegen into a procvar, so that we don't have to insert
...
hlcgllvm in the uses clause of every unit that calls create_hlcodegen
o prevents dependency cycles that can cause llvm codegen units to init
before the cpu variants, which is bad since the llvm versions have to
override the cpu variants in their init code (+ added checks in the
init code that they are in fact initialised later)
git-svn-id: branches/debug_eh@40410 -
2018-11-29 21:31:15 +00:00
Jonas Maebe
3b9f5a5e96
* moved finalization of code generator temps to a node, so it can be getcopy'd
...
(needed for LLVM, where we need two copies of the finally code: one in case
an exception occurs, and one in case none is raised)
o also first finalize parameters and only then code generator temps, since
in theory the former could create more of the latter
git-svn-id: trunk@40345 -
2018-11-17 22:38:36 +00:00
florian
e8ebc00b3b
* redundant code removed, work is meanwhile done by aasmcpu.optimize_ref
...
git-svn-id: trunk@40282 -
2018-11-11 17:32:21 +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
9b0ff05ee8
- get rid of MaxOps, it is redundant with max_operands
...
* MatchOpType with three operands is only available of max_operands>2
git-svn-id: trunk@40190 -
2018-11-02 21:32:29 +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
2a016889de
* skip align directives after unconditional jumps
...
git-svn-id: trunk@40160 -
2018-11-01 20:49:18 +00:00
Jonas Maebe
0cd85d73e4
* ttryfinallynode now inherits from tbinarynode instead of tloopnode, as its
...
t1 field was always set to tnothingnode
git-svn-id: trunk@40142 -
2018-11-01 13:19:33 +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
14d392fd0e
avx512 broadcast for special opcodes vcvt...
...
git-svn-id: branches/tg74/avx512@39779 -
2018-09-19 21:29:49 +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
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
608992ecf5
minor bugfixes avx512 tests
...
git-svn-id: branches/tg74/avx512@39740 -
2018-09-12 05:03:05 +00:00
tg74
c611e4814a
new avx512 opcodes
...
git-svn-id: branches/tg74/avx512@39720 -
2018-09-10 06:19:45 +00:00
tg74
1d9cbb4dcb
new AVX512 opcodes
...
git-svn-id: branches/tg74/avx512@39705 -
2018-09-03 05:40:44 +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
6985da744b
change x86ins.dat vmovq for test tasm9
...
git-svn-id: branches/tg74/avx512@39654 -
2018-08-20 13:31:42 +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
tg74
4dc5442fa5
support vector operand writemask,zeroflag
...
git-svn-id: branches/tg74/avx512@39359 -
2018-07-02 20:20:03 +00:00