From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20545 invoked by alias); 23 Dec 2002 16:13:22 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 20489 invoked from network); 23 Dec 2002 16:13:20 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by 209.249.29.67 with SMTP; 23 Dec 2002 16:13:20 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva2.cipe.redhat.com [10.0.1.156]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id gBNGCwY32160; Mon, 23 Dec 2002 11:12:58 -0500 Received: from free.redhat.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6) with ESMTP id gBNGCvh9008655; Mon, 23 Dec 2002 14:12:57 -0200 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6/Submit) id gBNGCtS3008651; Mon, 23 Dec 2002 14:12:55 -0200 To: "Kaveh R. Ghazi" Cc: gcc-patches@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc@gcc.gnu.org, libstdc++@gcc.gnu.org, oldham@codesourcery.com, ro@TechFak.Uni-Bielefeld.DE Subject: Re: Irix6 long doubles implemented wrong? (27_io/ostream_inserter_arith) References: <200212142145.QAA25890@caip.rutgers.edu> <200212170531.AAA15561@caip.rutgers.edu> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Mon, 23 Dec 2002 09:46:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2002-12/txt/msg01344.txt.bz2 --=-=-= Content-length: 161 On Dec 22, 2002, Alexandre Oliva wrote: > ? gcc/config/mips/_tilib.c Here's the file that I had failed to cvs add before taking the diff: --=-=-= Content-Type: application/octet-stream Content-Disposition: inline; filename=_tilib.c Content-length: 3002 /* A few TImode functions needed for TFmode emulated arithmetic. Copyright 2002 Free Software Foundation, Inc. Contributed by Alexandre Oliva This file is part of GNU CC. GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "tconfig.h" #include "tsystem.h" #ifndef LIBGCC2_WORDS_BIG_ENDIAN #define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN #endif #if _MIPS_SIM == 2 /* N32 */ || _MIPS_SIM == 3 /* 64 */ typedef int TItype __attribute__ ((mode (TI))); typedef int DItype __attribute__ ((mode (DI))); typedef int SItype __attribute__ ((mode (SI))); typedef unsigned int UDItype __attribute__ ((mode (DI))); typedef union { struct TIstruct { #if LIBGCC2_WORDS_BIG_ENDIAN DItype high, low; #else DItype low, high; #endif } s; TItype ll; } TIunion; TItype __negti2 (TItype u) { TIunion w; TIunion uu; uu.ll = u; w.s.low = -uu.s.low; w.s.high = -uu.s.high - ((UDItype) w.s.low > 0); return w.ll; } TItype __ashlti3 (TItype u, int b) { TIunion w; int bm; TIunion uu; if (b == 0) return u; uu.ll = u; bm = (sizeof (DItype) * BITS_PER_UNIT) - b; if (bm <= 0) { w.s.low = 0; w.s.high = (UDItype) uu.s.low << -bm; } else { UDItype carries = (UDItype) uu.s.low >> bm; w.s.low = (UDItype) uu.s.low << b; w.s.high = ((UDItype) uu.s.high << b) | carries; } return w.ll; } #if 0 TItype __ashrti3 (TItype u, int b) { TIunion w; int bm; TIunion uu; if (b == 0) return u; uu.ll = u; bm = (sizeof (DItype) * BITS_PER_UNIT) - b; if (bm <= 0) { /* w.s.high = 1..1 or 0..0 */ w.s.high = uu.s.high >> (sizeof (DItype) * BITS_PER_UNIT - 1); w.s.low = uu.s.high >> -bm; } else { UDItype carries = (UDItype) uu.s.high << bm; w.s.high = uu.s.high >> b; w.s.low = ((UDItype) uu.s.low >> b) | carries; } return w.ll; } #endif TItype __lshrti3 (TItype u, int b) { TIunion w; int bm; TIunion uu; if (b == 0) return u; uu.ll = u; bm = (sizeof (DItype) * BITS_PER_UNIT) - b; if (bm <= 0) { w.s.high = 0; w.s.low = (UDItype) uu.s.high >> -bm; } else { UDItype carries = (UDItype) uu.s.high << bm; w.s.high = (UDItype) uu.s.high >> b; w.s.low = ((UDItype) uu.s.low >> b) | carries; } return w.ll; } #endif /* N32 or N64 */ --=-=-= Content-length: 289 -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer --=-=-=--