On Fri, Mar 31, 2023 at 12:34 AM <ben.busy...@backplane.be> 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 supported), -1 (not supported) That's why the slightly complicated logic. By the way, the `shaNI` name is a misnomer, as Intel never uses "NI" to refer to their SHA instruction set, unlike the AES instruction set. _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox