public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Toon Moene <moene@knmi.nl>
To: David Edelsohn <dje@watson.ibm.com>,
	"Billinghurst, David (CRTS)" <David.Billinghurst@riotinto.com>,
	gcc@gcc.gnu.org
Subject: Correct comparison to the intrinsics table, was: Re: Plan for bug-fixing  g77-3.1.
Date: Wed, 30 Jan 2002 08:59:00 -0000	[thread overview]
Message-ID: <3C57E574.23A5714E@knmi.nl> (raw)
In-Reply-To: <3C57B081.96CD6CC1@knmi.nl>

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

I wrote:

> I'm now testing a patch that uses a specially written "compare upper
> case", that will convert the would-be-intrinsic-name to upper case when
> comparing it with the first of the three entries from the table.
> AFAICS, this should correct the problem.

OK, the attached patch gives the correct results on mips-sgi-irix6.5. 
If no-one objects, I'll commit it later this evening (around 23:00 UTC).

--
Toon Moene, KNMI, PO Box 201, 3730 AE De Bilt, The Netherlands.
Tel. +31302206443, Fax +31302210407,  e-mail moene@knmi.nl
URL: http://www.knmi.nl/hirlam

[-- Attachment #2: upcase.patch --]
[-- Type: text/plain, Size: 1219 bytes --]

*** intrin.c.orig	Fri Jan 25 22:15:28 2002
--- intrin.c	Tue Jan 29 21:33:01 2002
*************** ffeintrin_check_any_ (ffebld arglist)
*** 1154,1158 ****
  }
  
! /* Compare name to intrinsic's name.  Uses strcmp on arguments' names.
     The intrinsics table is sorted on the upper case entries; so first
     compare irrespective of case on the `uc' entry.  If it matches,
--- 1154,1174 ----
  }
  
! /* Compare a forced-to-uppercase name with a known-upper-case name.  */
! 
! static int
! upcasecmp_ (const char *name, const char *ucname)
! {
!   for ( ; *name != 0 && *ucname != 0; name++, ucname++)
!     {
!       int i = TOUPPER(*name) - *ucname;
! 
!       if (i != 0)
!         return i;
!     }
! 
!   return *name - *ucname;
! }
! 
! /* Compare name to intrinsic's name.
     The intrinsics table is sorted on the upper case entries; so first
     compare irrespective of case on the `uc' entry.  If it matches,
*************** ffeintrin_cmp_name_ (const void *name, c
*** 1167,1171 ****
    int i;
  
!   if ((i = strcasecmp (name, uc)) == 0)
      {
        switch (ffe_case_intrin ())
--- 1183,1187 ----
    int i;
  
!   if ((i = upcasecmp_ (name, uc)) == 0)
      {
        switch (ffe_case_intrin ())

      reply	other threads:[~2002-01-30 12:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-29 22:57 Billinghurst, David (CRTS)
2002-01-29 23:29 ` David Edelsohn
2002-01-30  7:48   ` Toon Moene
2002-01-30  8:59     ` Toon Moene [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C57E574.23A5714E@knmi.nl \
    --to=moene@knmi.nl \
    --cc=David.Billinghurst@riotinto.com \
    --cc=dje@watson.ibm.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).