public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug ports/28872] Building glibc for MIPSel single float targets
Date: Mon, 07 Mar 2022 11:07:44 +0000	[thread overview]
Message-ID: <bug-28872-131-qSmcdFWpjR@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28872-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28872

--- Comment #21 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Den from comment #20)
> (In reply to Adhemerval Zanella from comment #19)
> > sysdeps/mips/__longjmp.c
> > +# if __mips_fpr == 0 || __mips_fpr == 64
> > +#  define LDFPR "ldc1 "
> > +# elif __mips_fpr == 32
> > +#  define LDFPR "lwc1 "
> > +# else
> > +#  define LDFPR "l.d "
> > +# endif
> > +  asm volatile (LDFPR "$f20, %0" : : "m" (env[0].__fpregs[0]));
> > ...
> Those LDFPR macroses inside "asm volatile" are not replaced with their logic
> definition. That will not do the trick for the .c files, so they can not be
> compiled (as the compiler "thinks" that it is ldfpr opcode). The trick might
> be working with .s files.

What do you mean 'replaced with their logic definition' here? For '__mips_fpr
== 32' is lwc1 used to restore the floating-point state, which afaiu this is
the expected intructions to load the for machines which does not contain double
precision.

> 
> The bad thing for me is that I obtained that currently there is no a
> suitable toolchain with the newest binutils and gcc to build a stable
> working cross-compiler for either r6000 with single-float (when using double
> it is OK) or r5900 - that kind of the cross-compiler generates malfunctions
> somewhere...

Can't you use the expected compiler-flags (-O2 -mabi=32 -mfp32 -msingle-float
-mhard-float) along with a recent gcc/binutils?

> So, I can not check with a test whenever your patch, your suppose about
> saving/restoring fp state to/from 32bit registers just by using swc1/lwc1
> "intrusions" in the current ABI realization, is correct or wrong. Because I
> have nothing stable to be sure in, to compare with.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-03-07 11:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 11:27 [Bug ports/28872] New: " archicharmer at mail dot ru
2022-02-08 17:55 ` [Bug ports/28872] " joseph at codesourcery dot com
2022-02-08 19:19 ` archicharmer at mail dot ru
2022-02-08 19:34 ` joseph at codesourcery dot com
2022-02-09  3:41 ` archicharmer at mail dot ru
2022-02-09 14:16 ` adhemerval.zanella at linaro dot org
2022-02-09 17:03 ` archicharmer at mail dot ru
2022-02-09 17:33 ` adhemerval.zanella at linaro dot org
2022-02-10  2:43 ` archicharmer at mail dot ru
2022-02-10 11:25 ` adhemerval.zanella at linaro dot org
2022-02-10 19:45 ` archicharmer at mail dot ru
2022-02-10 20:57 ` adhemerval.zanella at linaro dot org
2022-02-11  3:54 ` archicharmer at mail dot ru
2022-02-17 17:09 ` archicharmer at mail dot ru
2022-02-18 12:39 ` adhemerval.zanella at linaro dot org
2022-02-19  8:27 ` archicharmer at mail dot ru
2022-02-22 20:05 ` adhemerval.zanella at linaro dot org
2022-02-23  8:06 ` archicharmer at mail dot ru
2022-02-23 11:57 ` adhemerval.zanella at linaro dot org
2022-02-23 11:57 ` adhemerval.zanella at linaro dot org
2022-03-05 17:43 ` archicharmer at mail dot ru
2022-03-07 11:07 ` adhemerval.zanella at linaro dot org [this message]
2022-03-07 16:17 ` archicharmer at mail dot ru
2022-03-07 16:59 ` adhemerval.zanella at linaro dot org
2022-03-18 15:01 ` archicharmer at mail dot ru

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=bug-28872-131-qSmcdFWpjR@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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).