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: Tue, 22 Feb 2022 20:05:12 +0000 [thread overview]
Message-ID: <bug-28872-131-5Y1RQY7zJS@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 #16 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Den from comment #15)
> (In reply to Adhemerval Zanella from comment #14)
>
> Zanella, thank you for your support.
>
> > In fact it does exactly what I suggested ... on comment #5.
>
> Well, your patches here just replaces l.d to ldc1 and s.d to sdc1, but as I
> replied to your comment#5, the opcodes sdc1/ldc1 (the almost same load/store
> double but from/to coprocessor1) are not supported for single float targets
> as well. What about lwc1/swc1 and BYTES_PER_WORD? - doubles will not be
> doubles after those instructions, right?
>
> By the way, you made a mistake in setjmp_aux.c (s.d and sdc1 instead of l.d
> and ldc1). Moreover, the files.c (at least them) can not be compiled when
> there are such presentations of LDFPR/STFPR inside asm volatiles. I suppose
> you just showed a quick realization.
>
> > $ mips64-linux-gnu/bin/mips64-glibc-linux-gnu-gcc -mabi=32 -mips2
> > -mhard-float -mfpxx t.c -o t
>
> Please, while tests, additionally use flag -msingle-float and/or -mfp32
> instead of -mfpxx
I am confused because in some places you refers to r5900 and other r6000. AFAIK
r6000 was never supported on Linux [1], and it seems that gcc also does not
fully support the r6010 floating point controller:
$ cat test.c
void foo (double *m, double v)
{
*m = v;
}
$ mips64el-glibc-linux-gnu-gcc -O2 -mabi=32 -march=r6000 -mfp32 -msingle-float
-mhard-float test.c -S -o -
.file 1 "test.c"
.section .mdebug.abi32
.previous
.nan legacy
.module singlefloat
.module nooddspreg
.abicalls
.option pic0
.text
.align 2
.globl foo
.set nomips16
.set nomicromips
.ent foo
.type foo, @function
foo:
.frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0
.mask 0x00000000,0
.fmask 0x00000000,0
.set noreorder
.set nomacro
sw $6,0($4)
jr $31
sw $7,4($4)
[...]
So gcc does not transform double stores to 'swc1', it seems to be using softfp
in this case.
In an case, I think you can try replace LDFPR and STFPR on my patch to the with
'lwc1' and 'swc1' if __mips_fpr is 32. Something like:
#if __mips_fpr == 0 || __mips_fpr == 64
# define STFPR sdc1
#else if __mips_fpr == 32
# define STFPR swc1
#else
# define STFPR s.d
#endif
Assuming that the mips machine ou are targetting have the same set of floating
-point registers.
[1] https://www.linux-mips.org/wiki/R6000
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2022-02-22 20:05 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 [this message]
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
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-5Y1RQY7zJS@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).