develooper Front page | perl.perl5.porters | Postings from March 2003

Re: [PATCH] glibc _moddi3

Thread Previous | Thread Next
From:
Tels
Date:
March 1, 2003 15:51
Subject:
Re: [PATCH] glibc _moddi3
Message ID:
perl.perl5.porters-72610@nntp.perl.org
-----BEGIN PGP SIGNED MESSAGE-----

Moin,

>Here's an attempt to squash the glibc _moddi3 negative quad bug that's
>been around for aeons.  An aeon.  Almost a year.  (The bug is also
>known as [perl #9402] or "Abigail's faithfully failing int.t".)
>I didn't feel like writing a Configure test for such a precise bug
>but instead went for runtime.  Now pp_i_modulo is basically a switchboard
>that rewires the opcode dispatch table as required (thus effectively
>rewiring itself out of the way).  The patch works for me-- I've got
>the same buggy glibc in the Debian box I run my smokes in.
[snip]

>+      if (right < 0)
>+       right = -right;
>+      SETi( left % right );

Wouldn't be

        SETi( left % abs(right));

shorter, faster? (assuming that an abs(right) will be inlined as one
assembly instruction) 

Best wishes,

Tels

- -- 
 http://www.notcpa.org/ You still can run any code on your CPU. How long?
 Signed on Sun Mar  2 00:49:51 2003 with http://bloodgate.com/tels.asc

 perl -MDev::Bollocks -le'print Dev::Bollocks->rand()'
 dramatically seize bleeding-edge relationships

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBPmFHJ3cLPEOTuEwVAQFbXwf+MJuq8+vP9T40aCLUOaMtl5bfp0Uo3LZU
e5eIcj8+BKPXhc1tskaLw1iA7SyZLNxBl/6kLHhu2IZQkTAlan1KzFZwotDFxdJM
k/kqyiV7wD724t0PrT/9sCKAq1RcnM7rm2ptB51qBMPrX3hA8iMD00TgzoWbhTvk
A+AEGfBPukMBs6agDw+aQVInFhJt8ZLxKljUWQ33dd7J6dZegwqTsQxREMpXskJr
4m7d9MmQVylVbUBCUxxDNSQPBqgcI9COZ3BsoG3+WRFpdLOqL5GwPCQybOi5dG/V
5u82zrwfyU2zArerVuKeyLyJuU8leNoDjlaP59GTaIfUH/2TXtfYQQ==
=WpEd
-----END PGP SIGNATURE-----

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About