mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 14:36:41 +07:00
333d1f6794
VA_TO_REG. Who ever wrote this apparently did enjoy the C Puzzle Book. ISBN 0201604612, a little old but still fun reading for the next blackout ;) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 lines
650 B
C
18 lines
650 B
C
extern int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc);
|
|
extern int do_dsemulret(struct pt_regs *xcp);
|
|
|
|
/* Instruction which will always cause an address error */
|
|
#define AdELOAD 0x8c000001 /* lw $0,1($0) */
|
|
/* Instruction which will plainly cause a CP1 exception when FPU is disabled */
|
|
#define CP1UNDEF 0x44400001 /* cfc1 $0,$0 undef */
|
|
|
|
/* Instruction inserted following the badinst to further tag the sequence */
|
|
#define BD_COOKIE 0x0000bd36 /* tne $0,$0 with baggage */
|
|
|
|
/* Setup which instruction to use for trampoline */
|
|
#ifdef STANDALONE_EMULATOR
|
|
#define BADINST CP1UNDEF
|
|
#else
|
|
#define BADINST AdELOAD
|
|
#endif
|