blob: ae8aa4b0536fb2033c1104ebee41b6ced73858ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* Copyright 2017 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "common.h"
/*
* __builtin_ffs:
* Returns one plus the index of the least significant 1-bit of x,
* or if x is zero, returns zero.
*/
int __keep __ffssi2(int x)
{
return 32 - __builtin_clz(x & -x);
}
|