diff --git a/lib/linux/x86_64-mes-gcc/crt1.c b/lib/linux/x86_64-mes-gcc/crt1.c index fa066950..0000d7bf 100644 --- a/lib/linux/x86_64-mes-gcc/crt1.c +++ b/lib/linux/x86_64-mes-gcc/crt1.c @@ -29,22 +29,22 @@ void _start () { asm ( - "mov $0,%%rax\n\t" - "mov %%rax,%0\n" + "mov $0,%%eax\n\t" + "mov %%eax,%0\n" : "=r" (__stdin) : //no inputs "" ); asm ( - "mov $1,%%rax\n\t" - "mov %%rax,%0\n" + "mov $1,%%eax\n\t" + "mov %%eax,%0\n" : "=r" (__stdout) : //no inputs "" ); asm ( - "mov $2,%%rax\n\t" - "mov %%rax,%0\n" + "mov $2,%%eax\n\t" + "mov %%eax,%0\n" : "=r" (__stderr) : //no inputs "" ); diff --git a/lib/linux/x86_64-mes/crt1.c b/lib/linux/x86_64-mes/crt1.c index 0161c93b..35d33c27 100644 --- a/lib/linux/x86_64-mes/crt1.c +++ b/lib/linux/x86_64-mes/crt1.c @@ -25,13 +25,13 @@ int _start () { asm ("mov____$i8,%rax !0"); - asm ("mov____%rax,0x32 &__stdin"); + asm ("movl___%eax,0x32 &__stdin"); asm ("mov____$i8,%rax !1"); - asm ("mov____%rax,0x32 &__stdout"); + asm ("movl___%eax,0x32 &__stdout"); asm ("mov____$i8,%rax !2"); - asm ("mov____%rax,0x32 &__stderr"); + asm ("movl___%eax,0x32 &__stderr"); #if 0 //MES_CCAMD64 asm ("add____$i32,%rbp %0x80"); // FIXME: corresponds to x86_64/as.scm function-preamble-fu