mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-21 00:31:50 +00:00
forgot to commit this __op_PARAM? change
This commit is contained in:
parent
9e64c3af94
commit
a2e0cc10c0
@ -72,44 +72,35 @@
|
|||||||
|
|
||||||
#ifdef __alpha__
|
#ifdef __alpha__
|
||||||
/* Suggested by Richard Henderson. This will result in code like
|
/* Suggested by Richard Henderson. This will result in code like
|
||||||
ldah $0,__op_param1($29) !gprelhigh
|
ldah $0,__op_PARAM1($29) !gprelhigh
|
||||||
lda $0,__op_param1($0) !gprellow
|
lda $0,__op_PARAM1($0) !gprellow
|
||||||
We can then conveniently change $29 to $31 and adapt the offsets to
|
We can then conveniently change $29 to $31 and adapt the offsets to
|
||||||
emit the appropriate constant. */
|
emit the appropriate constant. */
|
||||||
#define PARAM1 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param1)); _r; })
|
#define PARAM1 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_PARAM1)); _r; })
|
||||||
#define PARAM2 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param2)); _r; })
|
#define PARAM2 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_PARAM2)); _r; })
|
||||||
#define PARAM3 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param3)); _r; })
|
#define PARAM3 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_PARAM3)); _r; })
|
||||||
extern int __op_param1 __hidden;
|
extern int __op_PARAM1 __hidden;
|
||||||
extern int __op_param2 __hidden;
|
extern int __op_PARAM2 __hidden;
|
||||||
extern int __op_param3 __hidden;
|
extern int __op_PARAM3 __hidden;
|
||||||
#elif defined __mips__
|
#elif defined __mips__
|
||||||
/* On MIPS, parameters to a C expression are passed via the global pointer.
|
/* On MIPS, parameters to a C expression are passed via the global pointer.
|
||||||
* We don't want that. */
|
* We don't want that. */
|
||||||
#define PARAMN(index) ({ register int _r; \
|
#define PARAMN(index) ({ register int _r; \
|
||||||
asm("lui %0,%%hi(__op_param" #index ")\n\t" \
|
asm("lui %0,%%hi(__op_PARAM" #index ")\n\t" \
|
||||||
"ori %0,%0,%%lo(__op_param" #index ")" \
|
"ori %0,%0,%%lo(__op_PARAM" #index ")" \
|
||||||
: "=r"(_r)); _r; })
|
: "=r"(_r)); _r; })
|
||||||
#define PARAM1 PARAMN(1)
|
#define PARAM1 PARAMN(1)
|
||||||
#define PARAM2 PARAMN(2)
|
#define PARAM2 PARAMN(2)
|
||||||
#define PARAM3 PARAMN(3)
|
#define PARAM3 PARAMN(3)
|
||||||
#else
|
#else
|
||||||
#if defined(__APPLE__) && defined(__MACH__)
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
static int __op_param1, __op_param2, __op_param3;
|
static int __op_PARAM1, __op_PARAM2, __op_PARAM3;
|
||||||
#else
|
#else
|
||||||
extern int __op_param1, __op_param2, __op_param3;
|
extern int __op_PARAM1, __op_PARAM2, __op_PARAM3;
|
||||||
#endif
|
#endif
|
||||||
#define PARAM1 ((long)(&__op_param1))
|
#define PARAM1 ((long)(&__op_PARAM1))
|
||||||
#define PARAM2 ((long)(&__op_param2))
|
#define PARAM2 ((long)(&__op_PARAM2))
|
||||||
#define PARAM3 ((long)(&__op_param3))
|
#define PARAM3 ((long)(&__op_PARAM3))
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef REG_CPU
|
|
||||||
#if defined(__APPLE__) && defined(__MACH__)
|
|
||||||
static int __op_cpuparam;
|
|
||||||
#else
|
|
||||||
extern int __op_cpuparam;
|
|
||||||
#endif
|
|
||||||
#define CPUPARAM ((long)(&__op_cpuparam))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Direct block chaining support
|
// Direct block chaining support
|
||||||
|
Loading…
x
Reference in New Issue
Block a user