Commit graph

11 commits

Author SHA1 Message Date
George Koehler a585ddf578 Fix parameters of signal handlers for linuxppc.
Linux passes the arguments in registers, but our compiler expects
arguments on the stack.  Signal handlers got garbage instead of the
signal number.  Some handlers, like the one in lang/m2/libm2/sigtrp.c,
need the correct signal number.

I write a "bridge" in PowerPC assembly that moves the arguments to the
stack.  I put the bridge in sigaction(), so I provide a signal() that
calls sigaction().  I remove the *.c glob or wildcard from build.lua,
so linuxppc only compiles its own signal.c, not the other signal.c for
linux386 and linux68k.

My bridge uses sigprocmask(), so I also add sigprocmask().  Because
linux386 and linux68k use globs, they also get sigprocmask().  I sync
the header files so all three Linux platforms declare execve(),
sigprocmask(), and unlink(), but not remove(), because we have
remove() in <stdio.h>.

I am using sigaction.s to test some features that we recently added to
our PowerPC assembler.  These are the "hi16[...]" and "lo16[...]"
syntax, and also the extended names like "beq", "cmpwi", "li", "subi".
2017-01-22 00:52:32 -05:00
Xin Wang 24d26b2826 Add execve() system call for Linux 2017-01-06 18:33:52 +08:00
David Given cf33bd6cc4 Enable tests for linuxppc via qemu-ppc. 2016-11-26 11:56:17 +01:00
David Given 36ab90385f Change sbrk() to take an int rather than an intptr_t (following the OpenBSD way
rather than the Linux way; various non-C bits of the ACK assume it takes an
int, so it's cleaner).
2016-11-23 22:06:24 +01:00
David Given 0aac9aafd3 Combine brk() with sbrk(); modify brk() to update the sbrk(0) value. 2016-11-23 22:04:21 +01:00
David Given db3564f35a Use .hol0 as an additional name for hol0; mcg requires it. 2016-11-19 11:09:07 +01:00
George Koehler f6dc6f6875 Implement isatty() for Linux.
If it understands TIOCGETD, then it is a tty, else it isn't one.  This
seems to help Basic's input statement so I can see the prompt before
I enter my input.
2016-09-20 21:28:37 -04:00
David Given 8c94b1316c Add unlink system call. 2016-09-04 19:23:02 +02:00
David Given f67c98e239 Distributions are a pain --- let's not bother any more. Instead, we just tag
the repository and download a complete snapshot, old and ancient stuff and all.
2016-09-02 23:00:38 +02:00
David Given 612e38f1c6 Remove the old make-based build system, plus some big chunks of horribly
obsolete protomake build system.
2016-09-02 22:17:51 +02:00
David Given 3df4906d52 Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00