mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-29 14:31:44 +00:00
basic implementation for missing functions (signbit/isless/isgreater) in
older C libraries
This commit is contained in:
parent
1713a26a3f
commit
5229b42622
@ -749,6 +749,35 @@ void powerpc_cpu::execute_stwcx(uint32 opcode)
|
||||
increment_pc(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic (and probably incorrect) implementation for missing functions
|
||||
* in older C libraries
|
||||
**/
|
||||
|
||||
#ifndef signbit
|
||||
#define signbit(X) my_signbit(X)
|
||||
#endif
|
||||
|
||||
static inline bool my_signbit(double X) {
|
||||
return X < 0.0;
|
||||
}
|
||||
|
||||
#ifndef isless
|
||||
#define isless(X, Y) my_isless(X, Y)
|
||||
#endif
|
||||
|
||||
static inline bool my_isless(double X, double Y) {
|
||||
return X < Y;
|
||||
}
|
||||
|
||||
#ifndef isgreater
|
||||
#define isgreater(X, Y) my_isgreater(X, Y)
|
||||
#endif
|
||||
|
||||
static inline bool my_isgreater(double X, double Y) {
|
||||
return X > Y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Floating-point compare instruction
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user