mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
JPAExtraShape
This commit is contained in:
+19
-1
@@ -304,4 +304,22 @@ inline void* OSPhysicalToCached(u32 offset) {
|
||||
return (void*)(offset + 0x80000000);
|
||||
}
|
||||
|
||||
#endif
|
||||
static inline u8 __OSf32tou8(register f32 src) {
|
||||
f32 tmp;
|
||||
register f32 *p = &tmp;
|
||||
register u8 ret;
|
||||
|
||||
asm
|
||||
{
|
||||
psq_st src, 0(p), 1, 2
|
||||
lbz ret, 0(p)
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void OSf32tou8(register f32* src, volatile register u8* dst) {
|
||||
*dst = __OSf32tou8(*src);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user