Use builtin_clz on all codepaths

This commit is contained in:
Beyley Thomas
2023-12-22 09:45:10 -08:00
parent 04756ae9bc
commit a5473d0451

View File

@@ -14,13 +14,7 @@ static int tsizecmd_tbl[8] = { 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf };
int getExp(int val)
{
#ifndef __clang__
unsigned int i;
asm("clz %0, %1\n":"=r"(i):"r"(val&0x3FF));
return 31-i;
#else
return 31 - __builtin_clz(val & 0x3FF);
#endif
}
void sceGuTexImage(int mipmap, int width, int height, int tbw, const void* tbp)