Commit Graph

20477 Commits

Author SHA1 Message Date
florian
0caccdc238 * fix range check error
git-svn-id: trunk@36945 -
2017-08-20 15:21:48 +00:00
florian
b948a0738c * unified internalerror
* cosmetics

git-svn-id: trunk@36944 -
2017-08-20 15:21:46 +00:00
svenbarth
324e63b5d3 * a bit of language consolidation: "type helper" can now be used for records and classes as well
git-svn-id: trunk@36938 -
2017-08-18 15:29:19 +00:00
svenbarth
b6a3d66224 * adjust check for non-static class methods in class helpers in so far that only classes allow such methods (interfaces and objects would not either)
git-svn-id: trunk@36937 -
2017-08-18 15:27:47 +00:00
svenbarth
eef06e9bc6 * move the check whether a subclassed type helper extends a suitable subtype of the parent's extended type to a nested procedure
git-svn-id: trunk@36936 -
2017-08-18 15:25:53 +00:00
nickysn
b41762d1bf + perform the optimization in tmoddivnode.firstoptimize also for div/mod by
negative powers of 2 as well

git-svn-id: trunk@36930 -
2017-08-17 15:56:20 +00:00
nickysn
910e1eccc8 * set the bit mask, used for modulus by power-of-2 in a way, that is independent
from the sign of the divisor (so that negative powers of 2 can be supported as
  well in the future)

git-svn-id: trunk@36928 -
2017-08-17 15:19:37 +00:00
pierre
0041450edc Regenerated with -Tandroid for mipsel not mipseb
git-svn-id: trunk@36896 -
2017-08-14 10:48:27 +00:00
pierre
edfcb6558b -Tandroid is for mipsel not mipseb
git-svn-id: trunk@36895 -
2017-08-14 10:47:14 +00:00
Károly Balogh
addc3a2f94 m68k-palmos: fixed the syscall generation, and improved it to support the dispatch-selector-in-reg-D2 traps
git-svn-id: trunk@36892 -
2017-08-13 01:19:19 +00:00
Károly Balogh
8a71a70d3c m68k-palmos: sketched up some entirely untested syscall support, but it's probably close to what we need
git-svn-id: trunk@36891 -
2017-08-12 21:45:01 +00:00
svenbarth
f9c1d0c0db - TPPCMPWAssembler: remove support for 8-Byte alignment again as that shouldn't be necessary anymore with the alignment fixes in i_macos.pas; so it's better we get an internal error again if someone tries to use it
git-svn-id: trunk@36887 -
2017-08-12 15:42:04 +00:00
svenbarth
01046b8a17 * more sensible values for the alignments (based on the powerpc-darwin ones)
git-svn-id: trunk@36886 -
2017-08-12 15:35:24 +00:00
svenbarth
3fd68bf59c * agppcmpw.getopstr: always access RTOC symbols as [TC](RTOC) instead of only (RTOC)
git-svn-id: trunk@36885 -
2017-08-12 15:25:00 +00:00
svenbarth
4c71fb9e28 * TPPCMPWAssembler: small improvement for the debug output of writeexternal()
git-svn-id: trunk@36884 -
2017-08-12 14:25:00 +00:00
svenbarth
86e50d4a26 * TPPCMPWAssembler: also write import statements for AB_EXTERNAL_INDIRECT symbols
git-svn-id: trunk@36883 -
2017-08-12 14:23:16 +00:00
Károly Balogh
8830ee0a3b powerpc: assume that the MPW assembler supports 8 byte alignments. (based on some inconclusive internet search it should, but this is not confirmed)
git-svn-id: trunk@36881 -
2017-08-12 12:19:52 +00:00
Károly Balogh
e3ffeed1b2 m68k: removed traces of the never obsolete/ancient openbsd-m68k and never existed freebsd-m68k ports
git-svn-id: trunk@36877 -
2017-08-12 08:52:44 +00:00
svenbarth
0b02dab684 + new Delphi-compatible intrinsic GetTypeKind() which returns the TTypeKind of a type as a constant value (and thus can be optimized away in If- and Case-statements)
+ added test

git-svn-id: trunk@36875 -
2017-08-11 22:12:53 +00:00
svenbarth
7e692fac2b + new utility function get_typekind() to retrieve the TTypeKind value of a def
git-svn-id: trunk@36874 -
2017-08-11 22:02:22 +00:00
svenbarth
2095cca98f * ensure that source info is set correctly on Win64 by including i_win for all Windows targets (this is especially important when cross compiling (e.g. Java) as otherwise the utilities won't be found correctly)
git-svn-id: trunk@36871 -
2017-08-11 20:27:43 +00:00
pierre
6a416a6aa1 use --32/--64 for Darwin GNU assembler calls
git-svn-id: trunk@36870 -
2017-08-11 16:04:40 +00:00
Károly Balogh
a1c879d093 * some tabs-to-spaces and whitespace cleanup. no functional changes
git-svn-id: trunk@36868 -
2017-08-10 11:10:45 +00:00
nickysn
3c96090d3c + optimized avr code generation for shr by shiftcount=size*8-1 and sar by
shiftcount>=size*8-1. This is commonly used by code, that extracts the sign
  bit and improves code generation for signed division by power-of-2 as well.
  This also fixes building avr-embedded (mantis #32241), which was caused by an
  infinite loop in the register allocator, when regvars are enabled, due to too
  much register pressure, when building charset.pp after r36842.

git-svn-id: trunk@36867 -
2017-08-09 15:53:06 +00:00
nickysn
1476b5168d + added F_PL and F_MI to TResFlags for avr. This allows generating the BRPL and
BRMI instructions via a_jmp_cond

git-svn-id: trunk@36866 -
2017-08-09 15:14:33 +00:00
pierre
225c4f33e9 Use old -m68020 architecture option for m68k-palmos assembler (version 2.14 from PRC tools)
git-svn-id: trunk@36865 -
2017-08-09 13:37:17 +00:00
pierre
4c7b73d48d Adjust string size for CpuTxt and Targets string arrays
git-svn-id: trunk@36861 -
2017-08-08 18:17:20 +00:00
pierre
90e846a470 Obsolete system_i386_qnx and remove last references to system_i386_qnx
git-svn-id: trunk@36860 -
2017-08-08 18:00:02 +00:00
pierre
b74c805c49 Fix singlezipinstall for systems that set NoNativeBinaries to 1
git-svn-id: trunk@36857 -
2017-08-07 16:14:09 +00:00
pierre
527d2dea4f Set EXEEXT to SRCEXEEXT if NoNativeBinaries is set (allow snapshot of jvm-java on linux)
git-svn-id: trunk@36856 -
2017-08-07 10:35:07 +00:00
pierre
c98e9b230f Some watcom assembler wasm improvements
git-svn-id: trunk@36850 -
2017-08-04 21:15:10 +00:00
nickysn
ee79ff3635 * improved the optimization of signed modulus by power-of-2, so it uses less
operations. Previously generated code:
    sign:=sar(left,sizeof(left)*8-1);
    result:=((((left xor sign)-sign) and right) xor sign)-sign;
  New code:
    mask:=sar(left,sizeof(left)*8-1) and ((1 shl power)-1);
    result:=((left+mask) and right)-mask;

git-svn-id: trunk@36847 -
2017-08-04 16:20:50 +00:00
nickysn
a1928859b3 * in the optimization of signed division by power-of-2 constant in
tmoddivnode.firstoptimize, replaced tordconstnode(right).value-1 with
  tcgint((qword(1) shl power)-1), so that it becomes independent from the sign
  of right, so that in the future, we can also apply this optimization for
  negative power-of-2 divisors as well (only a unary minus node would have to
  be inserted in this case).

git-svn-id: trunk@36845 -
2017-08-04 15:50:33 +00:00
nickysn
277026ffd4 * perform the high level signed division by power-of-2 optimization for all
int types, larger than the ALU of the CPU, instead of just for 64-bit ints on
  32-bit or smaller CPUs.

git-svn-id: trunk@36842 -
2017-08-04 14:34:42 +00:00
nickysn
b9fdca6f49 + better high level optimization for 64-bit signed division by 2 on 32-bit and
lower CPUs. Instead of the (sar(temp,sizeof(temp)*8-1) and 1) expression, use
  the equivalent, but simpler (temp shr (sizeof(temp)*8-1))

git-svn-id: trunk@36839 -
2017-08-04 13:51:51 +00:00
pierre
9fb2652433 List possible CPU in alphabetical order
git-svn-id: trunk@36829 -
2017-08-04 11:14:12 +00:00
pierre
4d29122097 msgtxt.inc and msgidx.inc regenerated after: Remove obsolete -Tsunos help line, it is not accpeted by the compiler anymore
git-svn-id: trunk@36828 -
2017-08-04 09:38:59 +00:00
pierre
8fba611697 Remove obsolete -Tsunos help line, it is not accpeted by the compiler anymore
git-svn-id: trunk@36827 -
2017-08-04 09:38:08 +00:00
pierre
708b9e162c Add obsolete comment in ppudump output for obsoleted cpu and systems
git-svn-id: trunk@36824 -
2017-08-04 09:07:01 +00:00
pierre
3d5be0fd2d Add obsolete prefix to cpu_vm and system_vm_embedded, vm(vis) specfic code has been removed in rev 30836 dated 2015-05-09
git-svn-id: trunk@36823 -
2017-08-04 09:02:50 +00:00
pierre
f281ee339e Add obsolete prefix to cpu_ia64, system_ia64_win64 and system_ia64_embedded, ia64 specfic code has been removed in rev 30836 dated 2015-05-09
git-svn-id: trunk@36822 -
2017-08-04 08:54:34 +00:00
pierre
cf5c6d11ac Add obsolete prefix to cpu_alpha, system_alpha_linux and system_alpha_embedded, alpha specfic code has been removed in rev 30836 dated 2015-05-09
git-svn-id: trunk@36821 -
2017-08-04 08:29:02 +00:00
nickysn
ee4c82f5f5 * in the high level optimization of signed division by power-of-2 constant, set
shiftval to left.resultdef.size*8-1, instead of 31, so that it shifts by 15 or
  7 on 16-bit and 8-bit CPUs, when the integer type is small.

git-svn-id: trunk@36820 -
2017-08-03 16:02:27 +00:00
nickysn
19087d04da * replace several emit_const_reg calls that generate SHR or SAR instructions
with calls to cg.a_op_const_reg in the x86 div code generator, so that the
  same code can be used in the future for i8086 as well (SHR and SAR by
  constants other than 1 are 186+, so on 8086 they have to go through the CL
  register, which is handled correctly in cg.a_op_const_reg)

git-svn-id: trunk@36815 -
2017-07-31 16:02:52 +00:00
florian
f4718c0969 * made nop handling generic for sparc, so it is used by sparc64 as well
git-svn-id: trunk@36814 -
2017-07-29 20:06:14 +00:00
svenbarth
e76b1b2959 * use unique internalerror instead of copying that from ncgmem (though it should never happen that both occur at once in a AVR compiler)
git-svn-id: trunk@36809 -
2017-07-28 15:54:03 +00:00
nickysn
b92b0eac83 * also improve the code, generated for signed division by 2 on i8086, when
optimize cpu target is 486+, by replacing the sequence
    sar reg, 15
    and reg, 1
  with:
    shr reg, 15

git-svn-id: trunk@36807 -
2017-07-28 15:38:40 +00:00
Károly Balogh
071b588da2 netbsd/m68k: tweaks, so it works at least in my test-env with NetBSD/amiga 7.1
git-svn-id: trunk@36801 -
2017-07-27 19:00:37 +00:00
nickysn
9e8cc127b0 * improved the code, generated for signed division by 2 on i386 and x86_64 by
replacing the sequence
    sar reg, 31 (or 63)
    and reg, 1
  with:
    shr reg, 31 (or 63)

git-svn-id: trunk@36800 -
2017-07-27 16:02:30 +00:00
nickysn
bb7cd4866d * corrected comment in x86 division code - it said "signed", when it actually meant "negative"
git-svn-id: trunk@36799 -
2017-07-27 15:04:56 +00:00