Skip to content

Commit

Permalink
FIX: aarch64 magic parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
lacraig2 committed Oct 23, 2024
1 parent a2274c7 commit 9f1c5ef
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions panda/plugins/hypercaller/hypercaller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,16 @@ void unregister_hypercall(uint32_t magic){
uint32_t get_magic(CPUState *cpu){
uint32_t magic;
CPUArchState * env = (CPUArchState *)cpu->env_ptr;
#if defined(TARGET_AARCH64)
//XR
magic = env->xregs[8];
#elif defined(TARGET_ARM)

#if defined(TARGET_ARM)
// r7
magic = env->regs[7];
#if defined(TARGET_AARCH64)
if (env->aarch64 != 0){
// XR
magic = env->xregs[8];
}
#endif
#elif defined(TARGET_MIPS)
// V0
magic = env->active_tc.gpr[2];
Expand Down

0 comments on commit 9f1c5ef

Please sign in to comment.