mescc: Mes C Library: crt: Support more than 255 command line parameters.
Reported by Paul Dersey <pdersey@gmail.com>. * lib/freebsd/x86-mes-gcc/crt1.c (_start): Use mov instead of movzbl for argc. * lib/linux/x86-mes-gcc/crt0.c (_start): Likewise. * lib/linux/x86-mes-gcc/crt1.c (_start): Likewise. * lib/freebsd/x86-mes-mescc/crt1.c (_start): Likewise. * lib/linux/x86-mes-mescc/crt1.c (_start): Likewise.
This commit is contained in:
parent
dfa8e6e9d5
commit
6c1ff75c5a
|
@ -48,7 +48,7 @@ _start ()
|
|||
asm (
|
||||
"mov %%ebp,%%eax\n\t"
|
||||
"add $4,%%eax\n\t"
|
||||
"movzbl (%%eax),%%eax\n\t"
|
||||
"mov (%%eax),%%eax\n\t"
|
||||
"add $3,%%eax\n\t"
|
||||
"shl $2,%%eax\n\t"
|
||||
"add %%ebp,%%eax\n\t"
|
||||
|
@ -64,7 +64,7 @@ _start ()
|
|||
|
||||
"mov %ebp,%eax\n\t"
|
||||
"add $4,%eax\n\t"
|
||||
"movzbl (%eax),%eax\n\t"
|
||||
"mov (%eax),%eax\n\t"
|
||||
"push %eax\n\t"
|
||||
|
||||
"call main\n\t"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2018,2019,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -37,7 +37,7 @@ _start ()
|
|||
asm ("mov____%ebp,%eax");
|
||||
asm ("add____$i8,%eax !4");
|
||||
|
||||
asm ("movzbl_(%eax),%eax");
|
||||
asm ("mov____(%eax),%eax");
|
||||
asm ("add____$i8,%eax !3");
|
||||
|
||||
asm ("shl____$i8,%eax !0x02");
|
||||
|
@ -51,7 +51,7 @@ _start ()
|
|||
|
||||
asm ("mov____%ebp,%eax");
|
||||
asm ("add____$i8,%eax !4");
|
||||
asm ("movzbl_(%eax),%eax");
|
||||
asm ("mov____(%eax),%eax");
|
||||
asm ("push___%eax");
|
||||
|
||||
main ();
|
||||
|
|
|
@ -33,7 +33,7 @@ _start ()
|
|||
asm (
|
||||
"mov %%ebp,%%eax\n\t"
|
||||
"add $4,%%eax\n\t"
|
||||
"movzbl (%%eax),%%eax\n\t"
|
||||
"mov (%%eax),%%eax\n\t"
|
||||
"add $3,%%eax\n\t"
|
||||
"shl $2,%%eax\n\t"
|
||||
"add %%ebp,%%eax\n\t"
|
||||
|
@ -48,7 +48,7 @@ _start ()
|
|||
|
||||
"mov %ebp,%eax\n\t"
|
||||
"add $4,%eax\n\t"
|
||||
"movzbl (%eax),%eax\n\t"
|
||||
"mov (%eax),%eax\n\t"
|
||||
"push %eax\n\t"
|
||||
|
||||
"call _main\n\t"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2021 Paul Dersey <pdersey@gmail.com>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -48,7 +49,7 @@ _start ()
|
|||
asm (
|
||||
"mov %%ebp,%%eax\n\t"
|
||||
"add $4,%%eax\n\t"
|
||||
"movzbl (%%eax),%%eax\n\t"
|
||||
"mov (%%eax),%%eax\n\t"
|
||||
"add $3,%%eax\n\t"
|
||||
"shl $2,%%eax\n\t"
|
||||
"add %%ebp,%%eax\n\t"
|
||||
|
@ -64,7 +65,7 @@ _start ()
|
|||
|
||||
"mov %ebp,%eax\n\t"
|
||||
"add $4,%eax\n\t"
|
||||
"movzbl (%eax),%eax\n\t"
|
||||
"mov (%eax),%eax\n\t"
|
||||
"push %eax\n\t"
|
||||
|
||||
"call main\n\t"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2018,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -37,7 +37,7 @@ _start ()
|
|||
asm ("mov____%ebp,%eax");
|
||||
asm ("add____$i8,%eax !4");
|
||||
|
||||
asm ("movzbl_(%eax),%eax");
|
||||
asm ("mov____(%eax),%eax");
|
||||
asm ("add____$i8,%eax !3");
|
||||
|
||||
asm ("shl____$i8,%eax !0x02");
|
||||
|
@ -51,7 +51,7 @@ _start ()
|
|||
|
||||
asm ("mov____%ebp,%eax");
|
||||
asm ("add____$i8,%eax !4");
|
||||
asm ("movzbl_(%eax),%eax");
|
||||
asm ("mov____(%eax),%eax");
|
||||
asm ("push___%eax");
|
||||
|
||||
main ();
|
||||
|
|
Loading…
Reference in a new issue