WIP ahci get building on riscv which seems to not have a ffs() implementation in libgcc

This commit is contained in:
Travis Geiselbrecht
2022-02-06 16:03:02 -08:00
committed by Travis Geiselbrecht
parent 28e8bf546e
commit f16fd2e9c6

View File

@@ -156,7 +156,7 @@ int ahci_port::find_free_cmdslot() {
return -1;
}
int avail = __builtin_ffs(~all_slots) - 1;
int avail = __builtin_clz(~all_slots);
LTRACEF("avail %u\n", avail);
return avail;