1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-21 14:30:21 +00:00
Commit Graph

2942 Commits

Author SHA1 Message Date
jespergravgaard
93dac7a14c Merge branch 'master' into far-call-isolated
# Conflicts:
#	pom.xml
#	src/main/antlr4/dk/camelot64/kickc/parser/KickCParser.g4
#	src/main/java/dk/camelot64/kickc/preprocessor/CPreprocessor.java
2023-04-23 09:44:05 +02:00
Flight_Control
4aeed59d0e - Code improvements for CallingDistance and CallingProximity 2023-04-18 10:15:23 +02:00
Flight_Control
3735b248c3 - Objects.equals(bankLocation, procedure.bankLocation) 2023-04-18 08:36:22 +02:00
Flight_Control
23903b34c6 - Removed TODO 2023-04-18 08:02:39 +02:00
Flight_Control
663a439c34 - Updated test cases 2023-04-14 08:00:31 +02:00
Flight_Control
70012690dd Revert "- Resolved issue of nobank without parameters. Now it works ... The CPreprocessor adds () and the KickCParser.g4 demands brackets as part of the syntax. But you can write without in the code. - Retested all test cases."
This reverts commit 82a6c56e
2023-04-13 13:07:30 +02:00
Jesper Balman Gravgaard
33e33cf543 Merge branch '816-pragma-without-parameters' into 'master'
#816 Pragma with no parameter and no parenthesis

Closes #816

See merge request camelot/kickc!45
2023-04-12 06:04:32 +00:00
jespergravgaard
2478ea034f #816 Pragma with no parameter and no parenthesis 2023-04-12 07:50:52 +02:00
Sven Van de Velde
3916ee3413 - Fixed a silly mistake where the banked close call fragment sequence was wrong. I first need to read the current bank, store it in the stack, then change the current bank. After jsr return, pop the old bank from the stack and store it. 2023-04-12 07:35:45 +02:00
Sven Van de Velde
02d9eaf081 - Added banking signature to procedures in the comments of the assembler output file.
- Update test cases and reference data.
- Cleaned old test cases for stack calls.
2023-04-12 06:57:25 +02:00
Sven Van de Velde
82a6c56e0a - Resolved issue of nobank without parameters. Now it works ... The CPreprocessor adds () and the KickCParser.g4 demands brackets as part of the syntax. But you can write without in the code.
- Retested all test cases.
2023-04-11 21:48:26 +02:00
Sven Van de Velde
5c5ffd2736 - Removed unnecessary tests and logic for bank directive parsing.
- Retested all test cases.
2023-04-11 14:44:35 +02:00
Sven Van de Velde
477499b97b - Fixed #pragma nobank parameter issue.
- Optimized logic for #pragma bank.
- Updated test cases and references.
- Made #pragma NAME parameters optional.
- Retested all test cases.
2023-04-11 13:41:14 +02:00
Sven Van de Velde
acbf8f073f - Updated test case references. 2023-04-11 10:41:10 +02:00
Sven Van de Velde
0393958154 Merge remote-tracking branch 'origin/far-call-isolated' into far-call-isolated-#508 2023-04-11 10:14:10 +02:00
Sven Van de Velde
8bb0ae904f - processed some of the comments.
- documentation fixes.
2023-04-11 10:13:41 +02:00
Jesper Balman Gravgaard
e7d717e915 Apply 2 suggestion(s) to 2 file(s) 2023-04-11 08:02:06 +00:00
Jesper Balman Gravgaard
8b7beac0c1 ok 2023-04-11 07:42:41 +00:00
Sven Van de Velde
9cf5f4cd05 Merge commit 'f2bf3484ad84a75f644a47560f1d2a0dd42c1acd' into jesper_baseline_all_changes
(cherry picked from commit 74512e132625e2e4f8f0ae3a80beae043dcc642d)
2023-04-11 09:00:46 +02:00
Sven Van de Velde
f2bf3484ad - testing and regeneration of fragment references
- implementation of near, close, far through AsmFragmentSignature
- fragment consolidation (removal of prepare, execute, finalize)
- stackcall banked throws error + test cases
- overall test cases for phi
- implementation of fragments
2023-04-11 08:35:53 +02:00
Sven Van de Velde
b62430bfc3 - near, close, far implementation using fragments for phi calls
- fragment consolidation
- removal of platform
- stackcall banked throws error
- testing
2023-04-11 08:35:18 +02:00
Sven Van de Velde
a52b5dc4a9 Banking progress
(cherry picked from commit d0abf45529c34e14ed3ce43b9be3a140f78bc4a9)
2023-04-10 07:22:06 +02:00
Sven Van de Velde
c550a122da Banking progress
(cherry picked from commit b98f95facff43c7a0bb8f9e9f902b49cc10ef4fe)
2023-04-10 07:19:35 +02:00
Jesper Balman Gravgaard
adb9688acb Merge branch '814-upgrade-java' into 'master'
Resolve "Upgrade to Java 17 - and upgrade libraries"

Closes #814

See merge request camelot/kickc!42
2023-04-06 07:08:26 +00:00
jespergravgaard
7b1b3d3708 Merge branch 'master' into 814-upgrade-java 2023-04-06 08:55:27 +02:00
jespergravgaard
a12a211d70 #814 Upgrade to Java 17 plus upgraded libraries. 2023-04-06 08:44:31 +02:00
Jesper Balman Gravgaard
7e0986196e Merge branch '372-varcall-progress' into 'master'
Working on #372 varcall. Fixed problem with returning a struct by value.

See merge request camelot/kickc!37
2023-04-05 15:32:31 +00:00
jespergravgaard
271163a25f Merge branch 'master' into 372-varcall-progress 2023-04-05 17:17:16 +02:00
Flight_Control
1499f8cecc - Added javadoc documentation in Bank.java.
- Added reworked procedure-callingconvention-phi-bank-5.c to reflect a good banking example for the documentation.
- Update ref for test cases.
2023-04-05 13:10:18 +02:00
Flight_Control
bdc4e28d0a - Fixed test cases going in error.
- Optimized test cases and documented them properly.
- Remove obscolete ref data.
2023-04-04 23:31:56 +02:00
Jesper Balman Gravgaard
f864f61be2 Merge branch 'add-union-initializer-c99-syntax' into 'master'
Implemented C99 compatible union initializer method, using .member= syntax...

See merge request camelot/kickc!40
2023-04-04 20:35:44 +00:00
Flight_Control
b13262beb8 - Added test cases.
- Merged remaining code change that is not in master remote.
2023-04-04 20:11:09 +02:00
Flight_Control
a6b021aaf0 Merge branch 'jesper_baseline' into far-call-isolated-#508
# Conflicts:
#	src/main/java/dk/camelot64/kickc/model/symbols/Procedure.java
#	src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java
2023-04-04 20:03:15 +02:00
Flight_Control
5bd84e7812 - Added test cases.
- Checked asm outputs.
- banking is only implemented for the cx16 for now.
2023-04-04 19:36:11 +02:00
jespergravgaard
f2b9b5bde7 FlightControl fix for #678. Improved doc. 2023-04-04 13:18:58 +02:00
jespergravgaard
b85e6fc715 FlightControl fix for #678. 2023-04-04 13:11:36 +02:00
jespergravgaard
3c52043744 FlightControl fix for #678. 2023-04-04 12:54:28 +02:00
jespergravgaard
5c86d25057 FlightControl fix for #678. 2023-04-04 12:45:38 +02:00
Flight_Control
c5f260e882 Implemented C99 compatible union initializer method.
- Added test cases.
- Reworked parser.
- Added code redesign to avoid crashes in Initializers.java.
2023-04-04 09:30:40 +02:00
jespergravgaard
08ed1deebd Working on #372 varcall. Struct of struct parameters working. 2023-04-03 10:37:54 +02:00
Flight_Control
9db2d9b960 Implemented C99 compatible union initializer method, using .member= syntax...
(cherry picked from commit ef62f80b2b693aa92bcbdfb873bad5f995b4b6ff)
2023-04-03 09:00:01 +02:00
Sven Van de Velde
51623c3657 Implemented C99 compatible union initializer method, using .member= syntax...
(cherry picked from commit f52f851127ab06064c010d310ee7d87f78e1f303)
2023-04-03 08:59:40 +02:00
jespergravgaard
594e8d688c Working on #372 varcall. Pointers to struct working. 2023-04-02 12:18:33 +02:00
jespergravgaard
2dd2f2e081 Working on #372 varcall. Fixed struct in/out by value - also when only called once. 2023-04-02 11:18:07 +02:00
jespergravgaard
9a85048003 Working on #372 varcall. Fixed struct in/out by value - also when only called once. 2023-04-02 11:17:57 +02:00
jespergravgaard
c9720722ad Working on #372 varcall. Fixed problem with returning a struct by value. 2023-04-01 19:30:19 +02:00
Flight_Control
4706611564 - Mem[x] parameters in a banked function are always allocated in main memory.
- Mem[x] return value(s) in banked functions are always allocated in main memory.
- Mem[x] intermediate value(s) in banked functions are always placed in the designated data segment.

This to accommodate better banking logic for far function calls. (There might be more complexity for other type of variables, but for equinoxe it's working!).

(cherry picked from commit 649a187d7e9290b630a951d8968ce5ece6ba2216)
2023-03-27 21:42:52 +02:00
Flight_Control
b650ba99a9 - Fix far call kernal servicing address! It was wrong! Now it's fixed!
(cherry picked from commit e9ddfaeb3ab519cd393f26ca30632c06c59de1fe)
2023-03-26 18:31:47 +02:00
Flight_Control
2513e59266 - Inline code can never be banked.
(cherry picked from commit 249b7600a9262ea673e63d133db75690af43ca05)
2023-03-26 18:30:53 +02:00
Flight_Control
f81c5ce040 Adding the fix code segment in far call bank.
Added the currentBankLocation to the procedure definition.

(cherry picked from commit 0d90caebe8)
(cherry picked from commit 8cbf1b5b4bd7f62326e454bbff7ab5456647615d)
2023-03-26 18:30:09 +02:00