Date: Mon, 14 Jun 2004 00:55:58 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 54876 for review Message-ID: <200406140055.i5E0tw9x017535@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54876 Change 54876 by marcel@marcel_nfs on 2004/06/14 00:55:57 o Add convenience macros to access the subfields in CFM and ar.pfs registers. o Add a convenience function (inline) to adjust a backingstore pointer by a certain amount of slots. o Make this header more friendly to userland. Affected files ... .. //depot/projects/gdb/sys/ia64/include/md_var.h#3 edit Differences ... ==== //depot/projects/gdb/sys/ia64/include/md_var.h#3 (text+ko) ==== @@ -33,6 +33,33 @@ * Miscellaneous machine-dependent declarations. */ +struct ia64_fdesc { + uint64_t func; + uint64_t gp; +}; + +#define FDESC_FUNC(fn) (((struct ia64_fdesc *) fn)->func) +#define FDESC_GP(fn) (((struct ia64_fdesc *) fn)->gp) + +/* Convenience macros to decompose CFM & ar.pfs. */ +#define IA64_CFM_SOF(x) ((x) & 0x7f) +#define IA64_CFM_SOL(x) (((x) >> 7) & 0x7f) +#define IA64_CFM_SOR(x) (((x) >> 14) & 0x0f) +#define IA64_CFM_RRB_GR(x) (((x) >> 18) & 0x7f) +#define IA64_CFM_RRB_FR(x) (((x) >> 25) & 0x7f) +#define IA64_CFM_RRB_PR(x) (((x) >> 32) & 0x3f) + +/* Concenience function (inline) to adjust backingstore pointers. */ +static __inline uint64_t +ia64_bsp_adjust(uint64_t bsp, int nslots) +{ + int bias = ((unsigned int)bsp & 0x1f8) >> 3; + nslots += (nslots + bias + 63*8) / 63 - 8; + return bsp + (nslots << 3); +} + +#ifdef _KERNEL + extern char sigcode[]; extern char esigcode[]; extern int szsigcode; @@ -43,14 +70,6 @@ struct thread; struct trapframe; -struct ia64_fdesc { - u_int64_t func; - u_int64_t gp; -}; - -#define FDESC_FUNC(fn) (((struct ia64_fdesc *) fn)->func) -#define FDESC_GP(fn) (((struct ia64_fdesc *) fn)->gp) - void busdma_swi(void); int copyout_regstack(struct thread *, uint64_t *, uint64_t *); void cpu_mp_add(u_int, u_int, u_int); @@ -70,4 +89,6 @@ void trap(int, struct trapframe *); int unaligned_fixup(struct trapframe *, struct thread *); +#endif /* _KERNEL */ + #endif /* !_MACHINE_MD_VAR_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406140055.i5E0tw9x017535>