Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/ia64/include Enhance ia64/mcontext defines



details:   https://anonhg.NetBSD.org/src/rev/50b8180b1da2
branches:  trunk
changeset: 452065:50b8180b1da2
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon Jun 17 15:08:34 2019 +0000

description:
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.

diffstat:

 sys/arch/ia64/include/mcontext.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r bad0237de31f -r 50b8180b1da2 sys/arch/ia64/include/mcontext.h
--- a/sys/arch/ia64/include/mcontext.h  Mon Jun 17 14:59:15 2019 +0000
+++ b/sys/arch/ia64/include/mcontext.h  Mon Jun 17 15:08:34 2019 +0000
@@ -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 @@
 } 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)



Home | Main Index | Thread Index | Old Index