Module Name:    src
Committed By:   kamil
Date:           Mon Jun 17 15:08:34 UTC 2019

Modified Files:
        src/sys/arch/ia64/include: mcontext.h

Log Message:
Enhance ia64/mcontext defines

Stop mapping _UC_MACHINE_FP() to a register as it is not supported by CPU.
There is need to use in code __builtin_frame_address() inlined in the code
to get the frame pointer.

Return a constant value 0 instead. New value does not pretend to return
a meaningful value.

While there, fix the definition of _UC_MACHINE_SET_PC as it didn't contain
the pc argument in the definition.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/include/mcontext.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/ia64/include/mcontext.h
diff -u src/sys/arch/ia64/include/mcontext.h:1.8 src/sys/arch/ia64/include/mcontext.h:1.9
--- src/sys/arch/ia64/include/mcontext.h:1.8	Thu Apr 26 18:06:25 2018
+++ src/sys/arch/ia64/include/mcontext.h	Mon Jun 17 15:08:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.8 2018/04/26 18:06:25 scole Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.9 2019/06/17 15:08:34 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -112,10 +112,10 @@ typedef struct __mcontext {
 } mcontext_t;
 
 #define _UC_MACHINE_SP(uc)	((uc)->uc_mcontext.mc_special.sp)  /* gregs[12] */
-#define _UC_MACHINE_FP(uc)	((uc)->uc_mcontext.__gregs[79])
+#define _UC_MACHINE_FP(uc)	0 /* Not supported in target */
 #define	_UC_MACHINE_PC(uc)	((uc)->uc_mcontext.mc_special.iip)
 #define	_UC_MACHINE_INTRV(uc)	((uc)->uc_mcontext.__gregs[8])
-#define _UC_MACHINE_SET_PC(uc)  _UC_MACHINE_PC(uc) = (pc)  /* XXX */
+#define _UC_MACHINE_SET_PC(uc, pc)	(uc)->uc_mcontext.mc_special.iip = (pc)
 
 static __inline void *
 __lwp_getprivate_fast(void)

Reply via email to