From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8579 Path: news.gmane.org!not-for-mail From: Anand Takale Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] mips/fenv: fix fesetround by setting rounding mode Date: Mon, 28 Sep 2015 10:38:36 +0000 Message-ID: <43DB94F35C9F9E47834E992E8B3C7AF16E67C374@PUMAIL01.pu.imgtec.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_43DB94F35C9F9E47834E992E8B3C7AF16E67C374PUMAIL01puimgte_" X-Trace: ger.gmane.org 1443436748 911 80.91.229.3 (28 Sep 2015 10:39:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Sep 2015 10:39:08 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-8591-gllmg-musl=m.gmane.org@lists.openwall.com Mon Sep 28 12:39:08 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZgVpq-0006tU-8c for gllmg-musl@m.gmane.org; Mon, 28 Sep 2015 12:39:06 +0200 Original-Received: (qmail 25961 invoked by uid 550); 28 Sep 2015 10:39:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 25903 invoked from network); 28 Sep 2015 10:38:57 -0000 Thread-Topic: [PATCH] mips/fenv: fix fesetround by setting rounding mode Thread-Index: AdD52LZxCbs1+tqGSs2GhXocMSRG2Q== Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.93.30] Xref: news.gmane.org gmane.linux.lib.musl.general:8579 Archived-At: --_000_43DB94F35C9F9E47834E992E8B3C7AF16E67C374PUMAIL01puimgte_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable mips fesetround does not write back the rounding mode to FCSR diff --git a/src/fenv/mips/fenv.s b/src/fenv/mips/fenv.s index 9b45ffc..f60b0e7 100644 --- a/src/fenv/mips/fenv.s +++ b/src/fenv/mips/fenv.s @@ -43,6 +43,7 @@ __fesetround: li $6, -4 and $5, $5, $6 or $5, $5, $4 + ctc1 $5, $31 jr $ra li $2, 0 --_000_43DB94F35C9F9E47834E992E8B3C7AF16E67C374PUMAIL01puimgte_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

mips fesetround does not write back the rounding mod= e to FCSR

 

 

diff --git a/src/fenv/mips/fenv.s b/src/fenv/mips/fe= nv.s

index 9b45ffc..f60b0e7 100644

--- a/src/fenv/mips/fenv.s

+++ b/src/fenv/mips/fenv.s

@@ -43,6 +43,7 @@ __fesetround:

        li &= nbsp;    $6, -4

        and =     $5, $5, $6

        or &= nbsp;    $5, $5, $4

+       ctc1 =    $5, $31

        jr &= nbsp;    $ra

        li &= nbsp;    $2, 0

--_000_43DB94F35C9F9E47834E992E8B3C7AF16E67C374PUMAIL01puimgte_--