Update to compile on coldfire.

This commit is contained in:
matt 2013-07-18 21:29:08 +00:00
parent a25010752c
commit 6125de07bf
4 changed files with 59 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmpdf2.S,v 1.1 2013/07/17 06:39:06 matt Exp $ */
/* $NetBSD: cmpdf2.S,v 1.2 2013/07/18 21:29:08 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -39,7 +39,7 @@
#if 0
RCSID("from: @(#)cmpdf2.s 5.1 (Berkeley) 6/7/90")
#else
RCSID("$NetBSD: cmpdf2.S,v 1.1 2013/07/17 06:39:06 matt Exp $")
RCSID("$NetBSD: cmpdf2.S,v 1.2 2013/07/18 21:29:08 matt Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@ -49,11 +49,21 @@
ENTRY(__cmpdf2)
fmoved 4(%sp),%fp0
fcmpd 12(%sp),%fp0
fbgt Lagtb
fbgt Lbgt
#ifdef __mcoldfire__
fbeq Lbeq
movql #-1,%d0
#else
fslt %d0
extbl %d0
#endif
rts
Lagtb:
Lbgt:
moveq #1,%d0
rts
#ifdef __mcoldfire__
Lbeq:
clrl %d0
rts
#endif
END(__cmpdf2)

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmpsf2.S,v 1.1 2013/07/17 06:39:06 matt Exp $ */
/* $NetBSD: cmpsf2.S,v 1.2 2013/07/18 21:29:08 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -39,7 +39,7 @@
#if 0
RCSID("from: @(#)cmpsf2.s 5.1 (Berkeley) 6/7/90")
#else
RCSID("$NetBSD: cmpsf2.S,v 1.1 2013/07/17 06:39:06 matt Exp $")
RCSID("$NetBSD: cmpsf2.S,v 1.2 2013/07/18 21:29:08 matt Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@ -49,11 +49,21 @@
ENTRY(__cmpsf2)
fmoves 4(%sp),%fp0
fcmps 8(%sp),%fp0
fbgt Lagtb
fbgt Lbgt
#ifdef __mcoldfire__
fbeq Lbeq
movql #-1,%d0
#else
fslt %d0
extbl %d0
#endif
rts
Lagtb:
Lbgt:
moveq #1,%d0
rts
#ifdef __mcoldfire__
Lbeq:
clrl %d0
rts
#endif
END(__cmpsf2)

View File

@ -1,4 +1,4 @@
/* $NetBSD: fixunsdfsi.S,v 1.1 2013/07/17 06:39:06 matt Exp $ */
/* $NetBSD: fixunsdfsi.S,v 1.2 2013/07/18 21:29:08 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -39,19 +39,36 @@
#if 0
RCSID("from: @(#)fixunsdfsi.s 5.1 (Berkeley) 6/7/90")
#else
RCSID("$NetBSD: fixunsdfsi.S,v 1.1 2013/07/17 06:39:06 matt Exp $")
RCSID("$NetBSD: fixunsdfsi.S,v 1.2 2013/07/18 21:29:08 matt Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
#ifdef __mcoldfire__
.section .rodata,"a"
.p2align 4
L2G: .double 0r2147483648.0
#endif
/* (unsigned) double */
ENTRY(__fixunsdfsi)
fintrzd 4(%sp),%fp0
fcmpd #0r2147483648.0,%fp0
#ifdef __mcoldfire__
LEA_LCL(L2G,%a0)
fmoved (%a0),%fp1
fcmpd %fp1,%fp0
#else
fmoved #0r2147483648.0,%fp1
fcmpx %fp1,%fp0
#endif
fbge Lwaybig
fmovel %fp0,%d0
rts
Lwaybig:
fsubd #0r2147483648.0,%fp0
#ifdef __mcoldfire__
fsubd %fp1,%fp0
#else
fsubx %fp1,%fp0
#endif
fmovel %fp0,%d0
bset #31,%d0
rts

View File

@ -1,4 +1,4 @@
/* $NetBSD: modf.S,v 1.1 2013/07/17 06:39:06 matt Exp $ */
/* $NetBSD: modf.S,v 1.2 2013/07/18 21:29:08 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -39,7 +39,7 @@
#if 0
RCSID("from: @(#)modf.s 5.1 (Berkeley) 5/12/90")
#else
RCSID("$NetBSD: modf.S,v 1.1 2013/07/17 06:39:06 matt Exp $")
RCSID("$NetBSD: modf.S,v 1.2 2013/07/18 21:29:08 matt Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@ -50,9 +50,17 @@
ENTRY(modf)
fmoved 4(%sp),%fp0
movel 12(%sp),%a0
#ifdef __mcoldfire__
fintrzd %fp0,%fp1
#else
fintrzx %fp0,%fp1
#endif
fmoved %fp1,(%a0)
#ifdef __mcoldfire__
fsubd %fp1,%fp0
#else
fsubx %fp1,%fp0
#endif
#ifndef __SVR4_ABI__
fmoved %fp0,-(%sp)
movel (%sp)+,%d0