[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9cfcb296-9dfe-aef1-4209-20a3a95c50ba@gnuweeb.org>
Date: Tue, 22 Mar 2022 20:45:59 +0700
From: Ammar Faizi <ammarfaizi2@...weeb.org>
To: Willy Tarreau <w@....eu>, David Laight <David.Laight@...lab.com>
Cc: "Paul E. McKenney" <paulmck@...nel.org>,
Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>,
Nugraha <richiisei@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
"x86@...nel.org" <x86@...nel.org>,
"llvm@...ts.linux.dev" <llvm@...ts.linux.dev>
Subject: Re: [RFC PATCH v2 3/8] tools/nolibc: i386: Implement syscall with 6
arguments
On 3/22/22 8:41 PM, Willy Tarreau wrote:
[...]
>>> When you pushl %ebp, the %esp changes, N(%esp) no longer points to the
>>> 6-th argument.
>>
>> Yep - that is why I wrote the 'push arg6'.
>
> Got it and you're right indeed, sorry for the noise :-)
Uggh... it seems I hit a GCC bug when playing with -m32 (32-bit code).
I am on Linux x86-64. Compiling without optimization causing GCC stuck
in an endless loop with 100% CPU usage.
I will try to narrow it down and see if I can create a simple reproducer
on this issue.
ammarfaizi2@...egral2:~/work/linux.work/tools/include/nolibc$ gcc --version
gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ammarfaizi2@...egral2:~/work/linux.work/tools/include/nolibc$ time taskset -c 0 gcc -m32 -ffreestanding -nostdlib -nostartfiles test.c -o test -lgcc
^C
real 0m46.696s
user 0m0.000s
sys 0m0.002s
ammarfaizi2@...egral2:~/work/linux.work/tools/include/nolibc$ time taskset -c 0 gcc -O1 -m32 -ffreestanding -nostdlib -nostartfiles test.c -o test -lgcc
real 0m0.054s
user 0m0.046s
sys 0m0.008s
ammarfaizi2@...egral2:~/work/linux.work/tools/include/nolibc$ time taskset -c 0 gcc -O2 -m32 -ffreestanding -nostdlib -nostartfiles test.c -o test -lgcc
real 0m0.079s
user 0m0.067s
sys 0m0.012s
ammarfaizi2@...egral2:~/work/linux.work/tools/include/nolibc$ time taskset -c 0 gcc -O3 -m32 -ffreestanding -nostdlib -nostartfiles test.c -o test -lgcc
real 0m0.110s
user 0m0.097s
sys 0m0.013s
ammarfaizi2@...egral2:~/work/linux.work/tools/include/nolibc$
--
Ammar Faizi
Powered by blists - more mailing lists