Commit Graph

367 Commits

Author SHA1 Message Date
Jeremiah Orians 754c5de7d9
Add note about big endian architectures 2023-04-30 18:36:30 -04:00
Andrius Štikonas 85dd953b70 Add padding when loading global ints on 64-bit arches. 2023-04-30 23:18:48 +01:00
Jeremiah Orians f02aaaf67b
Update checksums to match 2023-01-08 20:23:19 -05:00
Andrius Štikonas b908dac7c5 Fix macro processing when they have brackets. 2023-01-08 00:56:57 +00:00
Andrius Štikonas a950c3088b Adapt tests to M2libc changes. 2022-12-31 20:55:50 +00:00
Jeremiah Orians 286964d5f8
Properly remove blocks that aren't executed 2022-12-10 20:55:41 -05:00
Andrius Štikonas dba5c792c0 Make sure to use signed/unsigned instructions in load_value. 2022-12-10 18:04:46 +00:00
Andrius Štikonas 4f17e046e8 Fix support for arrays of structs. 2022-12-07 23:47:17 +00:00
Andrius Štikonas 259ff86c1b Add support for . operator that is after array. 2022-12-06 21:42:30 +00:00
Andrius Štikonas 39ca206412 Fix segfault. 2022-12-04 20:57:33 +00:00
Jeremiah Orians ab8cc2dd7f
Fixed unupdated checksum 2022-12-03 21:17:29 -05:00
Andrius Štikonas 62b53a554e Implement fixed sized integers: (u)int8_t, (u)int16_t, (u)int32_t. 2022-12-04 02:04:36 +00:00
Andrius Štikonas a9a0fe670b Fix doubly indirect struct type. 2022-12-02 21:59:20 +00:00
Andrius Štikonas d310700151 Switch to new GAS style x86 defines. 2022-12-02 21:50:42 +00:00
Andrius Štikonas 12d40f6c82 Update M2libc submodule. 2022-11-06 18:16:52 +00:00
Andrius Štikonas 18a7484a99 Add support for local structs. 2022-11-06 18:15:26 +00:00
Andrius Štikonas bf66daaf4c Chage riscv stack depth sign convention to match x86 and amd64. 2022-11-06 17:11:20 +00:00
Andrius Štikonas 7e7558768a Add support for global structs. 2022-11-05 23:30:46 +00:00
Andrius Štikonas adb4fb3781 make clean should cleanup all tests. 2022-10-26 00:38:43 +01:00
Andrius Štikonas b8664784b6 Fix a typo. 2022-10-25 00:44:29 +01:00
Andrius Štikonas f7fcc0af6e Adapt to M2libc changes.
* Some test includes have changed.
* New GAS style amd64 defines.
* Make M2-Planet output position independent code on amd64.
2022-10-09 14:15:07 +01:00
Jeremiah Orians 62c6f6c80e
Catching another segfault 2022-09-21 23:53:07 -04:00
Jeremiah c064b344dd
Merge pull request #40 from stikonas/master
Fix a typo.
2022-06-30 22:21:55 -04:00
Andrius Štikonas cbd7f67e93 Fix a typo. 2022-06-22 18:23:26 +01:00
Jeremiah Orians 73b39a8981
Took 4 days to find this segfault 2022-05-23 23:51:38 -04:00
Jeremiah Orians c50dcade62
Even more segfaults 2022-05-19 19:40:19 -04:00
Jeremiah Orians 65444b33d2
Clearing out more segfaults 2022-05-18 07:37:42 -04:00
Jeremiah Orians 0a07af340b
Found new segfaults 2022-05-14 21:51:09 -04:00
Jeremiah Orians fba6dffb66
Fix checksums and add support for #warning 2022-05-09 06:55:22 -04:00
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