Commit Graph

  • f065a07ea1 Merge branch '#833-correct-data-segment-for-string-constants' into 'master' Sven Van de Velde 2024-04-28 18:39:32 +0000
  • 6a3b219632 Merge remote-tracking branch 'origin/#833-correct-data-segment-for-string-constants' into #833-correct-data-segment-for-string-constants Flight_Control 2024-04-28 21:38:55 +0300
  • 77258c3bfd - Corrected string constantification using the correct data segment of a string initialization array. It was defaulted to the Data segment, which is incorrect when the string array initialization is within an other data segment! - Tried as much as possible to also apply the same concept for the other constantification types. - Added test case. Flight_Control 2024-04-28 20:41:12 +0300
  • b1a39859df - Corrected string constantification using the correct data segment of a string initialization array. It was defaulted to the Data segment, which is incorrect when the string array initialization is within an other data segment! - Tried as much as possible to also apply the same concept for the other constantification types. - Added test case. Flight_Control 2024-04-28 20:41:12 +0300
  • 20f3529a2d - Optimized namespace prefix logic for global variables and fixed but to also include exported global variables used in logic. - Fixed bug for hasExportAsmLibrary to use the LibraryName always and optimized the code in AsmLibrary.java. - Fixed bug for hasExportAsmLibrary to use the LibraryName always and optimized the code in Pass4CodeGeneration.java. - Optimized naming of asmLibrary labels and names. Labels are to be used in assembler generation only. Names are used for all other purposes. Flight_Control 2024-04-27 09:29:05 +0300
  • 1a53d6a913 - Refer .asm library imported global variables to the the namespace where the global variable resides. - Generalized the AsmLibrary procedures to symbols, to also allow exporting variables. - Removed the initialization part of .asm library header generation for global exported variables. - The directive __asm_export can now also be used to indicate global variables exporting within C libraries (for potential .asm library generation). - Converted the usage of typedef to struct for __conio global variable in cx16_conio.c - Updated example code. - Fixed a bug where for exported structs and imported structs, the variables were defined as volatile to non-volatile. - VariableBuilder constructor now also received the program variable to refer to program level configurations defined. - Remove to declare string constants as .asm library exported global variables. - Removed the optimization PassNAsmLibraryGlobalVarsExport. It is not needed. Each global variable export must be explicitly declared using asm_export or __asm_export. - Improved naming of variables and procedures to retrieve and manage import and export libraries within the program. Flight_Control 2024-04-26 12:40:14 +0300
  • 00df07b7bf - Fixed test cases. Full retest of all test cases. - Treat global variables of libraries, as part of the .asm library .namespace. - Fix bugs. - Assign meaningful struct names to .asm internal variables and labels. (Remove the $x notation). Flight_Control 2024-04-19 16:55:24 +0300
  • 37a9788a10 Merge branch 'fix-inline-function-asm-code-blocks-using-constants' into 'master' Sven Van de Velde 2024-01-30 07:45:10 +0000
  • 73a68a619d Merge branch 'master-mermaid' into 'master' Sven Van de Velde 2024-01-25 14:06:17 +0000
  • e371d304f6 - Fixed test cases. Full retest of all test cases. - Create the possibility of forward declaration of structs as part of the language. - Generation of forward declarations in the .asm header files. - Treat global variables as part of global memory, even in libraries. Ensure that globals are not overwritten when importing. - Ensure that the various compilation models (stack, var, phi) in combination with the memory models (zp, mem) result in proper execution of code and proper memory allocation etc, etc. - Added the lru-cache logic to properly test the compilation and memory model combinations. (A lot of bugfixes as a result!) Sven Van de Velde 2024-01-16 08:01:05 +0300
  • 25f4ba0419 Merge branch 'segmented-string-consolidation' into 'master' Sven Van de Velde 2024-01-04 01:37:33 +0000
  • 7a4d8ce4e5 Merge branch 'master-fast-coalesce' into 'master' Sven Van de Velde 2024-01-04 01:37:32 +0000
  • 2c74b2a19c - Fixes test cases. Sven Van de Velde 2024-01-02 21:14:40 +0100
  • f2b5d160a8 - Fixing setting exported and imported globals as volatile method... Now using the directives approach at pass0 instead of in VariableBuilder. Sven Van de Velde 2024-01-02 21:14:21 +0100
  • 294bb27eec Updated %nn to 0bnn and $nn to 0xnn. master Jesper Gravgaard 2024-01-02 19:45:16 +0100
  • fab740f797 - Fix earlier manual merge mistakes. - Fixed a couple of issues with AsmIdentifier. - Global variables exported are volatile. - Created proper generation of the protypes for exported global variables in _asm.h. - Created new test cases. - Struggled with the proper export of global struct variables, first version of it implemented but this will require rework ... - There are issues with "types" of structures, will need more work in the future and a strategy for it... - Made AsmLibrary functions as AsmExportLibrary to make the code more clear. - Created isAsmExportLibraryGlobal and isAsmImportLibrary global functions. Sven Van de Velde 2024-01-02 19:41:03 +0100
  • 8416086294 Updated test programs use of CIA_INTERRUPT_CLEAR. Jesper Gravgaard 2024-01-02 19:21:16 +0100
  • 771fa9dbcd Added more CIA addresses. Jesper Gravgaard 2024-01-02 18:50:07 +0100
  • d477cb9eae - New AsmImportLibrary class, for generating the #import statements. - New AsmIdentifier class that replaces unallowed kickasm characters to an _. - New AsmIgnoredImportInlinedKickAsm class, for creating the construct to ignore the body lines when the library is imported (used), and removed the #else clause (was confusing). - Export of global variable in .asm Libraries (first version). - Removal of constructor_for in .asm libraries. - Reworked the way in assembler generation how link files are treated. - Reworked all `replace("-","_")` areas using AsmIdentifier properly. Sven Van de Velde 2024-01-01 16:50:19 +0100
  • 88dfeec3de - Now nesting of libraries works. Had to take care of the zero-page usage of nested procedures. The _asm.h file, containing the exported procedures contains the full zero-page usage, including the used (nested) procedures in the call graph of each exported procedure. - Proper import mechanisms and naming. - Ensure that .asm library files are imported only once! - Added a new asm directory in kc folder, that contains library stub C files for .asm library generation. - Fixed library startup initialization. .asm libraries are now also calling correctly the library init routines etc. - Added new test cases. Sven Van de Velde 2023-12-30 20:33:13 +0100
  • dc65b10ece Added some missing vectors. Jesper Gravgaard 2023-12-29 07:58:02 +0100
  • ef7ab9be16 Added more CIA constants Jesper Gravgaard 2023-12-29 07:13:36 +0100
  • 9e2d1accc5 Upgraded to KickAss 5.25 Jesper Gravgaard 2023-12-27 18:52:32 +0100
  • 5ac5eb159e - Added a new -A or -asmLibdir option to specify the path where to find the .asm files for import during pass4. - Validate that an .asm library can be actually found within the path specifications of -A or in the current folder when importing a library using #pragma asm_import pre-processor command or __asm_import directive. If the .asm file cannot be found, throw a compile error with a very descriptive and helping message. - Optimized the Program class, now containing a currentPath variable. - Sven Van de Velde 2023-12-19 09:58:08 +0100
  • 61c4e8418d - Fragments Sven Van de Velde 2023-12-17 21:17:55 +0100
  • 58fef5acc3 Cleanup compile test case and folder. Sven Van de Velde 2023-12-17 12:13:29 +0100
  • d81e6ed2fa Merge remote-tracking branch 'origin/master-libraries' into master-libraries Sven Van de Velde 2023-12-17 11:45:04 +0100
  • 9690a10195 - An .asm library creation to include the most important printf statements together with conio, so that the main program does not need to recompile all this logic. Sven Van de Velde 2023-12-17 11:44:00 +0100
  • 8cf479d458 - Fixed an issue where for main programs (so non-library programs), also the link script conditional include would be defined in pass4 for in the assembler generation. Sven Van de Velde 2023-12-17 11:42:27 +0100
  • dcbf2a4efe - Fixed an issue where __zp without specifying the number would cause a crash. Sven Van de Velde 2023-12-17 11:39:53 +0100
  • d75d96473c - Fixed a clobber test issue with alive variables that are in libraries (as parameters) and do not need a clobber test, as the library tested full clobber issues. The issue was fixed by not generating memory, zp or register usage for procedure parameters imported from .asm libraries. Sven Van de Velde 2023-12-16 19:12:57 +0100
  • bcab0a8c94 - Fixed a clobber test issue with alive variables that are in libraries (as parameters) and do not need a clobber test, as the library tested full clobber issues. Sven Van de Velde 2023-12-16 19:12:57 +0100
  • fa678aac3d - Rework printf to include printf in libraries. printf_type functions don't user anymore the format structure, but all formatting is passed as parameters. Sven Van de Velde 2023-12-16 19:12:46 +0100
  • 46321d47f4 - Bugfix of link file. Must be properly included and defined in all cases. With or without .asm library. Sven Van de Velde 2023-12-16 13:45:38 +0100
  • 30e6aff441 - Documentation for .asm libraries fixes. - Asm library code debug fixes. - Added test programs as explained in the documentation. Sven Van de Velde 2023-12-15 14:51:18 +0100
  • a0416a1a1d - Documentation Sven Van de Velde 2023-12-15 08:44:41 +0100
  • 4b0d259fc7 Merge remote-tracking branch 'origin/master-libraries' into master-libraries Sven Van de Velde 2023-12-14 22:28:46 +0100
  • acb385094b - Documentation for .asm libraries. - Preparing source file identification routines for later usage during linking. - Refining the code generation routines in pass4. Sven Van de Velde 2023-12-14 20:44:03 +0100
  • b90ef9f94d - Documentation for .asm libraries. - Preparing source file identification routines for later usage during linking. - Refining the code generation routines in pass4. Sven Van de Velde 2023-12-14 20:44:03 +0100
  • b9472afb31 - zeropages allocated for local variables, used in procedures exported to .Asm libraries, are also added as part of the function prototype using the directive __zp_reserve. Sven Van de Velde 2023-12-13 17:16:06 +0100
  • ff06b2eddf Code review of library. Sven Van de Velde 2023-12-12 22:45:19 +0100
  • 5436877fa0 Many Fixes and Additions: - #820/29 - ensure that during pass4, namespaces are correctly labelled for variables. - #820/30 - added option to only having to specify #pragma asm_library and the source file name will be used as the library name. - #820/31 - remove the need for link files for libraries. - #820/1 - Lots of optimizations - Added lru-cache as a library in the library tests. It works! - Added many tests - Added conio example - Added eightqueens example. Sven Van de Velde 2023-12-12 08:20:06 +0100
  • 979ec83112 - Correct calculation of live ranges for exported and imported procedures parameters and return value, resulting in better ZP coalesce accuracy and ZP consumation compactness. (I really worked a lot on this ...) - Working on the coalesce benchmark tests (comparing the compiles of the same procedures with library functions and without library functions). - Added documentation. - Completed issue #820 check list on gitlab, see the details there. Source code changes use the #820/ tags to document each change context. Sven Van de Velde 2023-12-08 18:20:45 +0100
  • 30e58f54e3 - Correct calculation of live ranges for exported and imported procedures parameters and return value, resulting in better ZP coalesce accuracy and ZP allocation compactness. (I really worked a lot on this ...) - Working on the coalesce benchmark tests (comparing the compiles of the same procedures with library functions and without library functions). - Added documentation. - Completed issue #820 check list on gitlab, see the details there. Source code changes use the #820/ tags to document each change context. Sven Van de Velde 2023-12-08 18:20:45 +0100
  • 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. Sven Van de Velde 2023-12-06 18:33:44 +0100
  • 5e6622b2a8 Small test program to test parameters. Sven Van de Velde 2023-12-05 16:23:22 +0100
  • 53a918025a Fine-tuned the verbose of the text and the weight of the equivalence classes allocation. Sven Van de Velde 2023-12-05 14:09:26 +0100
  • a4bbf1fd4f Fine-tuned the verbose of the weight of the symbols and the onlyZP flag. Sven Van de Velde 2023-12-05 11:21:22 +0100
  • 137053f093 - Added a register interference graph (RIG) per procedure, showing the alive variables interfering with each other, as each edge is an interference. - Activate with option -rrig or -reportrig. Sven Van de Velde 2023-12-04 17:32:37 +0100
  • 6f0caee5fa - Add mermaid and markdown files as part of .gitignore Sven Van de Velde 2023-12-04 07:42:38 +0100
  • 381d0522fe - Only generate ASM fragments when doing a compilation with uplifting during coalesce. See // #786 Sven Van de Velde 2023-12-03 22:17:28 +0100
  • efc9ed5fab - Added coalesce example if.c to test equivalence classes and live range analysis. Sven Van de Velde 2023-12-03 21:44:27 +0100
  • 7b856a0f74 - Added MermaidGraph class for mail flow charts generation. Sven Van de Velde 2023-12-03 21:42:42 +0100
  • f0dc36b205 Documentation of classes and structural improvements. Sven Van de Velde 2023-12-03 13:03:15 +0100
  • 8359ffde8a Control Block Flow Graph - Working version - Added option -rcfg to generate .md files, which are markdown files showing for each procedure the CFG. - Modelled the report generation classes. Sven Van de Velde 2023-12-02 14:51:57 +0100
  • 59fd0e0703 CX16 library changes Sven Van de Velde 2023-10-18 18:57:39 +0200
  • 5d86d93160 - Added vera constants - Added fragment Sven Van de Velde 2023-11-29 14:45:23 +0100
  • 5a5f3e1dee Merge remote-tracking branch 'origin/master-libraries' into master-libraries Sven Van de Velde 2023-11-29 14:28:22 +0100
  • 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. Sven Van de Velde 2023-11-29 14:15:52 +0100
  • 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. Sven Van de Velde 2023-11-29 14:15:52 +0100
  • 3b571bbe6a - Visualization of the Control Flow Graph in Mermaid syntax. - Added new option -vmermaid, which creates in the output directory .mmd files containing the Mermaid CFGs generated at the different stages of the compilation. - Use the mermaid plug-in of IntelliJ to view those files. - Added -vnoasm to stop verbosing asembler output. Sven Van de Velde 2023-11-28 19:04:28 +0100
  • 4012887479 Merge branch 'master' into master-libraries Sven Van de Velde 2023-11-27 15:47:50 +0100
  • f252f4b56f Merge remote-tracking branch 'origin/master-libraries' into master-libraries Sven Van de Velde 2023-11-27 15:36:04 +0100
  • 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). Sven Van de Velde 2023-11-27 15:35:45 +0100
  • 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). Sven Van de Velde 2023-11-27 09:36:57 +0100
  • 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). Sven Van de Velde 2023-11-27 09:36:57 +0100
  • 3f4312e876 Merge branch 'master-manual' into 'master' Jesper Balman Gravgaard 2023-11-25 15:24:38 +0000
  • cf13f35eed Fixed tests for running on MacOs Sonoma Jesper Gravgaard 2023-11-25 16:22:11 +0100
  • 8812cf010c Merge branch 'master-libraries' into 'master' Sven Van de Velde 2023-11-24 16:31:04 +0000
  • a182d78172 Merge remote-tracking branch 'origin/master-libraries' into master-libraries Sven Van de Velde 2023-11-24 16:05:57 +0100
  • 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. Sven Van de Velde 2023-11-24 15:46:48 +0100
  • 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. Sven Van de Velde 2023-11-24 15:46:48 +0100
  • 818da3f995 - Ensure that for exported procedure parameters, there are no constant values calculated. - Optimization of function to calculate exported procedure parameters. Sven Van de Velde 2023-11-18 17:24:13 +0100
  • 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. Sven Van de Velde 2023-11-18 11:44:08 +0100
  • 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. Sven Van de Velde 2023-11-18 10:40:50 +0100
  • de6dad44db - Started with the library end-user manual definition. Sven Van de Velde 2023-11-05 19:37:14 +0100
  • 4bd878eb5d Rework of the KICKC manual in markdown for maintenance. Sven Van de Velde 2023-10-27 18:43:11 +0200
  • 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. Sven Van de Velde 2023-11-05 16:51:54 +0100
  • b0249af269 Internals for Libraries working for conio.asm. Added a demo program. #pragma still todo! Sven Van de Velde 2023-11-01 16:29:39 +0100
  • e550c91095 Rework of the KICKC manual in markdown for maintenance. Sven Van de Velde 2023-10-27 18:43:11 +0200
  • 1f0bddc768 Libraries Sven Van de Velde 2023-10-27 15:31:51 +0200
  • 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. Sven Van de Velde 2023-04-22 14:58:33 +0200
  • f368e25e9f Merge remote-tracking branch 'origin/segmented-string-consolidation' into segmented-string-consolidation Sven Van de Velde 2023-10-27 11:41:26 +0200
  • 8d3d0d6c08 Merge remote-tracking branch 'origin/segmented-string-consolidation' into segmented-string-consolidation Sven Van de Velde 2023-10-27 11:38:55 +0200
  • 7822e71654 Merge remote-tracking branch 'origin/segmented-string-consolidation' into segmented-string-consolidation Sven Van de Velde 2023-10-27 11:38:55 +0200
  • d465d038eb Merge remote-tracking branch 'origin/segmented-string-consolidation' into segmented-string-consolidation Sven Van de Velde 2023-10-27 08:25:58 +0200
  • cbfa9ebdfd Merge remote-tracking branch 'origin/segmented-string-consolidation' into segmented-string-consolidation Sven Van de Velde 2023-10-27 08:25:58 +0200
  • 84d2715e34 Consolidate string constants per segment. If the same string is defined within 2 different segments, then this constant will be allocated in memory in the asm under each data segment. Sven Van de Velde 2023-10-26 20:39:22 +0200
  • 0a4ec86f8a Consolidate string constants per segment. If the same string is defined within 2 different segments, then this constant will be allocated in memory in the asm under each data segment. Sven Van de Velde 2023-10-26 20:39:22 +0200
  • adb93aa3a0 KICKC addition - common strings over different data segments are consolidated, but only in the respective data segments. Sven Van de Velde 2023-10-18 18:59:46 +0200
  • ff29404f24
    Merge branch '828-update-to-kickass-5-25' into 'master' Jesper Balman Gravgaard 2023-09-03 12:52:41 +0000
  • cec787e91b Upgraded to KickAss 5.25 828-update-to-kickass-5-25 jespergravgaard 2023-09-03 14:44:43 +0200
  • c36900a219 Merge branch '827-vice-x64sc-emulator-will-not-start-properly-on-windows' into 'master' Jesper Balman Gravgaard 2023-08-27 17:42:18 +0000
  • 6c8bab90c6 Fixed #827 problem with starting Vice64 on Windows by using ProcessBuilder. 827-vice-x64sc-emulator-will-not-start-properly-on-windows Jesper Gravgaard 2023-08-27 19:33:52 +0200
  • f759c5c9c1 Merge branch '815-procedure-compilation' into 'master' Jesper Balman Gravgaard 2023-05-21 17:24:27 +0000
  • 2ee4e5c14a main merged 815-procedure-compilation jespergravgaard 2023-05-21 19:16:51 +0200
  • a20fd82d2d Merge branch 'master' into 815-procedure-compilation jespergravgaard 2023-05-21 19:01:30 +0200
  • 0e3f56ead9 minor changes jespergravgaard 2023-05-21 17:47:00 +0200
  • ce28c50d34 updated tests jespergravgaard 2023-05-19 11:06:44 +0200
  • 1142bcb008 Merge branch 'fix-tests' into 'master' Jesper Balman Gravgaard 2023-04-24 06:15:19 +0000