Commit Graph

55570 Commits

Author SHA1 Message Date
florian
bee41253bd + AVR: initial support for the avrtiny architecture
git-svn-id: trunk@43987 -
(cherry picked from commit 2d9cdab264)
2021-10-24 12:40:37 +02:00
florian
150fac54cb * changes shift parameter of shift helpers into ALUUInt, as there is an "and" used anyways, this does not change semantics but reduces register pressure on 8 bit targets
git-svn-id: trunk@42200 -
(cherry picked from commit f92b8d1681)
2021-10-24 12:40:37 +02:00
florian
4a73c31c82 * AVR: tcgavr.normalize_ref must always load the reference into tmpreg
git-svn-id: trunk@43986 -
(cherry picked from commit f629fa1bb9)
2021-10-24 12:40:37 +02:00
florian
a9bbcccb5d + AVR: GetDefaultZeroReg and GetDefaultTmpReg
git-svn-id: trunk@43985 -
(cherry picked from commit 26eae3672b)

# Conflicts:
#	compiler/avr/cpubase.pas
2021-10-24 12:40:37 +02:00
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
647c5889de * simplified fpc_mul_qword so it compiles again on avr, fixes #36236 but does not solve the root of the problem
git-svn-id: trunk@43342 -
(cherry picked from commit 3b1903b430)
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
Jeppe Johansen
821a83f735 * Fix exitcode handling for avrsim target. Patch by Christo Crause
git-svn-id: trunk@42940 -
(cherry picked from commit 05c4f45596)
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
bca0d5774f - Adds a number of optimizations for 64bit integer operations on AVR. Patch from Christo Crause in issue #35691.
git-svn-id: trunk@42495 -
(cherry picked from commit 893507a5d6)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
8b02397b18 - Split division routines out into an include file.
- Reuse division routines for calculating both division and modulus.
- Add implementations of BsfByte and BsrByte that don't use a lookup table.

git-svn-id: trunk@42494 -
(cherry picked from commit 4b93eb64b3)

# Conflicts:
#	.gitattributes
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
2b92b97056 - Change syntax of sbiw operands to work around syntax in older binutils.
git-svn-id: trunk@42336 -
(cherry picked from commit 48a7c0989a)
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
a886e77b5e - Fix compilation on architectures without absolute call/jump instructions.
git-svn-id: trunk@42164 -
(cherry picked from commit ee7bc1d516)
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
8eb523e696 - Add assembler implementation of integer division, patch by Christo Crause. For now there's a division by zero check added.
- Fix setjmp/longjmp handling on 3 byte PC AVRs.

git-svn-id: trunk@42162 -
(cherry picked from commit dee0197890)
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
ebe4d4cf13 Fixed stack checking for embedded target. Based on work by Christo Crause
git-svn-id: trunk@42157 -
(cherry picked from commit 2f501be2a0)
2021-10-24 12:40:36 +02:00
Jeppe Johansen
915e48c675 Add assembler implementation of Move.
git-svn-id: trunk@42155 -
(cherry picked from commit 009c87156a)
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
Jonas Maebe
667938c6c9 * add missing unixutils -> baseunix dependency
git-svn-id: trunk@47302 -
(cherry picked from commit 24e188f0d2)
2021-10-09 21:13:32 +00: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
Sven/Sarah Barth
48c54afabb * patch by Sergey Larin to handle Native(U)Int conversions from/to variants, resolves #37339
git-svn-id: trunk@45797 -
(cherry picked from commit a57f3ba396)
2021-10-01 17:43:23 +02:00
flyingsheep
b8b1aeb4e0 * Fix for issue #39379 by bart broersma
(cherry picked from commit 6c6cb13a5e)
2021-09-30 19:41:44 +00:00
pierre
8a568acaa8 Use gdate/date -u option to get universal time for TEST_DATETIME variable
git-svn-id: trunk@49289 -
(cherry picked from commit 6f4617eeb3)
2021-09-30 10:16:19 -06:00
florian
083b7da54e * @PLT is needed for calls to link it properly with pic code
git-svn-id: trunk@46209 -


(cherry picked from commit b60ac4c2db)
2021-09-29 16:20:47 +00:00
pierre
5aea57b5fc * tests/Makefile.fpc: Add NATIVE_FPC=$(FPC) to tstunits rule make call.
* tests/Makefile: Regenerate.
  * tests/tstunits/Makefile.fpc: Pass FPCFPMAKE=$(NATIVE_FPC) to rtl and packages
    recompilation rules, to avoid truobles for cross-compilation.
  * tests/tstunits/Makefile: Regenerate.

git-svn-id: trunk@43019 -
(cherry picked from commit 0b2a6e5a74)
2021-09-27 20:03:20 +00:00
florian
35bcb99e6f + create directory for C objects if needed
git-svn-id: trunk@46788 -
(cherry picked from commit 323b3b5d2b)
2021-09-27 19:58:58 +00:00
pierre
1081f5aad7 + Add TEST_PARALLEL, adds -L option to DOTESTOPT
git-svn-id: trunk@40308 -
(cherry picked from commit 122fd55564)

Conflicts:
	tests/Makefile
2021-09-27 19:55:22 +00:00
pierre
c595135723 Add wposuffix to keep different logs for each pass when passes is > 1
git-svn-id: trunk@48800 -
(cherry picked from commit 63a3c25493)
2021-09-27 19:50:13 +00:00
florian
bef4d583da * support passing options to the emulator when using one for testing
git-svn-id: trunk@47604 -
(cherry picked from commit 9c77e4a899)
2021-09-27 19:49:38 +00:00
lacak
aadb08980b fcl-db: base: +TParam.AsByte (for Delphi compatibility)
git-svn-id: trunk@49603 -
(cherry picked from commit ab86ce7e62)
2021-09-27 21:03:20 +02:00