Commit 5d0e6486 by Alexandre Oliva Committed by Alexandre Oliva

libgcc2.h (Wtype_MAX, Wtype_MIN): Define.

* libgcc2.h (Wtype_MAX, Wtype_MIN): Define.
* libgcc2.c (__fixunssfSI, __fixunsdfSI, __fixunsxfSI): Use
Wtype_MIN instead of LONG_MIN.

From-SVN: r39365
parent b2321b26
2001-01-31 Alexandre Oliva <aoliva@redhat.com>
* libgcc2.h (Wtype_MAX, Wtype_MIN): Define.
* libgcc2.c (__fixunssfSI, __fixunsdfSI, __fixunsxfSI): Use
Wtype_MIN instead of LONG_MIN.
2001-01-30 Jeffrey Oldham <oldham@codesourcery.com> 2001-01-30 Jeffrey Oldham <oldham@codesourcery.com>
* fixinc/fixincl.tpl: Add 2001 to copyright. Change name of * fixinc/fixincl.tpl: Add 2001 to copyright. Change name of
......
/* More subroutines needed by GCC output code on some machines. */ /* More subroutines needed by GCC output code on some machines. */
/* Compile this one with gcc. */ /* Compile this one with gcc. */
/* Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 /* Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2001 Free Software Foundation, Inc. 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -1145,8 +1145,8 @@ __floatdisf (DWtype u) ...@@ -1145,8 +1145,8 @@ __floatdisf (DWtype u)
UWtype UWtype
__fixunsxfSI (XFtype a) __fixunsxfSI (XFtype a)
{ {
if (a >= - (DFtype) LONG_MIN) if (a >= - (DFtype) Wtype_MIN)
return (Wtype) (a + LONG_MIN) - LONG_MIN; return (Wtype) (a + Wtype_MIN) - Wtype_MIN;
return (Wtype) a; return (Wtype) a;
} }
#endif #endif
...@@ -1167,8 +1167,8 @@ __fixunsxfSI (XFtype a) ...@@ -1167,8 +1167,8 @@ __fixunsxfSI (XFtype a)
UWtype UWtype
__fixunsdfSI (DFtype a) __fixunsdfSI (DFtype a)
{ {
if (a >= - (DFtype) LONG_MIN) if (a >= - (DFtype) Wtype_MIN)
return (Wtype) (a + LONG_MIN) - LONG_MIN; return (Wtype) (a + Wtype_MIN) - Wtype_MIN;
return (Wtype) a; return (Wtype) a;
} }
#endif #endif
...@@ -1189,8 +1189,8 @@ __fixunsdfSI (DFtype a) ...@@ -1189,8 +1189,8 @@ __fixunsdfSI (DFtype a)
UWtype UWtype
__fixunssfSI (SFtype a) __fixunssfSI (SFtype a)
{ {
if (a >= - (SFtype) LONG_MIN) if (a >= - (SFtype) Wtype_MIN)
return (Wtype) (a + LONG_MIN) - LONG_MIN; return (Wtype) (a + Wtype_MIN) - Wtype_MIN;
return (Wtype) a; return (Wtype) a;
} }
#endif #endif
......
/* Header file for libgcc2.c. */ /* Header file for libgcc2.c. */
/* Copyright (C) 2000 /* Copyright (C) 2000, 2001
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -199,6 +199,9 @@ typedef int word_type __attribute__ ((mode (__word__))); ...@@ -199,6 +199,9 @@ typedef int word_type __attribute__ ((mode (__word__)));
#define __NDW(a,b) __ ## a ## hi ## b #define __NDW(a,b) __ ## a ## hi ## b
#endif #endif
#define Wtype_MAX ((Wtype)(((UWtype)1 << (W_TYPE_SIZE - 1)) - 1))
#define Wtype_MIN (- Wtype_MAX - 1)
#define __muldi3 __NDW(mul,3) #define __muldi3 __NDW(mul,3)
#define __divdi3 __NDW(div,3) #define __divdi3 __NDW(div,3)
#define __udivdi3 __NDW(udiv,3) #define __udivdi3 __NDW(udiv,3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment