Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libkern/arch/hppa Provide a __canonicalize_funcptr_f...



details:   https://anonhg.NetBSD.org/src/rev/609d7461c011
branches:  trunk
changeset: 366772:609d7461c011
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Jun 13 16:03:07 2022 +0000

description:
Provide a __canonicalize_funcptr_for_compare which only needs to return
the passed value as the kernel doesn't do PLABELS.

PR/56878 (hppa: kernel module lua fails to load)

diffstat:

 sys/lib/libkern/arch/hppa/Makefile.inc  |   3 +-
 sys/lib/libkern/arch/hppa/milli_extra.S |  42 +++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletions(-)

diffs (59 lines):

diff -r 7c7cb6169460 -r 609d7461c011 sys/lib/libkern/arch/hppa/Makefile.inc
--- a/sys/lib/libkern/arch/hppa/Makefile.inc    Mon Jun 13 16:00:05 2022 +0000
+++ b/sys/lib/libkern/arch/hppa/Makefile.inc    Mon Jun 13 16:03:07 2022 +0000
@@ -1,7 +1,8 @@
-#      $NetBSD: Makefile.inc,v 1.12 2014/03/13 16:09:11 pooka Exp $
+#      $NetBSD: Makefile.inc,v 1.13 2022/06/13 16:03:07 skrll Exp $
 
 SRCS+= milli.S
 SRCS+= bcopy.S memcpy.S memmove.S
+SRCS+= milli_extra.S
 
 # XXX: spcopy does not really belong in libkern in the first place
 .ifndef RUMPKERNEL
diff -r 7c7cb6169460 -r 609d7461c011 sys/lib/libkern/arch/hppa/milli_extra.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/lib/libkern/arch/hppa/milli_extra.S   Mon Jun 13 16:03:07 2022 +0000
@@ -0,0 +1,42 @@
+/*-
+ * Copyright (c) 2022 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nick Hudson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "machine/asm.h"
+
+
+#define        MILLI_ENTRY(x)                                  !\
+       .text ! .align 4                                !\
+       .export x, millicode ! .label x ! .proc         !\
+       .callinfo no_calls                              !\
+       .entry
+
+MILLI_ENTRY(__canonicalize_funcptr_for_compare)
+       bv      %r0(%sp)
+        copy   %arg0, %ret0
+EXIT(__canonicalize_funcptr_for_compare)



Home | Main Index | Thread Index | Old Index