Commit Graph

1763 Commits

Author SHA1 Message Date
Danny Milosavljevic 0f5651436b
waitpid: Add case for ARM.
* lib/linux/waitpid.c: Add case for ARM.
2019-09-09 18:33:53 +02:00
Danny Milosavljevic fd7c2d32cd
ARM: Fix function calls.
* lib/arm-mes/arm.M1: Delete "ret" macro.
Fix "push___%ebp" macro.
Add "pop____%lr" macro.
Add "push___%lr" macro.
Add "mov____%lr,%r9" macro.
Add "mov____%r9,%pc" macro.
* module/mescc/armv4/as.scm (armv4:function-preamble): Push lr, too.
(armv4:ret): Pop lr, too.  Return manually.
2019-09-09 18:33:53 +02:00
Danny Milosavljevic 59f22c5b86
ARM: Use architecture-dependent branch encoding for function calls.
* module/mescc/armv4/as.scm (armv4:call-label): Use architecture-dependent
branch encoding.
2019-09-09 18:33:53 +02:00
Danny Milosavljevic 7b2605b347
M1: Add support for ARM-like architectures.
* module/mescc/M1.scm (hex2:offset3): Make architecture-dependent.
(info->M1): Allow symbol to be last.
2019-09-09 18:33:52 +02:00
Danny Milosavljevic d7576125d2
ARM: Add macros "call___*%r0", "call___*%r1".
* lib/arm-mes/arm.M1: Add macros "call___*%r0", "call___*%r1".
2019-09-09 18:33:52 +02:00
Danny Milosavljevic 2ad76e4ffb
ARM: Delete duplicate macros "mov____0x8(%ebp),%r0", "mov____0x8(%ebp),%r1",
"mov____0x8(%ebp),%r2".

* lib/arm-mes/arm.M1: Delete duplicate macros "mov____0x8(%ebp),%r0",
"mov____0x8(%ebp),%r1", "mov____0x8(%ebp),%r2".
2019-09-09 18:33:52 +02:00
Danny Milosavljevic d456b51e49
ARM: Delete duplicate macro "mov____0x32,%r1".
* lib/arm-mes/arm.M1: Delete duplicate macro "mov____0x32,%r1".
2019-09-09 18:33:52 +02:00
Danny Milosavljevic fc8b4016fb
ARM: Delete duplicate "je" macro.
* lib/arm-mes/arm.M1: Delete duplicate "je" macro.
2019-09-09 18:33:52 +02:00
Danny Milosavljevic 3aaf8774a8
Add ARM C runtime library.
* lib/linux/arm-mes/crt1.c: New file.
* lib/linux/arm-mes/mes.c: New file.
* lib/linux/arm-mes/mini.c: New file.
* lib/linux/libc-mini.c: Use them.
2019-09-09 18:33:52 +02:00
Jan Nieuwenhuizen 394db05c9b
ARM: mescc: Support running on mes.
* mes/module/mescc/armv4/as.mes: New file.
* mes/module/mescc/armv4/info.mes: New file.
* mes/module/mescc/mescc.mes: Include it.
2019-09-09 18:33:52 +02:00
Danny Milosavljevic 83d8e41020
Add initial ARM implementation.
* include/linux/arm/syscall.h: New file.
* lib/arm-mes/arm.M1: New file.
* lib/arm-mes/elf-0footer.hex2: New file.
* lib/arm-mes/elf32-0header.hex2: New file.
* lib/arm-mes/elf32-body-exit-42.hex2: New file.
* lib/arm-mes/elf32-footer-single-main.hex2: New file.
* lib/arm-mes/elf32-header.hex2: New file.
* lib/arm-mes-mescc/exit-42.c: New file.
* lib/arm-mes-mescc/setjmp.c: New file.
* module/mescc/armv4/as.scm: New file.
* module/mescc/armv4/info.scm: New file.
* module/mescc/M1.scm (hex2:offset2): New procedure.
* module/mescc/mescc.scm: Include (mescc armv4 info).
(hex2:offset3): New procedure.
(info->M1): Use them.
* build-aux/build-guile.sh: Compile them.
2019-09-09 18:33:51 +02:00
Jan Nieuwenhuizen 314e25e532
doc: Post-release update.
* doc/announce/ANNOUNCE-0.20: Update.
* guix/git/mes.scm (mes): Update.
2019-09-09 16:49:03 +02:00
Jan Nieuwenhuizen 5222aeee7f
Release 0.20.
* configure (VERSION): Update to 0.20.
(main): Likewise.
* configure.sh (VERSION): Likewise.
* guix/git/mes.scm (mes, mes.git): Likewise.
2019-09-09 16:42:25 +02:00
Jan Nieuwenhuizen a76b87fab9
doc: Release update.
* BLURB: New file.
* AUTHORS: Update.
* HACKING: Update.
* INSTALL: Update.
* NEWS: Update.
* README: Update.
* doc/images/gcc-mesboot-graph.dot: Update.
* doc/mes.texi: Update.
* simple.sh: Update.
* doc/announce/ANNOUNCE-0.20: New file.
2019-09-09 16:42:23 +02:00
Jan Nieuwenhuizen bc2886e8ba
guix: Update mescc-tools to 0.6.1.
* guix/git/mes.scm (mescc-tools): Update to 0.6.1.
* configure: Check for mescc-tools versions 0.6 or higher.
2019-09-09 16:42:13 +02:00
Jan Nieuwenhuizen 99903dce06
build: Create ascii signature.
* build-aux/GNUmakefile.in (sign): Create ascii signature.
2019-09-09 16:41:46 +02:00
Jan Nieuwenhuizen 507a320cb0
guix: Update Nyacc to 0.99.
* guix/git/mes.scm (nyacc): Update to 0.99.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 2ba9d89af8
doc: Add PORTING.
* PORTING: New file.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 1b47face21
doc: Typos. Thanks, dddddd.
* doc/announce/ANNOUNCE-0.11: Typo.
* doc/announce/ANNOUNCE-0.12: Typo.
* doc/announce/ANNOUNCE-0.13: Typo.
* doc/announce/ANNOUNCE-0.14: Typo.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen c1bc77a1fb
mescc: Remove dead code. Thanks Mark Weaver.
* module/mescc/compile.scm (field-size): Remove dead function.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen f33de25b96
guix: Update packaging.
* build-aux/manifest.scm (string-append):
* guix/git/mes.scm (nyacc, git-file?): Remove.
(mescc-tools): Bump to 0.6.0.
(%source-dir): New variable.
(mes.git): Ues it.
* guix.scm: Rename from .guix.scm.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 613bd96abe
build: Do not generate ChangeLog from tarball.
* configure (main): Set .git-for-build.
* build-aux/install.sh.in (DESTDIR): Use it as canary to skip
ChangeLog rebuild.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 2cc6d5a012
build: Use mesar instead of ar.
* scripts/mesar.in: Rename from ar.in.  Update users.
* build-aux/build.sh.in (LIBS): Update.
* build-aux/check.sh.in (recheck): Likwise.
* build-aux/install.sh.in (DESTDIR): Likwise.
* configure (main): Likwise.
* configure.sh (mes_system): Likwise.
* .gitignore: Update.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 3bed314d94
getopt: Remove old FSF address, thanks Vagrant.
* lib/posix/getopt.c: Remove old FSF address.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 15a39f0efe
Add missing #include.
* lib/tests/scaffold/55-char-array.c: Add missing #include.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic e2dfaef89e
Add missing #include.
* lib/tests/io/90-stat.c: Add missing #include.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 5f82a697b3
Add missing #include.
* lib/posix/getcwd.c: Add missing #include.
2019-09-09 16:04:15 +02:00
Jan Nieuwenhuizen 2db5ec2f55
signal: Use SA_RESTORER on x86-64.
* lib/linux/signal.c (signal)[x86_64]: Avoid segfault by setting
SA_RESTORER flag.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 23d857c834
signal: Add comment on why we don't use the restorer.
* lib/linux/signal.c: Add comment on why we don't use the restorer.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 4a183fa1cf
signal: Remove SA_SIGINFO.
* lib/linux/signal.c (signal): Remove SA_SIGINFO.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 3e6306a5ce
signal: Don't use custom restorer.
* lib/linux/signal.c (signal): Don't use custom restorer.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic 02fdead244
signal: Use SA_SIGINFO (like glibc).
* lib/linux/signal.c (_restorer): Rename to...
(_restorer_for_siginfo): ...this.
(signal): Use it.  Use SA_SIGINFO.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic e8bbe21499
signal: Make sure that the signal mask is actually unsigned long.
* lib/linux/signal.c (signal): Make sure that the signal mask is actually
unsigned long.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic 5754e379af
Delete "__sigmask".
Follow-up to 6d95b89759d3c598fc84194429ae8c57249daa1a

* lib/linux/signal.c (__sigmask): Delete definition.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic 3f1ba73fc7
Fix "struct sigaction" structure for rt_sigaction.
* include/signal.h (sigset_t): Increase size.
* lib/linux/signal.c (signal): Use new sigset_t.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic 181d1e11ea
Inherit CFLAGS for mes.
* build-aux/check.sh.in: Inherit CFLAGS for mes.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic dadf07a484
Fix typo.
* build-aux/build.sh.in: Fix typo in "CFLAGS".
2019-09-09 16:04:14 +02:00
Danny Milosavljevic c7d050c0cd
tests: Fail early on nonexistent file.
* lib/tests/io/90-stat.c (main): Fail early on nonexistent file.
2019-09-09 16:04:13 +02:00
Danny Milosavljevic 5a2a00f4e8
open: Check flags, and use _open2 if applicable.
* lib/linux/open.c (open): Check flags; use _open2.
2019-09-09 16:04:13 +02:00
Danny Milosavljevic 3943155a64
ldiv: Make rem < 0 if a < 0.
* lib/mes/div.c (ldiv): Make rem < 0 if a < 0.
2019-09-09 16:04:13 +02:00
Danny Milosavljevic 21bd2c1e90
ldiv: Handle a == LONG_MIN.
* lib/mes/div.c (ldiv): Handle a == LONG_MIN.
2019-09-09 16:04:13 +02:00
Jan Nieuwenhuizen 49aff4ec1c
ntoab: Use __mesabi_uldiv only for arm.
* lib/mes/ntoab.c (ntoab)[__MESC__ && __arm__]: Use __mesabi_uldiv.
* build-aux/check-mescc.sh (XFAIL_TESTS): 70-printf-simple.c and
70-printf.c now pass for x86_64 mescc.
2019-09-09 16:04:13 +02:00
Danny Milosavljevic 08774a9c74
Fix ntoab.
Follow-up to b5b19304b59fefbed923b146ec8c8d495556fa76.

* lib/mes/ntoab.c (ntoab): Fix non-MESC case.
2019-07-01 20:04:26 +02:00
Danny Milosavljevic b0466331a7
signal: Define "_restorer" everywhere except on i386.
* lib/linux/signal.c: Define "_restorer" everywhere except on i386.
2019-06-18 19:26:45 +02:00
Danny Milosavljevic 9799e4df2d
Clarify our data type choices in "struct stat".
* include/sys/stat.h: Clarify our data type choices in "struct stat".
2019-06-18 17:37:10 +02:00
Jan Nieuwenhuizen 39498d9233
test: Bump timeout.
* build-aux/test-c.sh: Bump timeout to 10s, __mesabi_uldiv can be slow.
2019-09-07 19:55:12 +02:00
Danny Milosavljevic 9b0efad295
ntoab: Use __mesabi_uldiv only on __MESC__.
* lib/mes/ntoab.c (ntoab): Use __mesabi_uldiv only on __MESC__.
2019-06-14 17:45:32 +02:00
Jan Nieuwenhuizen b8dace81c6
mescc: Mes C Library: Include mes/div.c for mescc builds.
* build-aux/configure-lib.sh (libmes_SOURCES): Add mes/div.c.
* simple.sh: Likewise.
2019-06-14 10:02:49 +02:00
Danny Milosavljevic a63b0bae44
ntoab: Include "assert.h".
* lib/mes/ntoab.c: #include "assert.h".
2019-06-14 01:27:15 +02:00
Danny Milosavljevic c35124ab54
mescc: Mes C Library: Use __mesabi_uldiv.
* lib/mes/ntoab.c (ntoab): Use __mesabi_uldiv.
2019-06-14 01:02:40 +02:00