Commit Graph

36 Commits

Author SHA1 Message Date
Jeremiah Orians 358b6cfb96
Fix modulus behavior that is wrong.
Thank you janneke
2021-01-01 16:39:27 -05:00
Jeremiah Orians cc1a17a040
Revert "file.c: introduce output buffering for x86"
This reverts commit 5afeb0743e.
2021-01-01 15:28:30 -05:00
Jeremiah Orians 07baf02efe
Looks like I got x86/AMD64 signed and unsigned division backwards.
Thanks for finding that janneke
2021-01-01 10:52:23 -05:00
Michael Schierl 5afeb0743e file.c: introduce output buffering for x86
Note that this is a backwards incompatible change: Unlike POSIX, exit()
will not flush all open streams, so you are responsible for flushing or
closing all your streams before successful exit.

Also, file.c will now also require calloc.c (and malloc.c).

Updated the test cases accordingly.

Only implemented and tested for x86.
2020-12-21 16:57:17 +01:00
Michael Schierl 608fba306f Fix x86 close syscall and test 0104
The close syscall was missing an indirection and therefore closed random
file descriptors (very visible in strace output).

Test 0104 did not properly null terminate the envp, resulting in -EFAULT
on execve syscall in case the next value in memory does not happen to be
0 (which it seems to be right now).
2020-12-21 16:57:17 +01:00
Jeremiah Orians 132e685f97
Fix x86 behavior on unsigned compares 2020-12-15 17:46:45 -05:00
Jeremiah Orians c4a636c99d
Fix shift behavior to better match C standard 2020-10-16 22:07:06 -04:00
Jeremiah Orians e9da9c802e
make cc_* compatible 2020-10-16 19:29:38 -04:00
nimaje 52114585bf
fix malloc to accept FreeBSD's behavior and fix failing binaries 2020-10-16 17:26:39 -04:00
nimaje 028bdaf951
Update ELF headers and sha256 function to better support FreeBSD 2020-10-16 12:00:42 -04:00
Jeremiah Orians 87672ddfdb
Release 1.6.0 2020-04-30 22:35:22 -04:00
deesix 205c383c5f lib: fflush stub
Paraphrasing OriansJ's IRC message while working on kaem:

GCC needs fflush(stdout) to get matching behavior, as M2-Planet doesn't
buffer. I guess we will need to make a fflush function (it'll do nothing
but return 0).
2020-03-01 18:55:32 +01:00
Jeremiah Orians 308b201fd4
Fixed getcwd to better match 2020-01-28 04:24:29 -05:00
Jeremiah Orians f77e0ed6cb
A quick prototype for getcwd 2020-01-25 16:24:12 -05:00
Jeremiah Orians aeafd837e7
Adding first draft versions of chdir and access to M2-Planet (needs testing) 2020-01-18 08:57:32 -05:00
Jeremiah Orians 1221a5e6dc
Replace NOP with NULL because that is what is really ment by it 2020-01-06 20:21:26 -05:00
Jeremiah Orians 64a3a1b674
Get division on x86/AMD64 a closer approximation of what is correct 2019-11-29 12:55:55 -05:00
Jeremiah Orians dea4f902b7
Adding support for additional type compatibility with C and backported
regression fix for ARMv7l debug headers
2019-10-27 12:55:07 -04:00
Jeremiah Orians e55dc78597
4/24 working tests for AMD64 2019-04-19 17:43:59 -04:00
Jeremiah Orians 442601197c
17/24 working tests for armv7l 2019-03-30 09:25:52 -04:00
Jeremiah Orians f01f805803
Upgraded to 23/24 working tests 2019-03-09 11:56:16 -05:00
Jeremiah Orians 01658364e5
Upgraded to 16/24 working tests 2019-02-28 20:52:01 -05:00
Jeremiah Orians 69c319ef6c
Added working HEAP to knight-posix 2019-02-24 17:46:05 -05:00
Jeremiah Orians a1309ae4b9
Added support for test03 for knight-posix 2019-02-24 06:48:31 -05:00
Jeremiah Orians ee1abde0d4
Add test2 for knight-posix 2019-02-23 20:18:53 -05:00
Jeremiah Orians f05b23ef34
Removed redundent x86 definitions 2018-11-07 21:02:21 -05:00
Jeremiah Orians 4629a2e842
Fixed Linux 4.17 regression 2018-11-05 19:45:15 -05:00
Jeremiah Orians 9a2c6b4019
Harmonized License headers and added missing license headers 2018-10-17 19:27:06 -04:00
Jeremiah Orians 56db0fcad4
Breaking change in M2-Planet 2018-10-17 16:08:04 -04:00
Jeremiah Orians 6ea629f6a2
Fixing typo in License headers 2018-08-26 21:44:45 -04:00
Jeremiah Orians dc94afb558
Lots of clean and enhancements to simplify task of writing it in assembly. 2018-07-19 22:33:02 -04:00
Jeremiah Orians 688b546281
Added debug support for M2-Planet output 2018-06-06 21:37:19 -04:00
Jeremiah Orians 426a92ab09
Finally became self-hosting 2018-02-23 21:18:23 -05:00
Jeremiah Orians f6752b2802
Added additional functionality such as mixed structs, do while loops,
gotos and tests for the new functionality
2018-01-24 20:00:22 -05:00
Jeremiah Orians 9a919d20ea
Minor reordering of tests and the addition of unary - and ! support 2018-01-21 14:42:09 -05:00
Jeremiah Orians 4916fb9385
Put common x86 platform logic in a shared folder to reduce duplicate code 2018-01-20 18:33:11 -05:00