[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCHv4 16/43] uk/arch: Implement ukarch_find_lsbit for Arm64



Hi,

On 13/07/18 10:20, Wei Chen wrote:
+#ifndef __UKARCH_ATOMIC_H__
+#error Do not include this header directly
+#endif
+

For finding the lsbit shouldn't we use the builtin function
__builtin_ffs, __builtin_ffsl?

AFAICT __builtin_ffs is GNU-ism. Do we really want to tie ourself to it? Also, do you know if that is supported correctly on all GCC versions we targets?



When I was implementing the ukarch_find_lsbit, I found both Arm32 and
X86_64 were not using the builtin-functions. X86_64 is using "bsfq",
Arm32 is using the same instructions as Arm64.
To be honest, I would keep the implement as it is.

Cheers,

--
Julien Grall

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.