162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#include <generated/user_constants.h> 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#define PT_OFFSET(r) ((r) * sizeof(long)) 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#define PT_SYSCALL_NR(regs) ((regs)[HOST_ORIG_AX]) 762306a36Sopenharmony_ci#define PT_SYSCALL_NR_OFFSET PT_OFFSET(HOST_ORIG_AX) 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#define PT_SYSCALL_RET_OFFSET PT_OFFSET(HOST_AX) 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define REGS_IP_INDEX HOST_IP 1262306a36Sopenharmony_ci#define REGS_SP_INDEX HOST_SP 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#ifdef __i386__ 1562306a36Sopenharmony_ci#define FP_SIZE ((HOST_FPX_SIZE > HOST_FP_SIZE) ? HOST_FPX_SIZE : HOST_FP_SIZE) 1662306a36Sopenharmony_ci#else 1762306a36Sopenharmony_ci#define FP_SIZE HOST_FP_SIZE 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci/* 2062306a36Sopenharmony_ci * x86_64 FC3 doesn't define this in /usr/include/linux/ptrace.h even though 2162306a36Sopenharmony_ci * it's defined in the kernel's include/linux/ptrace.h. Additionally, use the 2262306a36Sopenharmony_ci * 2.4 name and value for 2.4 host compatibility. 2362306a36Sopenharmony_ci */ 2462306a36Sopenharmony_ci#ifndef PTRACE_OLDSETOPTIONS 2562306a36Sopenharmony_ci#define PTRACE_OLDSETOPTIONS 21 2662306a36Sopenharmony_ci#endif 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci#endif 29