Commit Graph

338 Commits

Author SHA1 Message Date
Jeremiah Orians c9b9920986
Release_1.10.0 2022-05-01 14:24:47 -04:00
Jeremiah Orians a983ffaa63
fix handling of #FILENAME statements 2022-01-22 10:22:02 -05:00
Jeremiah Orians 406d0856df
Backport macro functionality to better handle nested #if statements 2022-01-21 22:35:45 -05:00
Jeremiah Orians 7a12113e2a
You are now able to change filename within a file with #FILENAME $name $linenumber 2021-12-11 07:43:00 -05:00
Andrius Štikonas a495e6faf6 Update error message to include riscv32. 2021-12-04 18:35:00 +00:00
Andrius Štikonas 695b74e6f9 After test1000 copy the correct binary to bin/M2-Planet. 2021-12-03 21:36:38 +00:00
Andrius Štikonas 823be93875 Enable riscv32 tests. 2021-12-03 21:33:55 +00:00
Andrius Štikonas 1e784f5afb Add riscv32 port. 2021-12-02 22:41:27 +00:00
Andrius Štikonas 646bd15b19 Remove old function. 2021-11-22 00:41:06 +00:00
Jeremiah Orians 9613c28c4b
Catch segfault caused by missing C statements 2021-11-16 22:01:35 -05:00
Andrius Štikonas 185ef7a7c2 Improve handling of compound assignment operators.
Previously, compound assignment operators were replaced in preprocessor.
This only worked for simple cases where we only had 1-token variable.

This commit switches to proper implementation in the parser.
2021-11-15 00:06:08 +00:00
Andrius Štikonas 511601bcd9 Revert "Add support for pre-increment and pre-decrement operators."
This reverts commit ab49bcafa4.
2021-11-13 20:55:11 +00:00
Andrius Štikonas ab49bcafa4 Add support for pre-increment and pre-decrement operators.
At the moment there is a limitation on only one unary operator,
so things like *++p wouldn't work but ++*p would work.
2021-11-12 19:37:54 +00:00
Andrius Štikonas ba51f3dcc8 Fix a crash. 2021-11-11 23:54:44 +00:00
Andrius Štikonas b2414918cc Add support for assignment operators. 2021-11-11 21:18:14 +00:00
Andrius Štikonas 575f91cac1 Fix typos / add copyright. 2021-11-11 15:21:28 +00:00
Jeremiah Orians a025387b81
Catch walking off the end of a variable dereference 2021-11-11 09:48:26 -05:00
Andrius Štikonas 6ebe45f369 Implement variable dereferencing. 2021-11-10 00:14:30 +00:00
Jeremiah Orians 6d4d6c56ea
Catch the special case of attempting to remove a NULL macro token 2021-11-07 19:49:57 -05:00
Jeremiah Orians a09d9dcfd8
Add basic test for multi-dimensional arrays 2021-11-07 19:21:41 -05:00
Andrius Štikonas 546cb1ac95 Add support for char** arrays. 2021-11-07 21:18:59 +00:00
Jeremiah Orians cdb09b1608
Catch trying to expand nulls 2021-11-07 00:19:20 -04:00
Jeremiah Orians ff65efa99e
Catch lookup_macro being passed NULL 2021-11-06 22:49:34 -04:00
Jeremiah Orians 876ebe7c68
catch half broken #define (statements 2021-11-06 22:36:02 -04:00
Jeremiah Orians 9997d7a275
catch garbage at the end of a #define 2021-11-06 21:55:22 -04:00
Andrius Štikonas 4c310a3f6d Add a missing newline. 2021-11-02 22:04:11 +00:00
Andrius Štikonas 2da7b3f9a0 Implement #undef. 2021-11-02 22:04:11 +00:00
Andrius Štikonas e3651879a5 Define arch specific variables. 2021-11-01 20:50:11 +00:00
Andrius Štikonas de8f47fa9c Add support for evaluating macro variables. 2021-11-01 20:49:11 +00:00
Andrius Štikonas 7de9e684a6 Implement #error statement in preprocessor. 2021-10-31 23:33:00 +00:00
Andrius Štikonas 7a7bfd4529 Implement #ifdef and #ifndef. 2021-10-30 22:51:17 +01:00
Andrius Štikonas 945743e2c6 Add support for empty defines. 2021-10-30 22:16:24 +01:00
Jeremiah Orians 6c59218781
Clean up RISCV tests 2021-10-28 21:45:32 -04:00
Jeremiah Orians 54e5daace4
Update test1000 sha256sum 2021-10-28 21:35:06 -04:00
Andrius Štikonas a900bc6632 Implement C99 negation.
!a is 1 if a == 0 and 0 otherwise.
2021-10-29 00:52:29 +01:00
Jeremiah Orians d8fb878d7a
Correct #define behavior inside of #if/#elif/#else/#endif blocks 2021-10-27 22:22:49 -04:00
Jeremiah Orians 55929d4ddf
Catch segfault for half defined #defines and provide a warning for #unkowns 2021-10-21 21:27:16 -04:00
Jeremiah Orians 67786705a5
Update M2libc for more efficient RISC-V syscalls 2021-10-21 21:10:53 -04:00
Jeremiah Orians ffe4e5f66e
better validate arguments passed 2021-10-04 20:49:44 -04:00
Jeremiah Orians ae9e700592
Release_1.9.0 2021-10-03 09:34:22 -04:00
Andrius Štikonas 56ee526c4c Implement support for large immediates on RISC-V. 2021-10-03 11:37:03 +01:00
Jeremiah Orians 5e74995c13
Catch truncated function calls and truncated array statements 2021-10-02 22:02:39 -04:00
Jeremiah Orians 0577243444
Fix Problem with global arrays #18 2021-10-02 10:38:04 -04:00
Jeremiah Orians 4af9b79c1b
restore removed test checksums 2021-10-02 08:24:07 -04:00
Andrius Štikonas bbf67601e1 Add tests for riscv64. 2021-10-02 13:13:15 +01:00
Jeremiah Orians 8c3fa49936
Breaking update in blood-elf 2021-10-02 07:09:46 -04:00
Andrius Štikonas ae48dbd6cb Add riscv64 port. 2021-10-02 11:59:21 +01:00
Jeremiah Orians 7fb9d682ec
Update M2libc to enable RISC-V Development 2021-09-30 20:10:28 -04:00
Jeremiah Orians 745998ac13
Fix global array initialization to allocate the correct amount of memory 2021-06-26 11:58:13 -04:00
Jeremiah Orians 99df87bc0d
Breakup program to reduce complexity and risk of errors 2021-06-26 11:51:54 -04:00