1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-20 11:24:26 +00:00
Commit Graph

3015 Commits

Author SHA1 Message Date
Sven Van de Velde
4bfb6d5d1d - Correct calculation of live ranges for exported procedures parameters, resulting in better ZP coalesce accuracy.
- Working on the coalesce benchmark tests (comparing the compiles of the same procedures with library functions and without library functions). WIP.
- Added documentation.
2023-12-06 18:39:52 +01:00
Sven Van de Velde
5e6622b2a8 Small test program to test parameters. 2023-12-05 16:23:22 +01:00
Sven Van de Velde
53a918025a Fine-tuned the verbose of the text and the weight of the equivalence classes allocation. 2023-12-05 14:12:39 +01:00
Sven Van de Velde
a4bbf1fd4f Fine-tuned the verbose of the weight of the symbols and the onlyZP flag. 2023-12-05 11:28:00 +01:00
Sven Van de Velde
59fd0e0703 CX16 library changes 2023-11-30 13:38:42 +01:00
Sven Van de Velde
5d86d93160 - Added vera constants
- Added fragment
2023-11-29 14:45:23 +01:00
Sven Van de Velde
5a5f3e1dee Merge remote-tracking branch 'origin/master-libraries' into master-libraries 2023-11-29 14:28:22 +01:00
Sven Van de Velde
fcd38d0a19 - Now compiling the eight queens example with conio asm library.
- Added proper return value handling for __varcall functions.
- Added many fixes concerning start functions.
- Optimized asm library examples.
- Added a return value asm library example.
2023-11-29 14:27:59 +01:00
Sven Van de Velde
07cb0ba6fa - Now compiling the eight queens example with conio asm library.
- Added proper return value handling for __varcall functions.
- Added many fixes concerning start functions.
- Optimized asm library examples.
- Added a return value asm library example.
2023-11-29 14:15:52 +01:00
Sven Van de Velde
4012887479 Merge branch 'master' into master-libraries 2023-11-27 15:47:50 +01:00
Sven Van de Velde
f252f4b56f Merge remote-tracking branch 'origin/master-libraries' into master-libraries 2023-11-27 15:36:04 +01:00
Sven Van de Velde
0883478470 - only call namespaced procedures when the library is import. For export, just call the procedure without the library prefix. (KickAsm does not support it). 2023-11-27 15:35:45 +01:00
Sven Van de Velde
77eb2f7bcb - only call namespaced procedures when the library is import. For export, just call the procedure without the library prefix. (KickAsm does not support it). 2023-11-27 15:35:30 +01:00
Sven Van de Velde
ca58df159b - only call namespaced procedures when the library is import. For export, just call the procedure without the library prefix. (KickAsm does not support it). 2023-11-27 09:36:57 +01:00
Sven Van de Velde
a182d78172 Merge remote-tracking branch 'origin/master-libraries' into master-libraries
# Conflicts:
#	src/test/kc/library/printf-library-1.c
2023-11-24 16:05:57 +01:00
Sven Van de Velde
f98424ed97 - First well improved version for exporting and importing .asm library functions.
- Full documentation in the new manual directory containing the kickc.md markup manual file.
- library folder containing a concrete example.
2023-11-24 16:05:02 +01:00
Sven Van de Velde
b794791cc6 - First well improved version for exporting and importing .asm library functions.
- Full documentation in the new manual directory containing the kickc.md markup manual file.
- library folder containing a concrete example.
2023-11-24 15:46:48 +01:00
Sven Van de Velde
818da3f995 - Ensure that for exported procedure parameters, there are no constant values calculated.
- Optimization of function to calculate exported procedure parameters.
2023-11-18 17:24:13 +01:00
Sven Van de Velde
bcd7a49f6a - Automated the startup init procedures of libraries. For example, conio needs to call the conio init procedure automatically. This procedure is automatically called from the programs that import the libraries, where their __start procedure calls the library __start procedure. To avoid name conflicts, the library start procedures are named __libraryname_start and are embedded into the library name space.
- Reworked the start procedure name for all classes, now the routine getStartProcedureName is called.
2023-11-18 11:45:10 +01:00
Sven Van de Velde
1209353803 - Successful export and import of conio.
- TODO: Create header file for import.
- TODO: Resolve coalesce of exported procedure parameters.
- TODO: Remove constant optimizations for exported procedure parameters.
2023-11-18 10:40:50 +01:00
Sven Van de Velde
de6dad44db - Started with the library end-user manual definition. 2023-11-05 19:37:14 +01:00
Sven Van de Velde
4bd878eb5d Rework of the KICKC manual in markdown for maintenance. 2023-11-05 19:08:29 +01:00
Sven Van de Velde
eb6324356a - Added #pragma asm_import(...)
- Renamed #pragma asm_library(...)
- Automated *.asm inclusion when generating assembler.
- Supports kickc source code libraries too.
  Procedures declared in the asm_import are considered to be
  part of an external library, so any definition of that procedure
  is ignored, and changed as an external __stackcall __library(...) declaration!
  Also considered inline procedures following this behaviour.
  This allows printf functions to call conio pre-compiled routines
  to be called in the assembler.
- Internals for Libraries working for conio.asm.
- Added a demo program demonstrating the asm_import.
- Lot's of minor fixes and additions, added a new AsmLibrary class
  and the handling of it in program.
- Added an AsmLibraries object
- Recompile the whole test cases and updated references for a good comparison. Changes should be cosmetic.
2023-11-05 19:06:41 +01:00
Sven Van de Velde
b0249af269 Internals for Libraries working for conio.asm.
Added a demo program. #pragma still todo!
2023-11-05 17:16:08 +01:00
Sven Van de Velde
1f0bddc768 Libraries 2023-10-27 15:31:51 +02:00
Sven Van de Velde
1025aa5b00 - Implementation of a new #pragma library(name) in parser and statement sequence generation.
- Added at specific locations different compilation logic when a library is created.
- Added a .namespace library { } which encapsulates the whole library asm output.
- Added 2 new classes for .namespace creation in the Asm generation logic.
- Added as part of the program the asmLibrary, which contains the library name set through the #pragma.
2023-10-27 13:19:27 +02:00
Jesper Balman Gravgaard
ff29404f24
Merge branch '828-update-to-kickass-5-25' into 'master'
Resolve "Update to KickAss 5.25"

Closes #828

See merge request camelot/kickc!51
2023-09-03 12:52:41 +00:00
jespergravgaard
cec787e91b Upgraded to KickAss 5.25 2023-09-03 14:44:43 +02:00
Jesper Balman Gravgaard
c36900a219 Merge branch '827-vice-x64sc-emulator-will-not-start-properly-on-windows' into 'master'
Resolve "Vice x64sc emulator will not start properly on Windows"

Closes #827

See merge request camelot/kickc!50
2023-08-27 17:42:18 +00:00
Jesper Gravgaard
6c8bab90c6 Fixed #827 problem with starting Vice64 on Windows by using ProcessBuilder. 2023-08-27 19:33:52 +02:00
Jesper Balman Gravgaard
f759c5c9c1 Merge branch '815-procedure-compilation' into 'master'
More procedure compilation

Closes #815

See merge request camelot/kickc!44
2023-05-21 17:24:27 +00:00
jespergravgaard
2ee4e5c14a main merged 2023-05-21 19:16:51 +02:00
jespergravgaard
a20fd82d2d Merge branch 'master' into 815-procedure-compilation
# Conflicts:
#	src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java
#	src/main/java/dk/camelot64/kickc/passes/Pass4CodeGeneration.java
#	src/test/ref/printf-17.log
#	src/test/ref/printf-18.log
#	src/test/ref/printf-19.log
2023-05-21 19:01:30 +02:00
jespergravgaard
0e3f56ead9 minor changes 2023-05-21 17:47:00 +02:00
jespergravgaard
ce28c50d34 updated tests 2023-05-19 11:06:44 +02:00
Jesper Balman Gravgaard
1142bcb008 Merge branch 'fix-tests' into 'master'
Fixed a single test

See merge request camelot/kickc!48
2023-04-24 06:15:19 +00:00
jespergravgaard
f88c573f23 test data update 2023-04-24 08:00:10 +02:00
Jesper Balman Gravgaard
373b3cab35 Merge branch 'fix-compiilation-performance-only-coalesce-zeropage' into 'master'
#786 ZP Coalesce optimization

See merge request camelot/kickc!34
2023-04-24 05:53:04 +00:00
jespergravgaard
ccf880e617 Merged master into branch.
Rolled back main mem only coalesce.
2023-04-24 07:52:42 +02:00
jespergravgaard
153ab54f10 Merge branch 'master' into fix-compiilation-performance-only-coalesce-zeropage 2023-04-24 07:42:41 +02:00
Jesper Balman Gravgaard
f078c8f839 Merge branch 'baseline-C-code' into 'master'
#819 C-code baseline with CX16 developments

See merge request camelot/kickc!35
2023-04-24 05:27:26 +00:00
Sven Van de Velde
46079f3ec2 #819 C-code baseline with CX16 developments 2023-04-24 05:27:26 +00:00
Jesper Balman Gravgaard
3d03993175 Merge branch 'far-call-isolated-updates' into 'master'
Merging far calls...

See merge request camelot/kickc!47
2023-04-24 04:51:51 +00:00
jespergravgaard
d4040e30a0 Moved handling of banked param/return to pass 1. 2023-04-24 00:36:36 +02:00
jespergravgaard
8193688eec added test refs 2023-04-23 23:26:26 +02:00
jespergravgaard
11c86793d3 Ensured we do not coalesce across segments. 2023-04-23 23:25:28 +02:00
jespergravgaard
606ea29132 Moved calling distance to bank. 2023-04-23 22:20:13 +02:00
jespergravgaard
8b7afa4ad0 Procedure.bank is now never null. 2023-04-23 22:04:23 +02:00
jespergravgaard
8c7a144579 Refactored calling distance. 2023-04-23 21:07:16 +02:00
jespergravgaard
eb69af8fe7 Refactored calling convention. 2023-04-23 20:54:22 +02:00