Re: sha256sum Illegal instruction on musl amd64

2023-03-30 Thread ben . busybox
On 31 Mar 2023, at 2:29 AM, Kang-Che Sung wrote: > On Fri, Mar 31, 2023 at 12:34 AM wrote: >> shaNI = ((ebx >> 28) & 2) - 1; /* bit 29 -> 1 or -1 */ >> >> Seems a lot more complicated than intel's approach: >> >> shaNI = ((ebx >> 29) & 1); > The `shaNI` variable is not a boolean, but has three

Re: sha256sum Illegal instruction on musl amd64

2023-03-30 Thread Kang-Che Sung
On Fri, Mar 31, 2023 at 12:34 AM wrote: > > shaNI = ((ebx >> 28) & 2) - 1; /* bit 29 -> 1 or -1 */ > > Seems a lot more complicated than intel's approach: > > shaNI = ((ebx >> 29) & 1); > The `shaNI` variable is not a boolean, but has three possible values: 0 (undetermined), 1 (SHA instructions

Re: sha256sum Illegal instruction on musl amd64

2023-03-30 Thread ben . busybox
The bug report says the 8171M and 8272CL have the problem. After applying the simple Intel approach Natanael is referring to, I was able to run on the 8171M (I have a run log to confirm it). I used the patch from the bug report: https://bugs.busybox.net/show_bug.cgi?id=15236 shaNI = ((ebx >>

Re: sha256sum Illegal instruction on musl amd64

2023-03-30 Thread Natanael Copa
On Wed, 29 Mar 2023 15:07:49 +0200 Denys Vlasenko wrote: > On Wed, Mar 1, 2023 at 12:01*PM alice wrote: > > On Tue Feb 28, 2023 at 11:17 PM CET, wrote: > > > I'm having an intermittent issue with "BusyBox v1.36.0 (2023-01-03 > > > 22:49:12 > > > UTC)" (the one from the Docker image

[PATCH 2/1] readlink: slight size optimization

2023-03-30 Thread Eric Blake
Exploit the value of the flag for -n to reduce the compiled size of readlink_main() from 79 to 76 bytes on x86_64. Signed-off-by: Eric Blake --- coreutils/readlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreutils/readlink.c b/coreutils/readlink.c index

[PATCH] ash: improve trap and jobs builtins in child shells

2023-03-30 Thread Ron Yorston
The trap and jobs builtins can be used to report information about traps and jobs. This works when they're called from the current shell but in a child shell the required information is usually cleared. Special hacks allow: - trap to work with command substitution; - jobs to work with command