mirror of https://github.com/xemu-project/xemu.git
exec: Move user-only watchpoint stubs inline
Let the user-only watchpoint stubs resolve to empty inline functions. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
ccdb4c5535
commit
74841f044e
26
exec.c
26
exec.c
|
@ -1062,28 +1062,7 @@ static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_USER_ONLY)
|
#ifndef CONFIG_USER_ONLY
|
||||||
void cpu_watchpoint_remove_all(CPUState *cpu, int mask)
|
|
||||||
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, vaddr len,
|
|
||||||
int flags)
|
|
||||||
{
|
|
||||||
return -ENOSYS;
|
|
||||||
}
|
|
||||||
|
|
||||||
void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
|
|
||||||
int flags, CPUWatchpoint **watchpoint)
|
|
||||||
{
|
|
||||||
return -ENOSYS;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
/* Add a watchpoint. */
|
/* Add a watchpoint. */
|
||||||
int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
|
int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
|
||||||
int flags, CPUWatchpoint **watchpoint)
|
int flags, CPUWatchpoint **watchpoint)
|
||||||
|
@ -1173,8 +1152,7 @@ static inline bool cpu_watchpoint_address_matches(CPUWatchpoint *wp,
|
||||||
|
|
||||||
return !(addr > wpend || wp->vaddr > addrend);
|
return !(addr > wpend || wp->vaddr > addrend);
|
||||||
}
|
}
|
||||||
|
#endif /* !CONFIG_USER_ONLY */
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add a breakpoint. */
|
/* Add a breakpoint. */
|
||||||
int cpu_breakpoint_insert(CPUState *cpu, vaddr pc, int flags,
|
int cpu_breakpoint_insert(CPUState *cpu, vaddr pc, int flags,
|
||||||
|
|
|
@ -1070,12 +1070,35 @@ static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_USER_ONLY
|
||||||
|
static inline int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
|
||||||
|
int flags, CPUWatchpoint **watchpoint)
|
||||||
|
{
|
||||||
|
return -ENOSYS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int cpu_watchpoint_remove(CPUState *cpu, vaddr addr,
|
||||||
|
vaddr len, int flags)
|
||||||
|
{
|
||||||
|
return -ENOSYS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void cpu_watchpoint_remove_by_ref(CPUState *cpu,
|
||||||
|
CPUWatchpoint *wp)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void cpu_watchpoint_remove_all(CPUState *cpu, int mask)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#else
|
||||||
int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
|
int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
|
||||||
int flags, CPUWatchpoint **watchpoint);
|
int flags, CPUWatchpoint **watchpoint);
|
||||||
int cpu_watchpoint_remove(CPUState *cpu, vaddr addr,
|
int cpu_watchpoint_remove(CPUState *cpu, vaddr addr,
|
||||||
vaddr len, int flags);
|
vaddr len, int flags);
|
||||||
void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint);
|
void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint);
|
||||||
void cpu_watchpoint_remove_all(CPUState *cpu, int mask);
|
void cpu_watchpoint_remove_all(CPUState *cpu, int mask);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cpu_get_address_space:
|
* cpu_get_address_space:
|
||||||
|
|
Loading…
Reference in New Issue