Commit Graph

374 Commits

Author SHA1 Message Date
Pierre Muller
219fedfea6 Restore start section at end of assembler block inside z80 asm reader 2023-05-15 19:51:11 +02:00
Sven/Sarah Barth
088c746d45 * reset written source lines once a section is encountered 2022-05-26 21:43:35 +02:00
florian
27fb9086aa * cleanup: cs_opt_loopunroll is a generic optimization for a long time already 2022-03-08 23:03:18 +01:00
Karoly Balogh
cb959c2e6f * z80-amstradcpc: add some initial files for the target (mostly just the clone of ZX Spectrum files for now) 2022-03-06 22:02:27 +01:00
Sven/Sarah Barth
2e70bd7dcb * change cgsize2subreg and reg_cgsize on Z80 to behave more like they do on AVR; this fixes compilation of Z80 now that the array and string length fields are indeed of type SizeSInt instead of OSSInt 2022-01-21 07:40:22 +01:00
florian
ff3acfb8cd * cleanup of 2.7.0 defines 2021-10-31 13:20:28 +01:00
florian
6cb24a3929 * itcpugas unit for Z80 providing gas_regname to fix compilation with -dDEBUG_NODE_XML 2021-10-13 23:08:32 +02:00
Nikolay Nikolov
890b899842 + support the <= and >= operators for smallsets on the Z80 2021-10-03 18:33:00 +03:00
Nikolay Nikolov
b00c0e44a5 + support equality comparison of smallsets on the Z80 2021-10-03 18:16:45 +03:00
Yuriy Sydorov
122ed4b76a * Support for sleb128 and uleb128 constants in the NASM writer.
* Added sleb128tostr() and uleb128tostr() methods to TExternalAssembler.
* Use these methods in assembler writers instead of code duplication.
2021-08-16 00:40:34 +03:00
pierre
0cc91a50c7 Fix z80 compiler failure after change to ConcatConstSymbol in commit #47668
git-svn-id: trunk@47675 -
2020-12-03 11:05:36 +00:00
pierre
48271b880c Add {$i fpcdefs.inc} to units that do not have that include
git-svn-id: trunk@47599 -
2020-11-26 10:34:02 +00:00
florian
637976e83f * patch by Marģers to unify internal error numbers, resolves #37888
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
Károly Balogh
aa745e0319 z80: re-enabled af_smartlink_sections for vasm which is required for the vasm + vlink combo, partially reverting r46916
git-svn-id: trunk@46979 -
2020-09-27 22:55:59 +00:00
Károly Balogh
7c195d2062 z80: cleaned up some tabs vs. spaces indentation mess in the vasm writer. no functional change.
git-svn-id: trunk@46978 -
2020-09-27 22:52:06 +00:00
pierre
74e83e9d8b Disable af_smartlink_sections option for Z80 vasm and z80asm assemblers, as it leads to errors
git-svn-id: trunk@46916 -
2020-09-22 15:44:15 +00:00
yury
6e777d8967 * ait_comment,ait_regalloc,ait_tempalloc,ait_varloc instructions produce only comments in the external assembler output. Moved handling of these instructions to TExternalAssembler.WriteComments().
This eliminates code duplication and improves maintainability.

git-svn-id: trunk@46550 -
2020-08-22 19:53:39 +00:00
florian
28f25b2df0 * reworked usage of tcgnotnode.handle_locjump
git-svn-id: trunk@46275 -
2020-08-05 21:15:32 +00:00
florian
1d3ed354de * patch by J. Gareth Moreton: unifies internalerrors, resolves #37471
git-svn-id: trunk@46234 -
2020-08-04 20:51:52 +00:00
Jonas Maebe
eb7ba1690e * mark all external assemblers using an LLVM tool using af_llvm
+ added support for constructing target triplets
  * pass "-target triplet" when using an LLVM assembler
   o removed no longer needed $DARWINVERSION and $ARCH parameters
  * consistently use as_clang_gas when clang is used to assembler GAS-style
    assembly, and rename as_llcm_clang to as_clang_llvm (for consistency)
  * support pipe assembling when using clang on *nix in all cases

git-svn-id: trunk@45807 -
2020-07-19 14:30:35 +00:00
pierre
dfdfbf896d Fix several warnings about uninitialized local variables
git-svn-id: trunk@45787 -
2020-07-15 08:59:59 +00:00
Károly Balogh
cc23515927 z80: vasm doesn't support the JRJP pseudo instruction, so change it to JP during write
git-svn-id: trunk@45663 -
2020-06-20 16:51:15 +00:00
nickysn
09bd361b48 + support the OFFSET directive in the Z80 inline assembler reader
git-svn-id: trunk@45618 -
2020-06-07 22:17:10 +00:00
nickysn
c90f78488c + added the 'AREA' directive support to the Z80 inline assembler, that allows
you to define custom sections

git-svn-id: trunk@45617 -
2020-06-07 20:47:37 +00:00
svenbarth
c793f42271 + add intrinsics for Z80 port IN/OUT
git-svn-id: trunk@45607 -
2020-06-07 12:24:59 +00:00
svenbarth
921e73ab0c + add compiler support for the Z80 MSX-DOS target
git-svn-id: trunk@45596 -
2020-06-06 17:16:20 +00:00
svenbarth
b2d6c36e70 + add support for DEFB and DEFW directives to the internal assembler reader
git-svn-id: trunk@45591 -
2020-06-06 17:15:53 +00:00
nickysn
996ab2feba * renamed some REL sections to follow a similar naming convention
git-svn-id: trunk@45566 -
2020-06-02 22:44:57 +00:00
nickysn
d88da03e7d * z80: use the JRJP pseudo instruction to generate shorter code (it is
translated to JR wherever possible, otherwise to JP)

git-svn-id: trunk@45510 -
2020-05-26 19:52:27 +00:00
nickysn
c49213c561 + Z80: implemented the JRJP pseudo instruction in the Z80 internal asm writer
git-svn-id: trunk@45502 -
2020-05-25 22:40:41 +00:00
nickysn
195e7e0918 * translate jrjp to jp in the sdcc-sdasz80 asm writer
git-svn-id: trunk@45498 -
2020-05-25 16:29:31 +00:00
nickysn
f71b6f341b + added JRJP to various instruction lists
git-svn-id: trunk@45497 -
2020-05-25 16:12:06 +00:00
nickysn
c5d04d1a54 + Z80: added the JRJP pseudo instruction
git-svn-id: trunk@45496 -
2020-05-25 15:53:51 +00:00
nickysn
56632b720c + Z80: handle the flags register in TAoptBaseCpu.RegModifiedByInstruction
git-svn-id: trunk@45452 -
2020-05-20 21:21:26 +00:00
nickysn
88b6bbe6cc * compilation fixed after r45450
git-svn-id: trunk@45451 -
2020-05-20 21:02:46 +00:00
nickysn
cc47a49c81 + Z80: handle all instructions that modify registers, that are not an operand in TAoptBaseCpu.RegModifiedByInstruction
git-svn-id: trunk@45450 -
2020-05-20 20:57:59 +00:00
nickysn
2507c1ace6 * Reg1ReadDependsOnReg2 moved to TAoptBaseCpu
* use Reg1ReadDependsOnReg2 in TAoptBaseCpu.RegModifiedByInstruction to handle properly Z80 subregisters

git-svn-id: trunk@45449 -
2020-05-20 20:20:10 +00:00
nickysn
edcc14a5ce * Z80: JR can be both conditional and uncoditional jump, just like JP
git-svn-id: trunk@45411 -
2020-05-17 23:38:23 +00:00
nickysn
13028db5a4 - z80: disable regvars, because they don't work
git-svn-id: trunk@45402 -
2020-05-17 14:38:57 +00:00
nickysn
63af4e173d + z80: handle all instructions in TCpuAsmOptimizer.RegLoadedWithNewValue
git-svn-id: trunk@45391 -
2020-05-16 20:33:44 +00:00
nickysn
5502d6cc58 + Z80: report the flags usage for all the remaining instructions in TCpuAsmOptimizer.RegLoadedWithNewValue
git-svn-id: trunk@45390 -
2020-05-16 19:58:37 +00:00
nickysn
f0edd62b88 + Z80: report flags register information in TCpuAsmOptimizer.RegLoadedWithNewValue for 16-bit ADD,ADC,SBC,INC and DEC
git-svn-id: trunk@45373 -
2020-05-16 00:03:54 +00:00
nickysn
37b607143a + handle the flags register bits for many Z80 instructions in TCpuAsmOptimizer.RegLoadedWithNewValue
git-svn-id: trunk@45366 -
2020-05-14 22:44:48 +00:00
nickysn
4beb4bf8b2 + Z80: support the flags subregisters in the registers_interfere function
git-svn-id: trunk@45347 -
2020-05-12 01:58:10 +00:00
nickysn
c6c834949f + Z80: support all the flags subregisters in super_registers_equal
git-svn-id: trunk@45346 -
2020-05-12 01:47:58 +00:00
nickysn
fe12026959 + support the LD instruction in TCpuAsmOptimizer.RegLoadedWithNewValue
git-svn-id: trunk@45345 -
2020-05-11 23:55:23 +00:00
nickysn
bb4d7a7a50 + Z80: implemented TCpuAsmOptimizer.InstructionLoadsFromReg
git-svn-id: trunk@45344 -
2020-05-11 22:24:20 +00:00
nickysn
4abc498f2f + added the Z80 individual flag bits as subregisters
git-svn-id: trunk@45342 -
2020-05-11 19:17:31 +00:00
nickysn
4263ff44c1 + Z80: added a registers_interfere helper function
git-svn-id: trunk@45338 -
2020-05-11 15:29:42 +00:00
nickysn
5947adcd7b + added a correct implementation of TAOptBase.SuperRegistersEqual for the Z80
git-svn-id: trunk@45337 -
2020-05-11 14:21:26 +00:00