Commit Graph

21475 Commits

Author SHA1 Message Date
florian
cda78c398f + AVR: cputype cpu_avrtiny
git-svn-id: trunk@43984 -
(cherry picked from commit aaa6ae5770)
2021-10-24 12:40:37 +02:00
florian
3328f991c7 * AVR: fixes pushing and handling of stack passed parameters
git-svn-id: trunk@43983 -
(cherry picked from commit 96a4cda03b)
2021-10-24 12:40:37 +02:00
florian
fbb3fe56a9 * AVR: fixed TDwarfAsmCFILowLevel.generate_initial_instructions
git-svn-id: trunk@43982 -
(cherry picked from commit 6f434b6751)
2021-10-24 12:40:37 +02:00
florian
201a89504e * patch by Christo Crause: reg. allocation information if non-volatile registers
are used for parameter passing as it is might happen on avr, resolves #36079

git-svn-id: trunk@43390 -
(cherry picked from commit fabe4cc067)

# Conflicts:
#	.gitattributes
2021-10-24 12:40:37 +02:00
florian
b04f398d27 * avr: help the compiler with constant loading to avoid ie 200309041
git-svn-id: trunk@43350 -
(cherry picked from commit 701848889e)
2021-10-24 12:40:37 +02:00
florian
3b5dfbf79c * avr: more precise execution weigth for shift loops
git-svn-id: trunk@43349 -
(cherry picked from commit e8a48be3bc)
2021-10-24 12:40:37 +02:00
florian
b241fec17b * avr directly encodes constant shifts of 64 bit values
git-svn-id: trunk@43348 -
(cherry picked from commit f61207f1cc)
2021-10-24 12:40:37 +02:00
florian
63375effda * patch by Christo Crause: fix for r43136
git-svn-id: trunk@43169 -
(cherry picked from commit 5fc12500f2)
2021-10-24 12:40:36 +02:00
florian
8e68ea69cb * (modified/re-formatted) patch by Christo Crause: AVR: Optimizing code generation for shift with compile time constant
git-svn-id: trunk@43136 -
(cherry picked from commit dd2d1bf68b)
2021-10-24 12:40:36 +02:00
florian
bf85e51962 * AVR: patch by Christo Crause: fixes tcgavr.g_concatcopy for data with size>255, resolves #36066
git-svn-id: trunk@42977 -
(cherry picked from commit 4e93a9a6c7)
2021-10-24 12:40:36 +02:00
florian
97b0bda68d * fix tcgavr.g_flags2reg for sizes > 1 byte
git-svn-id: trunk@42938 -
(cherry picked from commit 9e5cbce6be)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
d14e3e96a7 - Fix bug in software overflow checking for longint's.
- AVR: Fix overflow checking for HW multiplications

git-svn-id: trunk@42531 -
(cherry picked from commit 1b698d319f)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
0c4d299514 AVR: Add support for using nostackframe in interrupt routines.
git-svn-id: trunk@42519 -
(cherry picked from commit f72342ed0e)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
49ac4e0ed3 AVR: Add optimizations for sign testing, and a better Abs() implementation.
git-svn-id: trunk@42510 -
(cherry picked from commit 91016c97a4)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
e03c4eb34f - Applied patch by Christo Crause from #33914
git-svn-id: trunk@42493 -
(cherry picked from commit ff3372567f)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
464aeb266e - Fix overflow checking for multiplication operations on AVR.
git-svn-id: trunk@42492 -
(cherry picked from commit 030cf78ac5)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
f1a9930550 avr: Fixed some inconsistencies.
git-svn-id: trunk@42204 -
(cherry picked from commit 0d97dc7965)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
4996d129e5 - Add mov optimization for STS instruction.
git-svn-id: trunk@42163 -
(cherry picked from commit aa4961d06e)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
3916bcba38 Check if the current register was the last in the cgpara, to avoid running over the last register allocated.
git-svn-id: trunk@42159 -
(cherry picked from commit 5bdc635f50)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
18ba7fc23a Generalize skip instruction optimization for both sbix and sbrx.
git-svn-id: trunk@42154 -
(cherry picked from commit c867d2b7f6)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
d993e1b9c3 avr: Add peephole optimization for in+sbr* bit test sequence.
git-svn-id: trunk@41962 -
(cherry picked from commit 3ad450c636)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
f5e34990ae - Adds intrinsics to save/restore SREG when disabling interrupts.
- Adds nostackframe to stack frame investigation stubs.

git-svn-id: trunk@41898 -
(cherry picked from commit 12879adc2f)
2021-10-24 12:40:36 +02:00
florian
3d3e828151 * properly allocate parameter registers for constants on avr, resolves #33932
git-svn-id: trunk@40848 -
(cherry picked from commit 8fceba4493)
2021-10-24 12:40:36 +02:00
florian
7ac474341a * patch (slighly modified) by Christo Crause to write 16 bit registers on avr in hi/lo order, resolves #34721
git-svn-id: trunk@40678 -
(cherry picked from commit 917de001d6)
2021-10-24 12:40:36 +02:00
florian
a5d24ec763 * max_operands needs only to be 2 on avr
git-svn-id: trunk@40197 -
(cherry picked from commit 42e54c1ad5)
2021-10-24 12:40:36 +02:00
Yuriy Sydorov
eb69bbf4f1 * x86: Fixed update of used registers in the CMOV optimizations.
This fixes a bug reported by Martin Frb in fpc-devel which is triggered
  by the recently provided test code in FPC 3.2.2 x86_64, but is hidden
  in trunk by other pipeline peephole optimizations.

(cherry picked from commit e9d318e7e2)
2021-10-05 22:09:39 +03:00
flyingsheep
b8b1aeb4e0 * Fix for issue #39379 by bart broersma
(cherry picked from commit 6c6cb13a5e)
2021-09-30 19:41:44 +00:00
Yuriy Sydorov
ebc55c0f4e * If in a move instruction "MOV reg1,reg2" one of the registers must be
spilled, but reg1 and reg2 are coalesced, then this is a no-op
  instruction and no spilling is needed.

(cherry picked from commit b43ee41090)
2021-09-09 22:23:28 +02:00
Yuriy Sydorov
0ca0cd9d0d * Remove register allocations of coalesced registers if the alias
register is spilled.

(cherry picked from commit b96057adeb)
2021-09-07 21:43:16 +02:00
Yuriy Sydorov
0b5951cf22 * Patch by J. Gareth "Kit" Moreton (issue #39343). Added missing allocation
of flags in tx86typeconvnode.second_int_to_bool and in generic
  tcgtypeconvnode.second_int_to_bool. This fixes random failures of the
  tcnvint1 test and some other tests when compiled with -O2.

(cherry picked from commit 940ac567a5)
2021-09-07 21:37:19 +02:00
florian
58dacbd625 * generate a def. file only if really necessary
(cherry picked from commit d3615788a8)
2021-08-29 21:40:31 +02:00
Jonas Maebe
b7b9c5d94c * fix false possitive tconstexprint range errors after r41441 (mantis #35144)
git-svn-id: trunk@41469 -
(cherry picked from commit eb71a30933)
2021-08-27 10:02:15 +02:00
Pierre Muller
b2ce589dae Delete binary file added by error 2021-08-27 09:11:05 +02:00
Jonas Maebe
197f5cbec5 * 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 -
(cherry picked from commit 07bd4ba517)

With local change to fix compilation for x86_64 CPU
2021-08-26 23:28:28 +02:00
florian
9a7a015109 * properly handle result size for avx/sse based frac function, resolves #38248
git-svn-id: trunk@47839 -
(cherry picked from commit b28aa5c684)
2021-08-24 23:26:25 +02:00
florian
4e5fb2c6a8 * might_have_sideeffects gets flags: if mhs_exceptions is passed, nodes which might cause an exception are considered as having a side effect
git-svn-id: branches/laksen/riscv_new@39483 -
(cherry picked from commit 32a58ba7d1)
2021-08-24 10:43:24 +02:00
florian
f6dee4c3e0 * process fma intrinsic parameters in an order which takes care of multiple x87 stack parameters, resolves #38295
(cherry picked from commit 9592c033e5)

# Conflicts:
#	.gitattributes
2021-08-24 00:14:05 +02:00
florian
e683e6e912 * fix spilling of (v)min/max/s/ps/d operations
git-svn-id: trunk@48856 -
(cherry picked from commit 90710d055b)
2021-08-24 00:08:44 +02:00
florian
7a77369d5e * another loop counter copying fix
git-svn-id: trunk@49028 -
(cherry picked from commit a32a870f33)
2021-08-24 00:06:47 +02:00
florian
f7f0d53604 * prefetch instructions read only the operand
git-svn-id: trunk@49089 -
(cherry picked from commit aa1a68000b)
2021-08-24 00:06:20 +02:00
florian
7ceb3854c5 * AVR: fixed TCpuAsmOptimizer.RegLoadedWithNewValue
git-svn-id: trunk@49126 -
(cherry picked from commit 05cf47f995)
2021-08-24 00:01:42 +02:00
florian
26f200b0ff * even if currency is handled by torddef, it is a real number, so using / is perfectly right, resolves #38718
(cherry picked from commit 09628e56cb)

# Conflicts:
#	.gitattributes
2021-08-24 00:00:50 +02:00
florian
30c6cc295c * newer linux distros might have powerpc64 libraries in /usr/lib or /lib
git-svn-id: trunk@49182 -
(cherry picked from commit 0a99028128)
2021-08-24 00:00:01 +02:00
florian
078a6c31c9 * explicitly reset successor if noreturn is set
git-svn-id: trunk@49487 -
(cherry picked from commit a988c0fab1)
2021-08-23 23:53:22 +02:00
florian
9f2ab5eb2f + new switches -DD and DT which allow to pass an arbitrary string which is used by %DATE%/%TIME%
git-svn-id: trunk@47132 -
(cherry picked from commit 9ea52b8578)

# Conflicts:
#	compiler/msgidx.inc
#	compiler/msgtxt.inc
2021-08-21 21:26:25 +02:00
florian
7fca3c9b1f * check if git executable really exists
(cherry picked from commit a77f5221f3)
2021-08-21 20:57:24 +02:00
Don
5e06e89678 Allow custom definition of GIT.
(cherry picked from commit f6636c9c1c)
2021-08-21 20:55:44 +02:00
florian
d1f11bb292 * always use $(GIT) to call git
(cherry picked from commit a4878d892c)

# Conflicts:
#	compiler/Makefile
2021-08-21 20:55:38 +02:00
florian
7ae51087e5 * compiler Makefile checks if SOURCE_SOURCE_DATE_EPOCH_DATE is set or if git is used, in either case the former or the latter are used for the build date reported by the compiler
git-svn-id: trunk@47133 -
(cherry picked from commit 201281ae2a)
2021-08-21 20:46:54 +02:00
florian
055283f9cb * set register size correctly for popcnt(<byte>), resolves #37400
(cherry picked from commit ed158f1e52)

# Conflicts:
#	.gitattributes
2021-08-21 16:36:43 +02:00