Merge pull request #149 from Beyley/master

gu: Add clang-friendly codepath
This commit is contained in:
Wouter Wijsman
2023-12-23 14:14:23 +01:00
committed by GitHub

View File

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