COMMON_DIR:=${.PARSEDIR}
.if defined(__MINIX)
-COMMON_CODEDIRS=atomic gen inet md net quad stdlib string
+COMMON_CODEDIRS=atomic gen inet md net stdlib string
.else
COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string sys
.endif
+++ /dev/null
-/* $NetBSD: divide.S,v 1.4 2013/08/19 03:47:06 matt Exp $ */
-
-/*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- */
-
-#ifndef __ARM_ARCH_EXT_IDIV__
-
-#include <machine/asm.h>
-
-/*
- * stack is aligned as there's a possibility of branching to .L_overflow
- * which makes a C call
- */
-
-_ARM_ENTRY(__udivide) /* r0 = r0 / r1; r1 = r0 % r1 */
- eor r0, r1, r0
- eor r1, r0, r1
- eor r0, r1, r0
- /* r0 = r1 / r0; r1 = r1 % r0 */
- cmp r0, #1
- bcc .L_overflow
- beq .L_divide_l0
- mov ip, #0
- movs r1, r1
- bpl .L_divide_l1
- orr ip, ip, #0x20000000 /* ip bit 0x20000000 = -ve r1 */
- movs r1, r1, lsr #1
- orrcs ip, ip, #0x10000000 /* ip bit 0x10000000 = bit 0 of r1 */
- b .L_divide_l1
-
-.L_divide_l0: /* r0 == 1 */
- mov r0, r1
- mov r1, #0
- RET
-END(__udivide)
-
-_ARM_ENTRY(__divide) /* r0 = r0 / r1; r1 = r0 % r1 */
- eor r0, r1, r0
- eor r1, r0, r1
- eor r0, r1, r0
- /* r0 = r1 / r0; r1 = r1 % r0 */
- cmp r0, #1
- bcc .L_overflow
- beq .L_divide_l0
- ands ip, r0, #0x80000000
- rsbmi r0, r0, #0
- ands r2, r1, #0x80000000
- eor ip, ip, r2
- rsbmi r1, r1, #0
- orr ip, r2, ip, lsr #1 /* ip bit 0x40000000 = -ve division */
- /* ip bit 0x80000000 = -ve remainder */
-
-.L_divide_l1:
- mov r2, #1
- mov r3, #0
-
- /*
- * If the highest bit of the dividend is set, we have to be
- * careful when shifting the divisor. Test this.
- */
- movs r1,r1
- bpl .L_old_code
-
- /*
- * At this point, the highest bit of r1 is known to be set.
- * We abuse this below in the tst instructions.
- */
- tst r1, r0 /*, lsl #0 */
- bmi .L_divide_b1
- tst r1, r0, lsl #1
- bmi .L_divide_b2
- tst r1, r0, lsl #2
- bmi .L_divide_b3
- tst r1, r0, lsl #3
- bmi .L_divide_b4
- tst r1, r0, lsl #4
- bmi .L_divide_b5
- tst r1, r0, lsl #5
- bmi .L_divide_b6
- tst r1, r0, lsl #6
- bmi .L_divide_b7
- tst r1, r0, lsl #7
- bmi .L_divide_b8
- tst r1, r0, lsl #8
- bmi .L_divide_b9
- tst r1, r0, lsl #9
- bmi .L_divide_b10
- tst r1, r0, lsl #10
- bmi .L_divide_b11
- tst r1, r0, lsl #11
- bmi .L_divide_b12
- tst r1, r0, lsl #12
- bmi .L_divide_b13
- tst r1, r0, lsl #13
- bmi .L_divide_b14
- tst r1, r0, lsl #14
- bmi .L_divide_b15
- tst r1, r0, lsl #15
- bmi .L_divide_b16
- tst r1, r0, lsl #16
- bmi .L_divide_b17
- tst r1, r0, lsl #17
- bmi .L_divide_b18
- tst r1, r0, lsl #18
- bmi .L_divide_b19
- tst r1, r0, lsl #19
- bmi .L_divide_b20
- tst r1, r0, lsl #20
- bmi .L_divide_b21
- tst r1, r0, lsl #21
- bmi .L_divide_b22
- tst r1, r0, lsl #22
- bmi .L_divide_b23
- tst r1, r0, lsl #23
- bmi .L_divide_b24
- tst r1, r0, lsl #24
- bmi .L_divide_b25
- tst r1, r0, lsl #25
- bmi .L_divide_b26
- tst r1, r0, lsl #26
- bmi .L_divide_b27
- tst r1, r0, lsl #27
- bmi .L_divide_b28
- tst r1, r0, lsl #28
- bmi .L_divide_b29
- tst r1, r0, lsl #29
- bmi .L_divide_b30
- tst r1, r0, lsl #30
- bmi .L_divide_b31
-/*
- * instead of:
- * tst r1, r0, lsl #31
- * bmi .L_divide_b32
- */
- b .L_divide_b32
-
-.L_old_code:
- cmp r1, r0
- bcc .L_divide_b0
- cmp r1, r0, lsl #1
- bcc .L_divide_b1
- cmp r1, r0, lsl #2
- bcc .L_divide_b2
- cmp r1, r0, lsl #3
- bcc .L_divide_b3
- cmp r1, r0, lsl #4
- bcc .L_divide_b4
- cmp r1, r0, lsl #5
- bcc .L_divide_b5
- cmp r1, r0, lsl #6
- bcc .L_divide_b6
- cmp r1, r0, lsl #7
- bcc .L_divide_b7
- cmp r1, r0, lsl #8
- bcc .L_divide_b8
- cmp r1, r0, lsl #9
- bcc .L_divide_b9
- cmp r1, r0, lsl #10
- bcc .L_divide_b10
- cmp r1, r0, lsl #11
- bcc .L_divide_b11
- cmp r1, r0, lsl #12
- bcc .L_divide_b12
- cmp r1, r0, lsl #13
- bcc .L_divide_b13
- cmp r1, r0, lsl #14
- bcc .L_divide_b14
- cmp r1, r0, lsl #15
- bcc .L_divide_b15
- cmp r1, r0, lsl #16
- bcc .L_divide_b16
- cmp r1, r0, lsl #17
- bcc .L_divide_b17
- cmp r1, r0, lsl #18
- bcc .L_divide_b18
- cmp r1, r0, lsl #19
- bcc .L_divide_b19
- cmp r1, r0, lsl #20
- bcc .L_divide_b20
- cmp r1, r0, lsl #21
- bcc .L_divide_b21
- cmp r1, r0, lsl #22
- bcc .L_divide_b22
- cmp r1, r0, lsl #23
- bcc .L_divide_b23
- cmp r1, r0, lsl #24
- bcc .L_divide_b24
- cmp r1, r0, lsl #25
- bcc .L_divide_b25
- cmp r1, r0, lsl #26
- bcc .L_divide_b26
- cmp r1, r0, lsl #27
- bcc .L_divide_b27
- cmp r1, r0, lsl #28
- bcc .L_divide_b28
- cmp r1, r0, lsl #29
- bcc .L_divide_b29
- cmp r1, r0, lsl #30
- bcc .L_divide_b30
-.L_divide_b32:
- cmp r1, r0, lsl #31
- subhs r1, r1,r0, lsl #31
- addhs r3, r3,r2, lsl #31
-.L_divide_b31:
- cmp r1, r0, lsl #30
- subhs r1, r1,r0, lsl #30
- addhs r3, r3,r2, lsl #30
-.L_divide_b30:
- cmp r1, r0, lsl #29
- subhs r1, r1,r0, lsl #29
- addhs r3, r3,r2, lsl #29
-.L_divide_b29:
- cmp r1, r0, lsl #28
- subhs r1, r1,r0, lsl #28
- addhs r3, r3,r2, lsl #28
-.L_divide_b28:
- cmp r1, r0, lsl #27
- subhs r1, r1,r0, lsl #27
- addhs r3, r3,r2, lsl #27
-.L_divide_b27:
- cmp r1, r0, lsl #26
- subhs r1, r1,r0, lsl #26
- addhs r3, r3,r2, lsl #26
-.L_divide_b26:
- cmp r1, r0, lsl #25
- subhs r1, r1,r0, lsl #25
- addhs r3, r3,r2, lsl #25
-.L_divide_b25:
- cmp r1, r0, lsl #24
- subhs r1, r1,r0, lsl #24
- addhs r3, r3,r2, lsl #24
-.L_divide_b24:
- cmp r1, r0, lsl #23
- subhs r1, r1,r0, lsl #23
- addhs r3, r3,r2, lsl #23
-.L_divide_b23:
- cmp r1, r0, lsl #22
- subhs r1, r1,r0, lsl #22
- addhs r3, r3,r2, lsl #22
-.L_divide_b22:
- cmp r1, r0, lsl #21
- subhs r1, r1,r0, lsl #21
- addhs r3, r3,r2, lsl #21
-.L_divide_b21:
- cmp r1, r0, lsl #20
- subhs r1, r1,r0, lsl #20
- addhs r3, r3,r2, lsl #20
-.L_divide_b20:
- cmp r1, r0, lsl #19
- subhs r1, r1,r0, lsl #19
- addhs r3, r3,r2, lsl #19
-.L_divide_b19:
- cmp r1, r0, lsl #18
- subhs r1, r1,r0, lsl #18
- addhs r3, r3,r2, lsl #18
-.L_divide_b18:
- cmp r1, r0, lsl #17
- subhs r1, r1,r0, lsl #17
- addhs r3, r3,r2, lsl #17
-.L_divide_b17:
- cmp r1, r0, lsl #16
- subhs r1, r1,r0, lsl #16
- addhs r3, r3,r2, lsl #16
-.L_divide_b16:
- cmp r1, r0, lsl #15
- subhs r1, r1,r0, lsl #15
- addhs r3, r3,r2, lsl #15
-.L_divide_b15:
- cmp r1, r0, lsl #14
- subhs r1, r1,r0, lsl #14
- addhs r3, r3,r2, lsl #14
-.L_divide_b14:
- cmp r1, r0, lsl #13
- subhs r1, r1,r0, lsl #13
- addhs r3, r3,r2, lsl #13
-.L_divide_b13:
- cmp r1, r0, lsl #12
- subhs r1, r1,r0, lsl #12
- addhs r3, r3,r2, lsl #12
-.L_divide_b12:
- cmp r1, r0, lsl #11
- subhs r1, r1,r0, lsl #11
- addhs r3, r3,r2, lsl #11
-.L_divide_b11:
- cmp r1, r0, lsl #10
- subhs r1, r1,r0, lsl #10
- addhs r3, r3,r2, lsl #10
-.L_divide_b10:
- cmp r1, r0, lsl #9
- subhs r1, r1,r0, lsl #9
- addhs r3, r3,r2, lsl #9
-.L_divide_b9:
- cmp r1, r0, lsl #8
- subhs r1, r1,r0, lsl #8
- addhs r3, r3,r2, lsl #8
-.L_divide_b8:
- cmp r1, r0, lsl #7
- subhs r1, r1,r0, lsl #7
- addhs r3, r3,r2, lsl #7
-.L_divide_b7:
- cmp r1, r0, lsl #6
- subhs r1, r1,r0, lsl #6
- addhs r3, r3,r2, lsl #6
-.L_divide_b6:
- cmp r1, r0, lsl #5
- subhs r1, r1,r0, lsl #5
- addhs r3, r3,r2, lsl #5
-.L_divide_b5:
- cmp r1, r0, lsl #4
- subhs r1, r1,r0, lsl #4
- addhs r3, r3,r2, lsl #4
-.L_divide_b4:
- cmp r1, r0, lsl #3
- subhs r1, r1,r0, lsl #3
- addhs r3, r3,r2, lsl #3
-.L_divide_b3:
- cmp r1, r0, lsl #2
- subhs r1, r1,r0, lsl #2
- addhs r3, r3,r2, lsl #2
-.L_divide_b2:
- cmp r1, r0, lsl #1
- subhs r1, r1,r0, lsl #1
- addhs r3, r3,r2, lsl #1
-.L_divide_b1:
- cmp r1, r0
- subhs r1, r1, r0
- addhs r3, r3, r2
-.L_divide_b0:
-
- tst ip, #0x20000000
- bne .L_udivide_l1
- mov r0, r3
- cmp ip, #0
- rsbmi r1, r1, #0
- movs ip, ip, lsl #1
- bicmi r0, r0, #0x80000000 /* Fix incase we divided 0x80000000 */
- rsbmi r0, r0, #0
- RET
-
-.L_udivide_l1:
- tst ip, #0x10000000
- mov r1, r1, lsl #1
- orrne r1, r1, #1
- mov r3, r3, lsl #1
- cmp r1, r0
- subhs r1, r1, r0
- addhs r3, r3, r2
- mov r0, r3
- RET
-
-.L_overflow:
-#if !defined(_KERNEL) && !defined(_STANDALONE)
-#ifdef __ARM_EABI__
- mov r0, r1 /* return quotient */
- b PLT_SYM(__aeabi_idiv0)
-#else
- mov r0, #8 /* SIGFPE */
- bl PLT_SYM(_C_LABEL(raise)) /* raise it */
- mov r0, #0
- RET
-#endif
-#else
- /* XXX should cause a fatal error */
- mvn r0, #0
- RET
-#endif
-
-END(__divide)
-
-#endif /* __ARM_ARCH_EXT_IDIV__ */
+++ /dev/null
-/* $NetBSD: divsi3.S,v 1.13 2013/09/12 15:36:14 joerg Exp $ */
-
-/*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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>
-
-#if defined(__thumb__) && !defined(_ARM_ARCH_T2)
-ARM_ENTRY(__divsi3)
-#else
-ENTRY(__divsi3)
-#endif
-#if defined(__ARM_ARCH_EXT_IDIV__)
-# if defined(__ARM_EABI__)
- mov r3, r0 @ save for mls
-# endif
- sdiv r0, r0, r1
-# if defined(__ARM_EABI__)
- mls r1, r0, r1, r3 @ return modulus in r1
-# endif
- RET
-#elif defined(__ARM_EABI__) && defined(_LIBC)
- cmp r1, #0 @ dividing by 0?
- beq .Ldiv0 @ call __aeabi_idiv0
- ldr r2, .Lhwdiv_present
-#ifdef __PIC__
- add r2, r2, pc @ pc = &.LPIC0
-# endif
- ldr r2, [r2]
-.LPIC0: cmp r2, #0
- beq __divide
- mov r3, r0
-# if defined(__ARM_ARCH_EXT_IDIV__)
- sdiv r0, r0, r1
- mls r1, r0, r1, r3 @ return modulus in r1
-# elif defined(__thumb__) && defined(_ARM_ARCH_T2)
- .inst.w 0xfb90f0f1
- .inst.w 0xfb003111
-# else
- .inst 0xe710f110
- .inst 0xe0613190
-# endif
- RET
-
- .align 0
-.Lhwdiv_present:
- .word REL_SYM(_libc_arm_hwdiv_present, .LPIC0)
-
- .align 0
-.Ldiv0: push {r0, lr} /* save r0 */
- cmp r0, #0
- mvnge r0, #0x80000000 /* INT_MAX = 0x7fffffff */
- movlt r0, #0x80000000 /* INT_MIN = 0x80000000 */
- bl _C_LABEL(__aeabi_idiv0)
- pop {r1, pc} /* restore r0 as r1 */
-#else /* !__ARM_EABI__ */
- b __divide
-#endif
-END(__divsi3)
-
-#if defined(__ARM_EABI__)
-STRONG_ALIAS(__aeabi_idivmod, __divsi3)
-STRONG_ALIAS(__aeabi_idiv, __divsi3)
-#if defined(PIC_SYMVER)
- .symver __aeabi_idiv,__aeabi_idiv@@GCC_3.5
- .symver __aeabi_idivmod,__aeabi_idivmod@@GCC_3.5
-#endif
-#endif
+++ /dev/null
-/* $NetBSD: modsi3.S,v 1.4 2013/08/15 21:40:11 matt Exp $ */
-
-/*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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>
-
-#ifndef __ARM_EABI__
-/*
- * stack is aligned as there's a possibility of branching to .L_overflow
- * which makes a C call
- */
-
-ENTRY(__modsi3)
-#ifdef __ARM_ARCH_EXT_IDIV__
- sdiv r3, r0, r1
- mls r0, r3, r1, r0
-#else
- str lr, [sp, #-8]! /* push lr */
- bl PIC_SYM(__divsi3, PLT)
- mov r0, r1
- ldr lr, [sp], #8 /* pop lr */
-#endif
- RET
-END(__modsi3)
-
-#endif
+++ /dev/null
-/* $NetBSD: udivsi3.S,v 1.9 2013/09/12 15:36:14 joerg Exp $ */
-
-/*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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>
-
-#if defined(__ARM_EABI__) && defined(__thumb__) && !defined(_ARM_ARCH_T2)
-ARM_ENTRY(__udivsi3)
-#else
-ENTRY(__udivsi3)
-#endif
-#if defined(__ARM_ARCH_EXT_IDIV__)
-# if defined(__ARM_EABI__)
- mov r3, r0 @ save for mls
-# endif
- udiv r0, r0, r1
-# if defined(__ARM_EABI__)
- mls r1, r0, r1, r3 @ return modulus in r1
-# endif
- RET
-#elif defined(__ARM_EABI__) && defined(_LIBC)
- cmp r1, #0
- beq .Ldiv0
- ldr r2, .Lhwdiv_present
-#ifdef __PIC__
- add r2, r2, pc /* pc = &.LPIC0 */
-# endif
- ldr r2, [r2]
-.LPIC0: cmp r2, #0
- beq __udivide
- mov r3, r0
-# if defined(__ARM_ARCH_EXT_IDIV__)
- udiv r0, r0, r1
- mls r1, r0, r1, r3 /* return modulus in r1 */
-# elif defined(__thumb__) && defined(_ARM_ARCH_T2)
- .inst.w 0xfbb0f0f1
- .inst.w 0xfb003111
-# else
- .inst 0xe730f110
- .inst 0xe0613190
-# endif
- RET
-
- .align 0
-.Lhwdiv_present:
- .word REL_SYM(_libc_arm_hwdiv_present, .LPIC0)
-
- /* Handle divide by zero */
- .align 0
-.Ldiv0: push {r0, lr} /* save r0 */
- mvns r0, #0 /* thumb2 */
- bl _C_LABEL(__aeabi_idiv0)
- pop {r1, pc} /* restore r0 as r1 */
-#else
- b __udivide
-#endif
-END(__udivsi3)
-
-#ifdef __ARM_EABI__
-STRONG_ALIAS(__aeabi_uidivmod, __udivsi3)
-STRONG_ALIAS(__aeabi_uidiv, __udivsi3)
-#endif
+++ /dev/null
-/* $NetBSD: umodsi3.S,v 1.4 2013/08/15 21:40:11 matt Exp $ */
-
-/*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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>
-
-#ifndef __ARM_EABI__
-/*
- * stack is aligned as there's a possibility of branching to .L_overflow
- * which makes a C call
- */
-
-ENTRY(__umodsi3)
-#ifdef __ARM_ARCH_EXT_IDIV__
- udiv r3, r0, r1
- mls r0, r3, r1, r0
-#else
- str lr, [sp, #-8]! /* push lr */
- bl PIC_SYM(__udivsi3, PLT)
- mov r0, r1
- ldr lr, [sp], #8 /* pop lr */
-#endif
- RET
-END(__umodsi3)
-#endif
-/* $NetBSD: memset.S,v 1.6 2013/11/30 21:09:11 joerg Exp $ */
+/* $NetBSD: memset.S,v 1.7 2013/12/02 21:21:33 joerg Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
#include <machine/asm.h>
-#if defined(__ARM_EABI__) && !defined(BZER0)
-STRONG_ALIAS(__aeabi_memset, memset)
+#if defined(__ARM_EABI__) && !defined(_BZERO)
+ENTRY(__aeabi_memset)
+ mov r3, r1
+ mov r1, r2
+ mov r2, r3
+ b memset
+END(__aeabi_memset)
+STRONG_ALIAS(__aeabi_memset4, __aeabi_memset)
+STRONG_ALIAS(__aeabi_memset8, __aeabi_memset)
+
+ENTRY(__aeabi_memclr)
+ mov r2, r1
+ mov r1, #0
+ b memset
+END(__aeabi_memclr)
+STRONG_ALIAS(__aeabi_memclr4, __aeabi_memclr)
+STRONG_ALIAS(__aeabi_memclr8, __aeabi_memclr)
#endif
/*
./usr/include/i386 minix-sys
./usr/lib/libclkconf.a minix-sys
./usr/lib/libclkconf_pic.a minix-sys
-./usr/lib/libc_vfp.a minix-sys
-./usr/lib/libc_vfp_pic.a minix-sys
-./usr/lib/libc_vfp.so.0.0 minix-sys
-./usr/lib/libc_vfp.so.0 minix-sys
-./usr/lib/libc_vfp.so minix-sys
-./usr/lib/libgcc_eh.a minix-sys
+./usr/lib/libc_vfp.a minix-sys obsolete
+./usr/lib/libc_vfp_pic.a minix-sys obsolete
+./usr/lib/libc_vfp.so.0.0 minix-sys obsolete
+./usr/lib/libc_vfp.so.0 minix-sys obsolete
+./usr/lib/libc_vfp.so minix-sys obsolete
+./usr/lib/libgcc_eh.a minix-sys gcccmds
./usr/lib/libgpio.a minix-sys
./usr/lib/libgpio_pic.a minix-sys
./usr/lib/libi2cdriver.a minix-sys
./usr/bin/bzip2 minix-sys
./usr/bin/bzip2recover minix-sys
./usr/bin/c++ minix-sys gcccmds
-./usr/bin/c++ minix-sys llvm
+./usr/bin/c++ minix-sys llvm,llvmcmds
./usr/bin/cal minix-sys
./usr/bin/calendar minix-sys
./usr/bin/cawf minix-sys
./usr/bin/cc minix-sys gcccmds
-./usr/bin/cc minix-sys llvm
+./usr/bin/cc minix-sys llvm,llvmcmds
./usr/bin/cc1 minix-sys gcccmds
./usr/bin/cc1obj minix-sys gcccmds
./usr/bin/cc1plus minix-sys gcccmds
./usr/bin/chsh minix-sys
./usr/bin/ci minix-sys
./usr/bin/cksum minix-sys
-./usr/bin/clang++ minix-sys llvm
-./usr/bin/clang minix-sys llvm
-./usr/bin/clang-cpp minix-sys llvm
-./usr/bin/clang-tblgen minix-sys llvm
+./usr/bin/clang++ minix-sys llvm,llvmcmds
+./usr/bin/clang minix-sys llvm,llvmcmds
+./usr/bin/clang-cpp minix-sys llvm,llvmcmds
+./usr/bin/clang-tblgen minix-sys llvm,llvmcmds
./usr/bin/cleantmp minix-sys
./usr/bin/clear minix-sys
./usr/bin/cmp minix-sys
./usr/bin/compress minix-sys
./usr/bin/cpio minix-sys
./usr/bin/cpp minix-sys gcccmds
-./usr/bin/cpp minix-sys llvm
+./usr/bin/cpp minix-sys llvm,llvmcmds
./usr/bin/cprofalyze minix-sys obsolete
./usr/bin/crc minix-sys
./usr/bin/cron minix-sys
./usr/bin/lessecho minix-sys
./usr/bin/lesskey minix-sys
./usr/bin/lex minix-sys
-./usr/bin/llvm-tblgen minix-sys llvm
+./usr/bin/llvm-tblgen minix-sys llvm,llvmcmds
./usr/bin/loadfont minix-sys
./usr/bin/loadramdisk minix-sys
./usr/bin/lock minix-sys
./usr/include/cdbr.h minix-sys
./usr/include/cdbw.h minix-sys
./usr/include/clang-3.4 minix-sys
-./usr/include/clang-3.4/ammintrin.h minix-sys llvm
-./usr/include/clang-3.4/avx2intrin.h minix-sys llvm
-./usr/include/clang-3.4/avxintrin.h minix-sys llvm
-./usr/include/clang-3.4/bmi2intrin.h minix-sys llvm
-./usr/include/clang-3.4/bmiintrin.h minix-sys llvm
-./usr/include/clang-3.4/emmintrin.h minix-sys llvm
-./usr/include/clang-3.4/f16cintrin.h minix-sys llvm
-./usr/include/clang-3.4/fma4intrin.h minix-sys llvm
-./usr/include/clang-3.4/fmaintrin.h minix-sys llvm
-./usr/include/clang-3.4/immintrin.h minix-sys llvm
-./usr/include/clang-3.4/lzcntintrin.h minix-sys llvm
-./usr/include/clang-3.4/mm3dnow.h minix-sys llvm
-./usr/include/clang-3.4/mmintrin.h minix-sys llvm
-./usr/include/clang-3.4/mm_malloc.h minix-sys llvm
-./usr/include/clang-3.4/nmmintrin.h minix-sys llvm
-./usr/include/clang-3.4/pmmintrin.h minix-sys llvm
-./usr/include/clang-3.4/popcntintrin.h minix-sys llvm
-./usr/include/clang-3.4/prfchwintrin.h minix-sys llvm
-./usr/include/clang-3.4/rdseedintrin.h minix-sys llvm
-./usr/include/clang-3.4/rtmintrin.h minix-sys llvm
-./usr/include/clang-3.4/shaintrin.h minix-sys llvm
-./usr/include/clang-3.4/smmintrin.h minix-sys llvm
-./usr/include/clang-3.4/tbmintrin.h minix-sys llvm
-./usr/include/clang-3.4/tmmintrin.h minix-sys llvm
-./usr/include/clang-3.4/__wmmintrin_aes.h minix-sys llvm
-./usr/include/clang-3.4/wmmintrin.h minix-sys llvm
-./usr/include/clang-3.4/__wmmintrin_pclmul.h minix-sys llvm
-./usr/include/clang-3.4/x86intrin.h minix-sys llvm
-./usr/include/clang-3.4/xmmintrin.h minix-sys llvm
-./usr/include/clang-3.4/xopintrin.h minix-sys llvm
+./usr/include/clang-3.4/ammintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/avx2intrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/avxintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/bmi2intrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/bmiintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/emmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/f16cintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/fma4intrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/fmaintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/immintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/lzcntintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/mm3dnow.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/mmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/mm_malloc.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/nmmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/pmmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/popcntintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/prfchwintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/rdseedintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/rtmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/shaintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/smmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/tbmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/tmmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/__wmmintrin_aes.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/wmmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/__wmmintrin_pclmul.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/x86intrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/xmmintrin.h minix-sys llvm,llvmcmds
+./usr/include/clang-3.4/xopintrin.h minix-sys llvm,llvmcmds
./usr/include/compat minix-sys
./usr/include/compat/machine minix-sys
./usr/include/complex.h minix-sys
./usr/include/ulimit.h minix-sys
./usr/include/unctrl.h minix-sys
./usr/include/unistd.h minix-sys
-./usr/include/unwind.h minix-sys llvm
+./usr/include/unwind.h minix-sys llvm,llvmcmds
./usr/include/util.h minix-sys
./usr/include/utime.h minix-sys
./usr/include/utmp.h minix-sys
./usr/lib/bc/libc.a minix-sys bitcode
./usr/lib/bc/libc++.a minix-sys bitcode
./usr/lib/bc/libchardriver.a minix-sys bitcode
-./usr/lib/bc/libcompat_minix.a minix-sys bitcode obsolete
+./usr/lib/bc/libcompat_minix.a minix-sys bitcode,obsolete
./usr/lib/bc/libcrypt.a minix-sys bitcode
./usr/lib/bc/libcurses.a minix-sys bitcode
./usr/lib/bc/libddekit.a minix-sys bitcode
./usr/lib/bc/libddekit_usb_server.a minix-sys bitcode
./usr/lib/bc/libdevman.a minix-sys bitcode
./usr/lib/bc/libedit.a minix-sys bitcode
+./usr/lib/bc/libevent.a minix-sys bitcode
+./usr/lib/bc/libexpat.a minix-sys bitcode
+./usr/lib/bc/libfsdriver.a minix-sys bitcode
+./usr/lib/bc/libpci.a minix-sys bitcode
./usr/lib/bc/libelf.a minix-sys bitcode
./usr/lib/bc/libexec.a minix-sys bitcode
./usr/lib/bc/libexecinfo.a minix-sys bitcode
./usr/lib/bc/libmenu.a minix-sys bitcode
./usr/lib/bc/libminc.a minix-sys bitcode
./usr/lib/bc/libminixfs.a minix-sys bitcode
-./usr/lib/bc/libminlib.a minix-sys bitcode obsolete
+./usr/lib/bc/libminlib.a minix-sys bitcode,obsolete
./usr/lib/bc/libmthread.a minix-sys bitcode
./usr/lib/bc/libnetdriver.a minix-sys bitcode
./usr/lib/bc/libnetsock.a minix-sys bitcode
./usr/share/doc/usd/03.shell/t3 minix-sys
./usr/share/doc/usd/03.shell/t4 minix-sys
./usr/share/doc/usd/03.shell/t.mac minix-sys
-./usr/share/examples minix-sys atf
+./usr/share/examples minix-sys
./usr/share/examples/atf minix-sys atf
./usr/share/examples/atf/atf-run.hooks minix-sys atf,!kyua
./usr/share/examples/atf/tests-results.css minix-sys atf,!kyua
SUBDIR+= libc++
.endif
.if (${MKLLVM} != "no")
+.if (${MKLLVMCMDS} != "no")
SUBDIR+= llvm
+.endif # (${MKLLVMCMDS} != "no")
.endif
.if (${MKPCC} != "no")
SUBDIR+= pcc
// Thumb2 is the default for V7 on Darwin.
//
// FIXME: Thumb should just be another -target-feaure, not in the triple.
+#if 1
+ // Minix/ARM-specific force to ARMv7 and EABI.
+ StringRef Suffix = "v7";
+ Triple.setEnvironment(llvm::Triple::EABI);
+#else
StringRef Suffix =
getLLVMArchSuffixForARM(getARMTargetCPU(Args, Triple));
+#endif
bool ThumbDefault = Suffix.startswith("v6m") ||
(Suffix.startswith("v7") && getTriple().isOSDarwin());
std::string ArchName = "arm";
* put --
* Put text buffer contents into the file.
*
- * PUBLIC: int put __P((SCR *, CB *, CHAR_T *, MARK *, MARK *, int));
+ * PUBLIC: int put __P((SCR *, CB *, ARG_CHAR_T *, MARK *, MARK *, int));
*/
int
put(SCR *sp, CB *cbp, ARG_CHAR_T *namep, MARK *cp, MARK *rp, int append)
.include <bsd.own.mk>
+.if defined(__MINIX)
+#/usr/minix/src-clang/external/bsd/nvi/dist/ex/ex.c:533:18: error: comparison of integers of different signs: 'CHAR_T' (aka 'unsigned int') and 'ARG_CHAR_T' (aka 'int') [-Werror,-Wsign-compare]
+NOCLANGERROR=yes
+.endif
+
USE_WIDECHAR?=yes
CWARNFLAGS.clang+= -Wno-uninitialized -Wno-format-security
.if (${MACHINE_CPU} == "arm")
LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
.if empty(LIBC_MACHINE_ARCH:M*hf*)
+.if !defined(__MINIX)
SUBDIR+= libc_vfp
.endif
.endif
+.endif
.if (${MKRUMP} != "no")
SUBDIR+= librumpclient
.endif
.include "${.CURDIR}/db/Makefile.inc"
.include "${.CURDIR}/citrus/Makefile.inc"
.include "${.CURDIR}/compat-43/Makefile.inc"
-.if ${HAVE_LIBGCC} == "no"
+.if ${HAVE_LIBGCC} == "no" || defined(__MINIX)
.include "${.CURDIR}/compiler_rt/Makefile.inc"
.endif
.include "${.CURDIR}/dlfcn/Makefile.inc"
.include "${.CURDIR}/net/Makefile.inc"
.include "${.CURDIR}/nameser/Makefile.inc"
.include "${.CURDIR}/nls/Makefile.inc"
-.if (${MACHINE_ARCH} != "alpha") && (${ARCHSUBDIR} != "sparc64")
+.if (${MACHINE_ARCH} != "alpha") && (${ARCHSUBDIR} != "sparc64") && !defined(__MINIX)
.include "${.CURDIR}/quad/Makefile.inc"
.endif
.if (${USE_LIBTRE} == "yes")
.include "${.CURDIR}/tls/Makefile.inc"
.endif
.include "${.CURDIR}/sys/Makefile.inc"
-.if ${HAVE_LIBGCC} == "no"
+.if ${HAVE_LIBGCC} == "no" && ${MACHINE_ARCH} != "earm" && defined(__MINIX)
+# Currently unavailable on minix/arm - BJG
.include "${NETBSDSRCDIR}/sys/lib/libunwind/Makefile.inc"
-.endif
+.endif # ${HAVE_LIBGCC} == "no" && ${MACHINE_ARCH} != "earm" && defined(__MINIX)
.include "${.CURDIR}/uuid/Makefile.inc"
.if (${MKYP} != "no")
.include "${.CURDIR}/yp/Makefile.inc"
CPPFLAGS += -I.
.if !empty(LIBC_MACHINE_ARCH:Mearm*)
-SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S
-SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c
-SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c
-SRCS+= fixunsgen64_ieee754.c fixunsdfsi_ieee754.c
SRCS+= arm_initfini.c
.endif
# for earm, use the 64-bit softfloat
.if ${LIBC_MACHINE_ARCH} == "arm" || ${LIBC_MACHINE_ARCH} == "armeb"
SOFTFLOAT_BITS=32
-#SRCS+= floatunsidf_ieee754.c floatunsisf_ieee754.c
+SRCS+= floatunsidf_ieee754.c floatunsisf_ieee754.c
.endif
.include <softfloat/Makefile.inc>
# $NetBSD: Makefile.inc,v 1.25 2013/08/21 03:09:39 matt Exp $
-SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divide.S divsi3.S \
- fabs.c flt_rounds.c udivsi3.S
+SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c \
+ fabs.c flt_rounds.c
CPUFLAGS.divide.S+= -marm
.if !empty(LIBC_MACHINE_ARCH:Mearm*)
SRCS+= __aeabi_fcmpun.c __aeabi_dcmpun.c
SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c
-.else
-SRCS+= modsi3.S umodsi3.S
.endif
SRCS+= nanf.c
COMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/${MACHINE_ARCH}
.endif
+.if defined(__MINIX)
+LIBC_MACHINE_CPU?= ${MACHINE_CPU}
+.endif # defined(__MINIX)
-.if !defined(__MINIX)
+.if !empty(LIBC_MACHINE_ARCH:Mearm*) && defined(__MINIX)
+# BJG - we skip these for minix/x86 as the .S versions give problems
+# for dynamic binaries.
.PATH: ${COMPILER_RT_CPU_DIR}
.PATH: ${COMPILER_RT_ARCH_DIR}
-.endif # !defined(__MINIX)
+.endif # .if !empty(LIBC_MACHINE_ARCH:Mearm*) && defined(__MINIX)
.PATH: ${COMPILER_RT_SRCDIR}/lib
# Complex support needs parts of libm
# divdc3.c \
# divsc3.c
+# Implemented on top of our atomic interface.
+#GENERIC_SRCS+= atomic.c
+
+.if ${HAVE_LIBGCC_EH:Uyes} == "no"
GENERIC_SRCS+= \
- absvdi2.c \
- absvsi2.c \
- absvti2.c \
+ gcc_personality_v0.c
+.endif
+
+.if 0
+# Conflicts with soft-float
+GENERIC_SRCS+= \
+ comparedf2.c \
+ comparesf2.c \
adddf3.c \
addsf3.c \
- addvdi3.c \
+ addtf3.c \
+ divdf3.c \
+ divsf3.c \
+ divtf3.c \
+ extendsfdf2.c \
+ extendsftf2.c \
+ extenddftf2.c \
+ fixdfsi.c \
+ fixdfti.c \
+ fixsfsi.c \
+ fixsfti.c \
+ floatsidf.c \
+ floatsisf.c \
+ floatunsidf.c \
+ floatunsisf.c \
+ muldf3.c \
+ mulsf3.c \
+ multf3.c \
+ subdf3.c \
+ subsf3.c \
+ subtf3.c \
+ truncdfsf2.c \
+ trunctfdf2.c \
+ trunctfsf2.c
+.endif
+
+GENERIC_SRCS+= \
+ absvsi2.c \
+ absvti2.c \
addvsi3.c \
addvti3.c \
- ashldi3.c \
ashlti3.c \
- ashrdi3.c \
ashrti3.c \
- atomic.c \
- clzdi2.c \
- clzsi2.c \
clzti2.c \
- cmpdi2.c \
cmpti2.c \
- comparedf2.c \
- comparesf2.c \
- ctzdi2.c \
- ctzsi2.c \
ctzti2.c \
- divdf3.c \
- divdi3.c \
- divmoddi4.c \
- divmodsi4.c \
- divsf3.c \
- divsi3.c \
divti3.c \
- extendsfdf2.c \
- ffsdi2.c \
ffsti2.c \
- fixdfdi.c \
- fixdfsi.c \
- fixdfti.c \
fixsfdi.c \
- fixsfsi.c \
- fixsfti.c \
+ fixdfdi.c \
fixunsdfdi.c \
fixunsdfsi.c \
- fixunsdfti.c \
fixunssfdi.c \
fixunssfsi.c \
- fixunssfti.c \
fixunsxfdi.c \
fixunsxfsi.c \
- fixunsxfti.c \
fixxfdi.c \
- fixxfti.c \
floatdidf.c \
floatdisf.c \
floatdixf.c \
- floatsidf.c \
- floatsisf.c \
- floattidf.c \
- floattisf.c \
- floattixf.c \
floatundidf.c \
floatundisf.c \
floatundixf.c \
- floatunsidf.c \
- floatunsisf.c \
- floatuntidf.c \
- floatuntisf.c \
- floatuntixf.c \
- gcc_personality_v0.c \
int_util.c \
- lshrdi3.c \
lshrti3.c \
- moddi3.c \
- modsi3.c \
modti3.c \
muldc3.c \
- muldf3.c \
- muldi3.c \
- mulodi4.c \
mulosi4.c \
muloti4.c \
- mulsf3.c \
multi3.c \
- mulvdi3.c \
mulvsi3.c \
mulvti3.c \
negdf2.c \
- negdi2.c \
negsf2.c \
negti2.c \
- negvdi2.c \
negvsi2.c \
negvti2.c \
- paritydi2.c \
paritysi2.c \
parityti2.c \
- popcountdi2.c \
popcountsi2.c \
popcountti2.c \
powidf2.c \
powisf2.c \
powitf2.c \
powixf2.c \
- subdf3.c \
- subsf3.c \
- subvdi3.c \
subvsi3.c \
subvti3.c \
- truncdfsf2.c \
- ucmpdi2.c \
ucmpti2.c \
- udivdi3.c \
- udivmoddi4.c \
- udivmodsi4.c \
udivmodti4.c \
- udivsi3.c \
udivti3.c \
- umoddi3.c \
- umodsi3.c \
umodti3.c
-.if ${MACHINE_ARCH} == "powerpc"
+.if ${MACHINE_ARCH} != "aarch64"
+GENERIC_SRCS+= \
+ fixunsdfti.c \
+ fixunssfti.c \
+ fixunsxfti.c \
+ fixxfti.c \
+ floattidf.c \
+ floattisf.c \
+ floattixf.c \
+ floatuntidf.c \
+ floatuntisf.c \
+ floatuntixf.c
+.endif
+
+# These have h/w instructions which are always used.
+.if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "aarch64" \
+ && ${LIBC_MACHINE_CPU} != "powerpc" && ${LIBC_MACHINE_CPU} != "or1k"
+GENERIC_SRCS+= \
+ clzsi2.c
+.endif
+
+# These have h/w instructions which are always used.
+.if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_ARCH} != "vax" \
+ && ${LIBC_MACHINE_CPU} != "aarch64" && ${LIBC_MACHINE_CPU} != "powerpc" \
+ && ${LIBC_MACHINE_CPU} != "or1k"
+GENERIC_SRCS+= \
+ ctzsi2.c
+.endif
+
+# These have h/w instructions which are always used.
+.if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "powerpc" \
+ && ${LIBC_MACHINE_CPU} != "aarch64" && ${LIBC_MACHINE_ARCH} != "vax"
+GENERIC_SRCS+= \
+ divmodsi4.c \
+ divsi3.c \
+ modsi3.c \
+ udivmodsi4.c \
+ umodsi3.c
+
+. if ${LIBC_MACHINE_CPU} != "sh3"
+# On sh3 __udivsi3 is gcc "millicode" with special calling convention
+# (less registers clobbered than usual). Each DSO that needs it gets
+# its own hidden copy from libgcc.a.
+GENERIC_SRCS+= \
+ udivsi3.c
+. endif
+.endif
+
+
+GENERIC_SRCS+= \
+ absvdi2.c \
+ addvdi3.c \
+ mulodi4.c \
+ mulvdi3.c \
+ negvdi2.c \
+ paritydi2.c \
+ popcountdi2.c \
+ subvdi3.c
+
+# These have h/w instructions which are always used.
+.if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "powerpc64" \
+ && ${LIBC_MACHINE_ARCH} != "aarch64" && ${LIBC_MACHINE_CPU} != "or1k"
+GENERIC_SRCS+= \
+ clzdi2.c \
+ ctzdi2.c \
+ ffsdi2.c
+.endif
+
+# Don't need these on 64-bit machines.
+.if empty(LIBC_MACHINE_ARCH:M*64*) && ${LIBC_MACHINE_ARCH} != "alpha"
+GENERIC_SRCS+= \
+ cmpdi2.c \
+ ashldi3.c \
+ ashrdi3.c \
+ divdi3.c \
+ divmoddi4.c \
+ lshrdi3.c \
+ moddi3.c \
+ muldi3.c \
+ negdi2.c \
+ ucmpdi2.c \
+ udivdi3.c \
+ udivmoddi4.c \
+ umoddi3.c
+.endif
+
+.if ${LIBC_MACHINE_ARCH} == "powerpc" || ${LIBC_MACHINE_ARCH} == "powerpc64"
GENERIC_SRCS+= \
fixtfdi.c \
fixunstfdi.c \
gcc_qsub.c
.endif
+.if ${LIBC_MACHINE_CPU} == "aarch64"
+GENERIC_SRCS+= \
+ clear_cache.c
+.endif
+
+.if ${LIBC_MACHINE_CPU} == "arm"
+.if !empty(LIBC_MACHINE_ARCH:Mearm*)
+GENERIC_SRCS+= \
+ aeabi_idivmod.S \
+ aeabi_ldivmod.S \
+ aeabi_uidivmod.S \
+ aeabi_uldivmod.S
+.endif
+GENERIC_SRCS+= \
+ clear_cache.c
+# Not yet, overlaps with softfloat
+# aeabi_dcmp.S \
+# aeabi_fcmp.S
+# Not yet, requires ARMv6
+#GENERIC_SRCS+= \
+# bswapdi2.S \
+# bswapsi2.S
+.endif
+
.if !defined(__MINIX)
.for src in ${GENERIC_SRCS}
. if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \
SRCS+= ${src:R}.S
. else
SRCS+= ${src}
-COPTS.${src}+= -Wno-error=missing-prototypes
+. if ${src:E} != "cc"
+COPTS.${src}+= -Wno-missing-prototypes \
+ -Wno-old-style-definition \
+ -Wno-strict-prototypes \
+ -Wno-uninitialized \
+ -Wno-cast-qual
+. endif
. endif
.endfor
.else
# For MINIX: do not pull in the assembly symbols, as they are not PIC ready
.for src in ${GENERIC_SRCS}
SRCS+= ${src}
-COPTS.${src}+= -Wno-error=missing-prototypes
+. if ${src:E} != "cc"
+COPTS.${src}+= -Wno-missing-prototypes \
+ -Wno-old-style-definition \
+ -Wno-strict-prototypes \
+ -Wno-uninitialized \
+ -Wno-cast-qual
+. endif
.endfor
.for src in muldc3.c
* and smaller and such stores are atomic.
*/
dl_iterate_phdr_setup();
+#ifndef __minix
membar_producer();
+#endif
setup_done = true;
}
.include <bsd.own.mk>
+.if defined(__MINIX)
+# /usr/minix/src-clang/lib/libcurses/get_wch.c:646:15: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
+WARNS=0
+.else
WARNS= 2
+.endif
CPPFLAGS+=-I${.CURDIR} -I${NETBSDSRCDIR}/lib/libterminfo
.if defined(DEBUG_CURSES)
COPTS.compat_cabs.c+= ${${ACTIVE_CC} == "clang":? -Wno-incompatible-library-redeclaration :}
COPTS.compat_cabsf.c+= ${${ACTIVE_CC} == "clang":? -Wno-incompatible-library-redeclaration :}
-.include "${.CURDIR}/gen/Makefile.inc"
-
-.if ${HAVE_LIBGCC} == "no"
.include "${.CURDIR}/compiler_rt/Makefile.inc"
-.endif
+.include "${.CURDIR}/gen/Makefile.inc"
.include <bsd.lib.mk>
.include <bsd.subdir.mk>
SRCS= rmtlib.c
MAN= rmtops.3
+.if defined(__MINIX)
+# rmtlib.c:451:50: error: format specifies type 'size_t' (aka 'unsigned long') \
+# but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
+WARNS=0
+CFLAGS+=-Wno-format
+.endif
+
.if !defined(__MINIX)
CPPFLAGS+= -D_REENTRANT
.endif # !defined(__MINIX)
return -1;
pstat = signal(SIGPIPE, SIG_IGN);
- if ((size_t)write(WRITE(fildes), buf, nbyte) == nbyte) {
+ if ((size_t)write(WRITE(fildes), buf, nbyte) == (size_t) nbyte) {
signal(SIGPIPE, pstat);
return status(fildes);
}
#if !defined(__minix)
(void)snprintf(nbuf, sizeof(nbuf), "%d", sa->sa_len);
#else
- (void)snprintf(nbuf, sizeof(nbuf), "%d", len);
+ (void)snprintf(nbuf, sizeof(nbuf), "%zu", len);
#endif /* !defined(__minix) */
ADDS(nbuf);
break;
CPPFLAGS+= -I${NETBSDSRCDIR}
+NOCLANGERROR=yes
+
.include <minix.service.mk>
BINDIR= /usr/sbin
MAN=
+.if ${MACHINE_ARCH} == "earm" && ${MKLLVM:Uno} == "yes"
+# BJG - problems with optimisation of the kernel by llvm
+DBG=-O0
+.endif
+
.include "arch/${MACHINE_ARCH}/Makefile.inc"
SRCS+= clock.c cpulocals.c interrupt.c main.c proc.c system.c \
MINC_OBJS_UNPAGED= atoi.o \
printf.o subr_prf.o \
strcmp.o strcpy.o strlen.o strncmp.o \
- memcpy.o memmove.o memset.o \
- udivdi3.o umoddi3.o qdivrem.o
-MINC_OBJS_UNPAGED+= __aeabi_ldiv0.o __aeabi_idiv0.o __aeabi_uldivmod.o divide.o divsi3.o udivsi3.o umodsi3.o
+ memcpy.o memmove.o memset.o
+MINC_OBJS_UNPAGED+= divsi3.o udivsi3.o umodsi3.o \
+ umoddi3.o udivmoddi4.o aeabi_uidivmod.o \
+ udivmodsi4.o aeabi_uldivmod.o
atoi.o: ${NETBSDSRCDIR}/minix/lib/libminc/atoi.c
printf.o: ${NETBSDSRCDIR}/sys/lib/libsa/printf.c
subr_prf.o: ${NETBSDSRCDIR}/sys/lib/libsa/subr_prf.c
strcpy.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/string/strcpy.S
strcmp.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/string/strcmp.S
-#strcat.o: ${NETBSDSRCDIR}/common/lib/libc/string/strcat.c
-__aeabi_idiv0.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/__aeabi_idiv0.c
-__aeabi_ldiv0.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/__aeabi_ldiv0.c
-__aeabi_uldivmod.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S
-divide.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/divide.S
-divsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/divsi3.S
-udivsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/udivsi3.S
-umodsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/umodsi3.S
+divsi3.o: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/divsi3.c
+udivsi3.o: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/udivsi3.c
+umodsi3.o: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/umodsi3.c
+umoddi3.o: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/umoddi3.c
+udivmoddi4.o: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/udivmoddi4.c
+udivmodsi4.o: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/arm/udivmodsi4.S
+aeabi_uidivmod.o: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/arm/aeabi_uidivmod.S
+aeabi_uldivmod.o: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/arm/aeabi_uldivmod.S
# the following is required by pre_init.c
strncmp.o: ${NETBSDSRCDIR}/common/lib/libc/string/strncmp.c
-# these are required by kprintn.o:
-udivdi3.o: ${NETBSDSRCDIR}/common/lib/libc/quad/udivdi3.c
-umoddi3.o: ${NETBSDSRCDIR}/common/lib/libc/quad/umoddi3.c
-qdivrem.o: ${NETBSDSRCDIR}/common/lib/libc/quad/qdivrem.c
-
-CPPFLAGS.__aeabi_idiv0.c+= -D_STANDALONE
-CPPFLAGS.__aeabi_ldiv0.c+= -D_STANDALONE
-
# LSC: putchar and kputc have the same signature. A bit hackish.
CPPFLAGS.subr_prf.c+= -Dputchar=kputc
-/* $NetBSD: memset.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */
+/* $NetBSD: memset.S,v 1.7 2013/12/02 21:21:33 joerg Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
#include <machine/asm.h>
+#if 0 && defined(__minix)
+#if defined(__ARM_EABI__) && !defined(_BZERO)
+ENTRY(__aeabi_memset)
+ mov r3, r1
+ mov r1, r2
+ mov r2, r3
+ b memset
+END(__aeabi_memset)
+STRONG_ALIAS(__aeabi_memset4, __aeabi_memset)
+STRONG_ALIAS(__aeabi_memset8, __aeabi_memset)
+
+ENTRY(__aeabi_memclr)
+ mov r2, r1
+ mov r1, #0
+ b memset
+END(__aeabi_memclr)
+STRONG_ALIAS(__aeabi_memclr4, __aeabi_memclr)
+STRONG_ALIAS(__aeabi_memclr8, __aeabi_memclr)
+#endif
+#endif /* #if 0 && defined(__minix) */
+
/*
* memset: Sets a block of memory to the specified value
*
#ifndef _BZERO
orr r3, r3, r3, lsl #8 /* Extend value to 16-bits */
#endif
-#ifdef __XSCALE__
+#ifdef _ARM_ARCH_DWORD_OK
tst ip, #0x04 /* Quad-align for Xscale */
#else
cmp r1, #0x10
#ifndef _BZERO
orr r3, r3, r3, lsl #16 /* Extend value to 32-bits */
#endif
-#ifdef __XSCALE__
+#ifdef _ARM_ARCH_DWORD_OK
subne r1, r1, #0x04 /* Quad-align if necessary */
strne r3, [ip], #0x04
cmp r1, #0x10
/* Do 128 bytes at a time */
.Lmemset_loop128:
subs r1, r1, #0x80
-#ifdef __XSCALE__
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
+#ifdef _ARM_ARCH_DWORD_OK
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
#else
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
#endif
bgt .Lmemset_loop128
#if defined(__minix)
/* Do 32 bytes at a time */
.Lmemset_loop32:
subs r1, r1, #0x20
-#ifdef __XSCALE__
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
+#ifdef _ARM_ARCH_DWORD_OK
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
#else
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
#endif
bgt .Lmemset_loop32
#if defined(__minix)
adds r1, r1, #0x10 /* Partially adjust for extra sub */
/* Deal with 16 bytes or more */
-#ifdef __XSCALE__
- strged r2, [ip], #0x08
- strged r2, [ip], #0x08
+#ifdef _ARM_ARCH_DWORD_OK
+ strdge r2, r3, [ip], #0x08
+ strdge r2, r3, [ip], #0x08
#else
- stmgeia ip!, {r2-r3}
- stmgeia ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
+ stmiage ip!, {r2-r3}
#endif
#if defined(__minix)
- moveq r0, #0
+ moveq r0, #0
#endif
RETc(eq) /* Zero length so just exit */
#endif
RETc(eq) /* Zero length so just exit */
-#ifdef __XSCALE__
+#ifdef _ARM_ARCH_DWORD_OK
/* Compensate for 64-bit alignment check */
adds r1, r1, #0x04
#if defined(__minix)
#endif
strb r3, [ip], #0x01 /* Set 1 byte */
- strgeb r3, [ip], #0x01 /* Set another byte */
- strgtb r3, [ip] /* and a third */
+ strbge r3, [ip], #0x01 /* Set another byte */
+ strbgt r3, [ip] /* and a third */
#if defined(__minix)
mov r0, #0
#endif
rsb r2, r2, #0x004
strb r3, [ip], #0x01 /* Set 1 byte */
cmp r2, #0x02
- strgeb r3, [ip], #0x01 /* Set another byte */
+ strbge r3, [ip], #0x01 /* Set another byte */
sub r1, r1, r2
- strgtb r3, [ip], #0x01 /* and a third */
+ strbgt r3, [ip], #0x01 /* and a third */
cmp r1, #0x04 /* More than 4 bytes left? */
bge .Lmemset_wordaligned /* Yup */
RETc(eq) /* Zero length so exit */
strb r3, [ip], #0x01 /* Set 1 byte */
cmp r1, #0x02
- strgeb r3, [ip], #0x01 /* Set another byte */
- strgtb r3, [ip] /* and a third */
+ strbge r3, [ip], #0x01 /* Set another byte */
+ strbgt r3, [ip] /* and a third */
#if defined(__minix)
- mov r0, #0
+ mov r0, #0
#endif
RET /* Exit */
+#ifdef _BZERO
+END(bzero)
+#else
+#if !defined(__minix)
+END(memset)
+#else
+END(phys_memset)
+#endif
+#endif
#if defined(__minix)
LABEL(memset_fault) /* kernel can send us here */
CPPFLAGS.sha2.c+= -I${NETBSDSRCDIR}/sys
.for f in \
- ashrdi3.o divdi3.o lshldi3.o lshrdi3.o moddi3.o \
- udivdi3.o umoddi3.o qdivrem.o
-${f} ${f:C/\.o/.bc/}: ${LIBCOMMONCDIR}/quad/${f:C/\.o/.c/}
+ ashrdi3.o divdi3.o lshrdi3.o moddi3.o \
+ udivdi3.o umoddi3.o umodsi3.o udivsi3.o \
+ udivmoddi4.o divsi3.o modsi3.o divmoddi4.o \
+ divmodsi4.o udivmodsi4.o #qdivrem.o lshldi3.o
+${f} ${f:C/\.o/.bc/}: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/${f:C/\.o/.c/}
OBJS+= ${f}
CLEANFILES+= ${f}
+COPTS+= -Wno-missing-prototypes \
+ -Wno-old-style-definition \
+ -Wno-strict-prototypes \
+ -Wno-uninitialized \
+ -Wno-cast-qual
+
+
+
.if ${USE_BITCODE:Uno} == "yes"
OBJS+= ${f:C/\.o/.bc/}
CLEANFILES+= ${f:C/\.o/.bc/}
.endfor
.for f in \
- byte_swap_2.o byte_swap_4.o divsi3.o divide.o udivsi3.o
+ byte_swap_2.o byte_swap_4.o
${f}: ${LIBCOMMONCARCHDIR}/gen/${f:C/\.o/.S/}
OBJS+= ${f}
CLEANFILES+= ${f}
CPPFLAGS.__aeabi_idiv0.c+= -D_STANDALONE
CPPFLAGS.__aeabi_ldiv0.c+= -D_STANDALONE
-.for f in \
- __aeabi_ldivmod.o __aeabi_uldivmod.o
-${f}: ${LIBCOMMONCARCHDIR}/quad/${f:C/\.o/.S/}
-OBJS+= ${f}
-CLEANFILES+= ${f}
-.endfor
+#.for f in \
+# __aeabi_ldivmod.o __aeabi_uldivmod.o
+#${f}: ${LIBCOMMONCARCHDIR}/quad/${f:C/\.o/.S/}
+#OBJS+= ${f}
+#CLEANFILES+= ${f}
+#.endfor
.for f in \
memcmp.o memcpy.o memmove.o memset.o \
CLEANFILES+= ${f}
.endfor
+.for f in \
+ aeabi_uidivmod.o aeabi_ldivmod.o aeabi_uldivmod.o aeabi_idivmod.o
+${f}: ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist/lib/arm/${f:C/\.o/.S/}
+OBJS+= ${f}
+CLEANFILES+= ${f}
+.endfor
+
.for f in \
fpgetround.o fpsetround.o fpgetmask.o fpsetmask.o \
fpgetsticky.o fpsetsticky.o
mp->mp_ignore.__bits[0], mp->mp_catch.__bits[0],
mp->mp_sigmask.__bits[0]);
printf("%08x ", mp->mp_sigpending.__bits[0]);
- if (mp->mp_flags & ALARM_ON) printf("%8lu", mp->mp_timer.tmr_exp_time-uptime);
+ if (mp->mp_flags & ALARM_ON) printf("%8lu",
+ (unsigned long) (mp->mp_timer.tmr_exp_time-uptime));
else printf(" -");
printf("\n");
}
rpub = &rprocpub[i];
if (! (rp->r_flags & RS_IN_USE)) continue;
if (++n > 22) break;
- printf("%13s %9d %5d %6s %4d %4ld %8lu %5dx %s",
+ printf("%13s %9d %5d %6s %4d %4lu %8u %5dx %s",
rpub->label, rpub->endpoint, rp->r_pid,
s_flags_str(rp->r_flags, rpub->sys_flags), rpub->dev_nr,
- rp->r_period, rp->r_alive_tm, rp->r_restarts,
+ (unsigned long) rp->r_period,
+ (unsigned int) rp->r_alive_tm, rp->r_restarts,
rp->r_args
);
printf("\n");
: ${RELEASETOOLSDIR=./releasetools/}
: ${FSTAB=${DESTDIR}/etc/fstab}
: ${BUILDVARS=-V MKGCCCMDS=yes -V MKLLVM=no}
+# These BUILDVARS are for building with LLVM:
+#: ${BUILDVARS=-V MKLIBCXX=no -V MKKYUA=no -V MKATF=no -V MKLLVMCMDS=no}
: ${BUILDSH=build.sh}
: ${CREATE_IMAGE_ONLY=0}
: ${RC=minix_x86.rc}
#MINIX-specific vars
_MKVARS.yes+= \
- MKSYSDEBUG MKLIVEUPDATE MKLWIP
+ MKSYSDEBUG MKLIVEUPDATE MKLWIP MKLLVMCMDS
.if (${MACHINE_ARCH} == "i386")
_MKVARS.yes+= \
MKWATCHDOG MKACPI MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI
/* Include internal utility function declarations. */
#include "int_util.h"
+#ifdef __minix
+/* missing prototypes causing build problems */
+COMPILER_RT_ABI di_int __ashrdi3(di_int a, si_int b);
+COMPILER_RT_ABI di_int __divdi3(di_int a, di_int b);
+COMPILER_RT_ABI di_int __divmoddi4(di_int a, di_int b, di_int* rem);
+COMPILER_RT_ABI si_int __divmodsi4(si_int a, si_int b, si_int* rem);
+COMPILER_RT_ABI si_int __divsi3(si_int a, si_int b);
+COMPILER_RT_ABI si_int __modsi3(si_int a, si_int b);
+COMPILER_RT_ABI di_int __lshrdi3(di_int a, si_int b);
+COMPILER_RT_ABI di_int __moddi3(di_int a, di_int b);
+COMPILER_RT_ABI du_int __udivdi3(du_int a, du_int b);
+COMPILER_RT_ABI du_int __udivmoddi4(du_int a, du_int b, du_int* rem);
+COMPILER_RT_ABI su_int __udivmodsi4(su_int a, su_int b, su_int* rem);
+COMPILER_RT_ABI su_int __udivsi3(su_int n, su_int d);
+COMPILER_RT_ABI du_int __umoddi3(du_int a, du_int b);
+COMPILER_RT_ABI su_int __umodsi3(su_int a, su_int b);
+#endif
+
#endif /* INT_LIB_H */
#include "int_lib.h"
+#ifdef __minix
+si_int COMPILER_RT_ABI __divsi3(si_int a, si_int b);
+#else
su_int COMPILER_RT_ABI __divsi3(si_int a, si_int b);
+#endif
/* Returns: a % b */
SRCS+= libunwind.cxx \
unwind_registers.S
+.if defined(__MINIX) && (${MACHINE_ARCH} == "earm")
+SRCS+= aeabi_unwind.c
+.endif
+
INCS+= unwind.h
.if ${HAVE_GCC:U48} == "4"
}
if (col != 0)
printf("\",\n");
+#ifdef __minix
+ printf("\t\t%zu\n", (size_t) len);
+#else
printf("\t\t%zu\n", len);
+#endif
printf("\t}");
if (i + 1 < argc)
printf(",");