Commit Graph

1550 Commits

Author SHA1 Message Date
pierre
d8b0ded10c Marge of more trunk fixes into fixes branch.
------------------------------------------------------------------------
r39725 | pierre | 2018-09-10 13:28:33 +0000 (Mon, 10 Sep 2018) | 1 line

 Add branches for 3.2.0, 3.2.1 and 3.3.1 versions
------------------------------------------------------------------------
--- Merging r39725 into '.':
U    tests/utils/testsuite/utests.pp
--- Recording mergeinfo for merge of r39725 into '.':
 U   .
------------------------------------------------------------------------
r39733 | pierre | 2018-09-11 08:16:56 +0000 (Tue, 11 Sep 2018) | 1 line

 sparc64-linux objects recompiled with GCC 7.3.0
------------------------------------------------------------------------
--- Merging r39733 into '.':
U    tests/test/cg/obj/readme.txt
U    tests/test/cg/obj/linux/sparc64/ctest.o
U    tests/test/cg/obj/linux/sparc64/cpptcl1.o
U    tests/test/cg/obj/linux/sparc64/cpptcl2.o
U    tests/test/cg/obj/linux/sparc64/tcext3.o
U    tests/test/cg/obj/linux/sparc64/tcext4.o
U    tests/test/cg/obj/linux/sparc64/tcext5.o
U    tests/test/cg/obj/linux/sparc64/tcext6.o
--- Recording mergeinfo for merge of r39733 into '.':
 G   .
------------------------------------------------------------------------
r39808 | pierre | 2018-09-26 09:29:33 +0000 (Wed, 26 Sep 2018) | 1 line

Disable libraries not compiling for jvm-java or jvm-android targets
------------------------------------------------------------------------
--- Merging r39808 into '.':
U    packages/fppkg/fpmake.pp
U    packages/fcl-base/fpmake.pp
U    packages/rtl-extra/fpmake.pp
U    packages/hermes/fpmake.pp
U    packages/fcl-extra/fpmake.pp
U    packages/fcl-db/fpmake.pp
U    packages/unzip/fpmake.pp
U    packages/odbc/fpmake.pp
U    packages/gdbm/fpmake.pp
U    packages/pthreads/fpmake.pp
U    packages/fcl-json/fpmake.pp
U    packages/pcap/fpmake.pp
U    packages/numlib/fpmake.pp
U    packages/rtl-generics/fpmake.pp
U    packages/zlib/fpmake.pp
U    packages/paszlib/fpmake.pp
U    packages/webidl/fpmake.pp
U    packages/regexpr/fpmake.pp
U    packages/libgd/fpmake.pp
U    packages/fcl-net/fpmake.pp
U    packages/fcl-res/fpmake.pp
U    packages/libpng/fpmake.pp
U    packages/dblib/fpmake.pp
U    packages/tcl/fpmake.pp
U    packages/openssl/fpmake.pp
U    packages/ibase/fpmake.pp
U    packages/bzip2/fpmake.pp
U    packages/fcl-sdo/fpmake.pp
U    packages/fcl-sound/fpmake.pp
U    packages/fcl-passrc/fpmake.pp
U    packages/fcl-stl/fpmake.pp
U    packages/libmicrohttpd/fpmake.pp
U    packages/mysql/fpmake.pp
U    packages/postgres/fpmake.pp
U    packages/httpd22/fpmake.pp
U    packages/httpd24/fpmake.pp
U    packages/rtl-console/fpmake.pp
U    packages/sqlite/fpmake.pp
U    packages/fftw/fpmake.pp
U    packages/fcl-pdf/fpmake.pp
U    packages/rtl-objpas/fpmake.pp
U    packages/fcl-image/fpmake.pp
U    packages/pasjpeg/fpmake.pp
U    packages/chm/fpmake.pp
U    packages/fcl-registry/fpmake.pp
U    packages/libtar/fpmake.pp
U    packages/symbolic/fpmake.pp
U    packages/libenet/fpmake.pp
U    packages/imagemagick/fpmake.pp
U    packages/fcl-xml/fpmake.pp
U    packages/oracle/fpmake.pp
U    packages/fcl-fpcunit/fpmake.pp
U    packages/fcl-js/fpmake.pp
U    packages/fcl-async/fpmake.pp
U    packages/fcl-process/fpmake.pp
U    packages/pastojs/fpmake.pp
U    packages/hash/fpmake.pp
U    packages/rtl-unicode/fpmake.pp
U    packages/fpmkunit/fpmake.pp
--- Recording mergeinfo for merge of r39808 into '.':
 G   .
------------------------------------------------------------------------
r40027 | pierre | 2018-10-24 21:37:54 +0000 (Wed, 24 Oct 2018) | 1 line

 Fix compilation of RTL for watcom target
------------------------------------------------------------------------
--- Merging r40027 into '.':
U    compiler/x86/agx86int.pas
--- Recording mergeinfo for merge of r40027 into '.':
 G   .
------------------------------------------------------------------------
r40028 | pierre | 2018-10-25 06:39:42 +0000 (Thu, 25 Oct 2018) | 1 line

Try to fix compilation error after commit #40027
------------------------------------------------------------------------
--- Merging r40028 into '.':
G    compiler/x86/agx86int.pas
--- Recording mergeinfo for merge of r40028 into '.':
 G   .
------------------------------------------------------------------------
r40102 | pierre | 2018-10-31 09:07:57 +0000 (Wed, 31 Oct 2018) | 1 line

 Replace aint (which is a compiler specific type) by ptruint type, which is defined in system unit
------------------------------------------------------------------------
--- Merging r40102 into '.':
U    tests/test/tarray5.pp
--- Recording mergeinfo for merge of r40102 into '.':
 G   .
------------------------------------------------------------------------
r40103 | pierre | 2018-10-31 09:59:45 +0000 (Wed, 31 Oct 2018) | 1 line

 Use pdword to avoid range check erro in tentryfile.getdword method
------------------------------------------------------------------------
--- Merging r40103 into '.':
U    compiler/entfile.pas
--- Recording mergeinfo for merge of r40103 into '.':
 G   .
------------------------------------------------------------------------
r40104 | pierre | 2018-10-31 10:21:51 +0000 (Wed, 31 Oct 2018) | 1 line

 Use longint type instead of AWord for Initial parameter in CalcExecutionWeigths (to avoid range error for avr compiler)
------------------------------------------------------------------------
@@
      begin
        Result:=fen_false;
        n.allocoptinfo;
<<<<<<< MINE (select with 'mc') (367)
        Weight:=PAWord(arg)^;
||||||| ORIGINAL (367)
        Weight:=max(PAWord(arg)^,1);
=======
        Weight:=max(plongint(arg)^,1);
>>>>>>> THEIRS (select with 'tc') (367)
        case n.nodetype of
          casen:
            begin
--- Merging r40104 into '.':
C    compiler/optutils.pas
--- Recording mergeinfo for merge of r40104 into '.':
 G   .
Summary of conflicts:
  Text conflicts: 1
------------------------------------------------------------------------
r40110 | pierre | 2018-10-31 14:51:23 +0000 (Wed, 31 Oct 2018) | 1 line

 Avoid range check error in MaskLength evaluation
------------------------------------------------------------------------
--- Merging r40110 into '.':
U    compiler/x86/aoptx86.pas
--- Recording mergeinfo for merge of r40110 into '.':
 G   .
------------------------------------------------------------------------
r40111 | pierre | 2018-10-31 15:47:53 +0000 (Wed, 31 Oct 2018) | 1 line

 Complement commit 40104, by changing type of executionweight in toptinfo record and adapt pass_2 code
------------------------------------------------------------------------
--- Merging r40111 into '.':
U    compiler/pass_2.pas
U    compiler/optbase.pas
--- Recording mergeinfo for merge of r40111 into '.':
 G   .
------------------------------------------------------------------------
r40112 | pierre | 2018-10-31 15:48:32 +0000 (Wed, 31 Oct 2018) | 1 line

 Disable range check completely in arm/cgcpu unit
------------------------------------------------------------------------
--- Merging r40112 into '.':
U    compiler/arm/cgcpu.pas
--- Recording mergeinfo for merge of r40112 into '.':
 G   .
------------------------------------------------------------------------
r40113 | pierre | 2018-10-31 15:49:14 +0000 (Wed, 31 Oct 2018) | 1 line

 Avoid overflow in code
------------------------------------------------------------------------
--- Merging r40113 into '.':
U    compiler/symdef.pas
--- Recording mergeinfo for merge of r40113 into '.':
 G   .
------------------------------------------------------------------------
r40114 | pierre | 2018-10-31 15:50:26 +0000 (Wed, 31 Oct 2018) | 1 line

Add explicit rtlclean/rtl targets in fullcycle rule if DOWPOCYCLE is set
------------------------------------------------------------------------
--- Merging r40114 into '.':
U    compiler/Makefile.fpc
U    compiler/Makefile
--- Recording mergeinfo for merge of r40114 into '.':
 G   .
------------------------------------------------------------------------
r40120 | pierre | 2018-10-31 23:15:22 +0000 (Wed, 31 Oct 2018) | 1 line

 Change RemoveCurrentP parameter type to tai, because GetNextInstruction does not always return a taicpu, adapt code in avr/aoptcpu unit
------------------------------------------------------------------------
--- Merging r40120 into '.':
U    compiler/aoptobj.pas
U    compiler/avr/aoptcpu.pas
--- Recording mergeinfo for merge of r40120 into '.':
 G   .
------------------------------------------------------------------------
r40121 | pierre | 2018-10-31 23:16:51 +0000 (Wed, 31 Oct 2018) | 1 line

Add check about tloadnode.symtableentry type before typecast
------------------------------------------------------------------------
--- Merging r40121 into '.':
U    compiler/ncal.pas
--- Recording mergeinfo for merge of r40121 into '.':
 G   .
------------------------------------------------------------------------
r40122 | pierre | 2018-10-31 23:18:09 +0000 (Wed, 31 Oct 2018) | 1 line

Fix typecast in FindRegDeAlloc call
------------------------------------------------------------------------
--- Merging r40122 into '.':
U    compiler/arm/aoptcpu.pas
--- Recording mergeinfo for merge of r40122 into '.':
 G   .
------------------------------------------------------------------------
r40123 | pierre | 2018-10-31 23:19:39 +0000 (Wed, 31 Oct 2018) | 1 line

 Remove unneeded typecasts in TryTOptimizeMove
------------------------------------------------------------------------
--- Merging r40123 into '.':
U    compiler/m68k/aoptcpu.pas
--- Recording mergeinfo for merge of r40123 into '.':
 G   .
------------------------------------------------------------------------
r40124 | pierre | 2018-10-31 23:20:29 +0000 (Wed, 31 Oct 2018) | 1 line

 Add global range check disable for i8086 cgcpu and x86 nx86add units
------------------------------------------------------------------------
--- Merging r40124 into '.':
U    compiler/i8086/cgcpu.pas
U    compiler/x86/nx86add.pas
--- Recording mergeinfo for merge of r40124 into '.':
 G   .
------------------------------------------------------------------------
r40131 | pierre | 2018-11-01 07:01:02 +0000 (Thu, 01 Nov 2018) | 1 line

 Remove another wrong typecast when testing  that a tai is an instruction
------------------------------------------------------------------------
--- Merging r40131 into '.':
G    compiler/m68k/aoptcpu.pas
--- Recording mergeinfo for merge of r40131 into '.':
 G   .
------------------------------------------------------------------------
r40236 | pierre | 2018-11-06 07:40:31 +0000 (Tue, 06 Nov 2018) | 1 line

 Really change extension of hs1 local variable in get_exepath
------------------------------------------------------------------------
--- Merging r40236 into '.':
U    compiler/globals.pas
--- Recording mergeinfo for merge of r40236 into '.':
 G   .
------------------------------------------------------------------------
r40237 | pierre | 2018-11-06 07:41:15 +0000 (Tue, 06 Nov 2018) | 1 line

 Disable range checking in rax86int unit
------------------------------------------------------------------------
--- Merging r40237 into '.':
U    compiler/x86/rax86int.pas
--- Recording mergeinfo for merge of r40237 into '.':
 G   .
------------------------------------------------------------------------
r40278 | pierre | 2018-11-08 20:19:54 +0000 (Thu, 08 Nov 2018) | 1 line

 Downgrade EXTDEBUG warning to note about zero size temp, as it is used for empty sets
------------------------------------------------------------------------
--- Merging r40278 into '.':
U    compiler/tgobj.pas
--- Recording mergeinfo for merge of r40278 into '.':
 G   .

git-svn-id: branches/fixes_3_2@40624 -
2018-12-23 22:27:05 +00:00
pierre
1fafc17016 Merge of revisions 39731 39825 39849 39912 39913 39914 39924 39935 39999 40000 40001 40026 40115 40132 40163 from trunk to fixes_3_2
------------------------------------------------------------------------
r39731 | pierre | 2018-09-11 08:00:54 +0000 (Tue, 11 Sep 2018) | 1 line

 Disable overflow for UDIVX ans SDIVX 64-bit instructions
------------------------------------------------------------------------
--- Merging r39731 into '.':
U    compiler/sparcgen/ncpumat.pas
--- Recording mergeinfo for merge of r39731 into '.':
 G   .
------------------------------------------------------------------------
r39825 | pierre | 2018-09-27 06:59:07 +0000 (Thu, 27 Sep 2018) | 1 line

 Add rtl dependency and fix fpcdir value
------------------------------------------------------------------------
--- Merging r39825 into '.':
U    packages/ide/compiler/Makefile.fpc
--- Recording mergeinfo for merge of r39825 into '.':
 G   .
------------------------------------------------------------------------
r39849 | pierre | 2018-10-01 21:50:13 +0000 (Mon, 01 Oct 2018) | 1 line

 Use vfpv2 as default fpu for eabihf if cpu is below armv7
------------------------------------------------------------------------
--- Merging r39849 into '.':
U    compiler/options.pas
--- Recording mergeinfo for merge of r39849 into '.':
 G   .
------------------------------------------------------------------------
r39912 | pierre | 2018-10-11 20:38:39 +0000 (Thu, 11 Oct 2018) | 1 line

 Fix ppuload for string type for i8086, use getasizeint for all string defs but short string
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r39912 into '.':
 G   .
------------------------------------------------------------------------
r39913 | pierre | 2018-10-11 21:02:25 +0000 (Thu, 11 Oct 2018) | 1 line

 fix position of ppuload_platform for trecorddef
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r39913 into '.':
 G   .
------------------------------------------------------------------------
r39914 | pierre | 2018-10-12 06:05:50 +0000 (Fri, 12 Oct 2018) | 1 line

 Adapt ppudump to fix introduced in revision 39912
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r39914 into '.':
 G   .
------------------------------------------------------------------------
r39924 | pierre | 2018-10-13 11:35:34 +0000 (Sat, 13 Oct 2018) | 1 line

 Downgrade some warnings to notes for EXTDEBUG
------------------------------------------------------------------------
--- Merging r39924 into '.':
U    compiler/pass_2.pas
U    compiler/tgobj.pas
--- Recording mergeinfo for merge of r39924 into '.':
 G   .
------------------------------------------------------------------------
r39935 | pierre | 2018-10-14 22:18:50 +0000 (Sun, 14 Oct 2018) | 1 line

 Add missing setting of expectloc for multiplications
------------------------------------------------------------------------
--- Merging r39935 into '.':
U    compiler/nadd.pas
--- Recording mergeinfo for merge of r39935 into '.':
 G   .
------------------------------------------------------------------------
r39999 | pierre | 2018-10-20 18:44:05 +0000 (Sat, 20 Oct 2018) | 1 line

 Avoid run time error if compiled with -CR option
------------------------------------------------------------------------
--- Merging r39999 into '.':
U    compiler/m68k/cpupara.pas
--- Recording mergeinfo for merge of r39999 into '.':
 G   .
------------------------------------------------------------------------
r40000 | pierre | 2018-10-20 18:49:53 +0000 (Sat, 20 Oct 2018) | 1 line

Avoid range check error when compiled with -CR
------------------------------------------------------------------------
--- Merging r40000 into '.':
U    compiler/m68k/cgcpu.pas
--- Recording mergeinfo for merge of r40000 into '.':
 G   .
------------------------------------------------------------------------
r40001 | pierre | 2018-10-20 22:19:08 +0000 (Sat, 20 Oct 2018) | 1 line

 Add explicit typecast to avoid range check error
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r40001 into '.':
 G   .
------------------------------------------------------------------------
r40026 | pierre | 2018-10-24 21:37:22 +0000 (Wed, 24 Oct 2018) | 1 line

 Explicitly disable range checking
------------------------------------------------------------------------
--- Merging r40026 into '.':
U    compiler/x86/cgx86.pas
--- Recording mergeinfo for merge of r40026 into '.':
 G   .
------------------------------------------------------------------------
r40115 | pierre | 2018-10-31 22:53:11 +0000 (Wed, 31 Oct 2018) | 1 line

 Avoid range check error in ReadPosInfo
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r40115 into '.':
 G   .
------------------------------------------------------------------------
r40132 | pierre | 2018-11-01 07:09:47 +0000 (Thu, 01 Nov 2018) | 1 line

 Only call moved if len>0, as otherwise astring local variable is nil, which leads to a range check error for astring[1]
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r40132 into '.':
 G   .
------------------------------------------------------------------------
r40163 | pierre | 2018-11-01 21:58:54 +0000 (Thu, 01 Nov 2018) | 8 lines

  More -CriotR fixes:
  * entfile.pas: Change PPU header falgs filed from longint to dword.
  * ngtcon.pas: Change local variable startoffset type to aword.
  * omfbase.pas: Avoid calling move with a nil string s indexed as s[1],
    to avoid a range check error.
  * owomflib.pas: Disable range check explicitly in hash computation.
  * utils/ppuutils/ppudump.pp: Adapt to flags type change in entfile.pas

------------------------------------------------------------------------
--- Recording mergeinfo for merge of r40163 into '.':
 G   .

git-svn-id: branches/fixes_3_2@40616 -
2018-12-22 22:19:05 +00:00
yury
0654857ce1 Merged aarch64-android, x86_64-android targets and fixes for the Android target.
Revision(s) 39739, 39749, 39860, 39862, 39865, 39869, 39871, 39903, 39905, 39917, 39956, 39959-39960, 39969, 39971, 39980, 39987, 40198-40201, 40472, 40532, 40535-40536 from trunk:
* Android: The list of supported syscalls has been auto-generated directly from android sources for each CPU.
* Minor adjustments to make all compilable with the proper list of Android syscalls.
........
* Re-generated lists of android syscalls by a new script. The lists are more correct now. The script's location: https://svn.freepascal.org/svn/fpcbuild/scripts/android
........
* Fixed UnhookSignal when RTL_SIGDEFAULT is passed. The bug have caused crash on aarch64-android due to out of bounds read of the rtlsig2ossig[] array.
........
+ Added support for the aarch64-android target.
........
* Set ICU data dir if it is not set by the system. It fixes issues on newer Android versions.
* Added more predefined ICU versions.
........
* android: Use the current dir as temp.
........
* Corrected TUContext record for aarch64-linux and aarch64-android. It fixes obtaining of an address of the instruction where a signal has thrown.
........
* Enabled safecall support for aarch64 to be on par with other cpus.
........
* Android: Reworked the startup code to use no assembly instructions. Generic assembler startup files contains only section data and are compiled for each CPU.
* Android: argc and argv are correct for shared libraries.
........
* Use syscall_nr_renameat for android.
........
+ added support for x86_64-android target.
........
+ Added the auto-generated list syscalls for mips64-android. It will be needed when mips64 is supported.
........
* x86_64-android requires sigreturn for proper signal handling.
........
* Register external gas assembler for aarch64-android and x86_64-android.
........
* Enabled compilation of the cpu unit for arm-android and x86_64-android.
........
* ucnv_open() must be called with some SSE exception masked on x86_64-android.
* Call u_init() during initialization.
........
* Create the ".note.gnu.build-id" section for android. It fixes debugging of shared libs in Android Studio.
........
* android: Removed cwstring from the uses clause of the unix unit. Use cwstring indirectly. It allows to avoid using cwstring if needed.
........
* ICU v3.8 on Android 1.5-2.1 is buggy and can't be unloaded properly.
........
* Fixed locale detection on new Android versions.
........
* Fixed obtaining a time zone information for 64-bit android.
........
* Since Android 8 the net.dnsX properties can't be read. Use Google Public DNS servers.

........
* android: Use libc for sockets since the "accept" syscall is blocked by SECCOMP, but the "accept4" alternative is not available on old Android versions (2.3 and older). 
........
* android: Regenerated syscalls.
........
* android: Disabled usage of the "pselect6" and "ppoll" syscalls for arm-android. These syscalls are not available on old Android versions (2.3 or older).
........

git-svn-id: branches/fixes_3_2@40540 -
2018-12-13 18:08:42 +00:00
pierre
36f9ce1cb2 Merge of trunk commits 39983,39986,40109
------------------------------------------------------------------------
r39983 | florian | 2018-10-18 20:28:03 +0200 (Thu, 18 Oct 2018) | 3 lines

* 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
------------------------------------------------------------------------
------------------------------------------------------------------------
r39986 | pierre | 2018-10-18 22:21:54 +0200 (Thu, 18 Oct 2018) | 1 line

 Fix for bug report #34380
------------------------------------------------------------------------
------------------------------------------------------------------------
r40109 | pierre | 2018-10-31 15:43:18 +0100 (Wed, 31 Oct 2018) | 1 line

 Use correct field for sl_absolutetype or sl_typeconv ppropaccesslistitem type (revealed by compilation with -CriotR)
------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@40482 -
2018-12-06 22:17: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
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
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
marco
f0042a4719 * vcmppd hardcoded primitives like vcmpeqpd.
* required increasing maxinfolen to 9 

git-svn-id: trunk@38404 -
2018-03-03 23:32:54 +00:00
marco
f21a141144 * mantis #32001, add 32 vcmpps variants.
git-svn-id: trunk@38403 -
2018-03-03 23:10:03 +00:00
nickysn
2cee948b72 + support segment overrides in inline asm references to local variables or parameters on x86
git-svn-id: trunk@38392 -
2018-03-01 17:59:57 +00:00
nickysn
df6a870873 * print an "invalid segment override expression" error message in case a segment
override uses an invalid (non-segment) register in the x86 inline asm reader
  (both for intel and att syntax)

git-svn-id: trunk@38391 -
2018-03-01 15:34:16 +00:00