Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 4 files changed
  • 0 comments
  • 1 contributor
Apr 07, 2013
Yann Sionneau Fix mutex related link issue
lm32 port of NetBSD will use (at least for now)
generic C mutex implementation.

If more performance is needed, an lm32 assembly stub implementation
can be done.
461f181
Yann Sionneau Fix libcc related link issue, at last
lm32 arch does not support quad operations.
This is now well defined in libkern Makefile.
9d7eeea
2  sys/arch/lm32/include/mutex.h
@@ -52,8 +52,6 @@ struct kmutex {
52 52
 #define	mtx_ipl 			u.s.mtxs_ipl
53 53
 #define	mtx_lock			u.s.mtxs_lock
54 54
 
55  
-#define __HAVE_MUTEX_STUBS		1
56  
-#define __HAVE_SPIN_MUTEX_STUBS		1
57 55
 #define	__HAVE_SIMPLE_MUTEXES		1
58 56
 
59 57
 /*
3  sys/lib/libkern/Makefile.libkern
@@ -48,8 +48,7 @@ CPPFLAGS+=	-I${KERNDIR}/../../../common/include
48 48
     (${MACHINE_ARCH} != "mips64el" || !empty(CFLAGS:M-mabi=32)) && \
49 49
     (${MACHINE_ARCH} != "powerpc64") && \
50 50
     (${MACHINE_ARCH} != "sparc64") && \
51  
-    (${MACHINE_ARCH} != "x86_64" || !empty(CFLAGS:M-m32)) && \
52  
-    (${MACHINE_ARCH} != "lm32")
  51
+    (${MACHINE_ARCH} != "x86_64" || !empty(CFLAGS:M-m32))
53 52
 # Quad support
54 53
 SRCS+=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
55 54
 	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
8  sys/lib/libkern/arch/lm32/libgcc2.c
@@ -510,6 +510,8 @@ __ffsSI2 (UWtype u)
510 510
   return count + 1;
511 511
 }
512 512
 #endif
  513
+
  514
+#if 0
513 515
 DWtype __muldi3 (DWtype u, DWtype v)
514 516
 {
515 517
   const DWunion uu = {.ll = u};
@@ -521,6 +523,7 @@ DWtype __muldi3 (DWtype u, DWtype v)
521 523
 
522 524
   return w.ll;
523 525
 }
  526
+#endif
524 527
 #if (defined (L_udivdi3) || defined (L_divdi3) || \
525 528
      defined (L_umoddi3) || defined (L_moddi3))
526 529
 #if defined (sdiv_qrnnd)
@@ -1066,6 +1069,7 @@ __moddi3 (DWtype u, DWtype v)
1066 1069
 }
1067 1070
 #endif
1068 1071
 
  1072
+#if 0
1069 1073
 UDWtype
1070 1074
 __umoddi3 (UDWtype u, UDWtype v)
1071 1075
 {
@@ -1075,12 +1079,16 @@ __umoddi3 (UDWtype u, UDWtype v)
1075 1079
 
1076 1080
   return w;
1077 1081
 }
  1082
+#endif
1078 1083
 
  1084
+#if 0
1079 1085
 UDWtype
1080 1086
 __udivdi3 (UDWtype n, UDWtype d)
1081 1087
 {
1082 1088
   return __udivmoddi4 (n, d, (UDWtype *) 0);
1083 1089
 }
  1090
+#endif
  1091
+
1084 1092
 #ifdef L_cmpdi2
1085 1093
 cmp_return_type
1086 1094
 __cmpdi2 (DWtype a, DWtype b)
6  sys/lib/libkern/arch/lm32/libgcc_lm32.h
@@ -47,9 +47,9 @@ SItype __divsi3 (SItype a, SItype b);
47 47
 SItype __modsi3 (SItype a, SItype b);
48 48
 USItype __udivsi3 (USItype a, USItype b);
49 49
 USItype __umodsi3 (USItype a, USItype b);
50  
-DWtype __muldi3 (DWtype u, DWtype v);
51  
-//DWtype __moddi3 (DWtype u, DWtype v);
52  
-//UDWtype __udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp);
  50
+extern DWtype __muldi3 (DWtype u, DWtype v);
  51
+extern UDWtype __umoddi3 (UDWtype, UDWtype);
  52
+extern UDWtype __udivdi3 (UDWtype, UDWtype);
53 53
 
54 54
 // big endian
55 55
 struct DWstruct {

No commit comments for this range

Something went wrong with that request. Please try again.