sim: mips: use sim_fpu_to{32,64}u to fix build warnings
authorTiezhu Yang <yangtiezhu@loongson.cn>
Sat, 6 Nov 2021 09:50:20 +0000 (17:50 +0800)
committerMike Frysinger <vapier@gentoo.org>
Sat, 6 Nov 2021 16:19:58 +0000 (12:19 -0400)
commit50a97903cea702f618328babd9093bd1fefbd7f1
tree73ae972b0fb510b084f645d7613eb48dabd74114
parent314ec7aeeb1b2e68f0d8fb9990f2335f475a6e33
sim: mips: use sim_fpu_to{32,64}u to fix build warnings

Since the first argument type is unsigned32 or unsigned64, just use
sim_fpu_to{32,64}u instead of sim_fpu_to{32,64}i to fix the following
build warnings:

  CC     cp1.o
.../sim/mips/cp1.c: In function 'convert':
.../sim/mips/cp1.c:1425:32: warning: pointer targets in passing argument 1 of 'sim_fpu_to32i' differ in signedness [-Wpointer-sign]
       status |= sim_fpu_to32i (&result32, &wop, round);
                                ^~~~~~~~~
In file included from .../sim/mips/sim-main.h:67,
                 from .../sim/mips/cp1.c:46:
.../sim/mips/../common/sim-fpu.h:270:22: note: expected 'signed32 *' {aka 'int *'} but argument is of type 'unsigned32 *' {aka 'unsigned int *'}
 INLINE_SIM_FPU (int) sim_fpu_to32i (signed32 *i, const sim_fpu *f,
                      ^~~~~~~~~~~~~
.../sim/mips/cp1.c:1429:32: warning: pointer targets in passing argument 1 of 'sim_fpu_to64i' differ in signedness [-Wpointer-sign]
       status |= sim_fpu_to64i (&result64, &wop, round);
                                ^~~~~~~~~
In file included from .../sim/mips/sim-main.h:67,
                 from .../sim/mips/cp1.c:46:
.../sim/mips/../common/sim-fpu.h:274:22: note: expected 'signed64 *' {aka 'long int *'} but argument is of type 'unsigned64 *' {aka 'long unsigned int *'}
 INLINE_SIM_FPU (int) sim_fpu_to64i (signed64 *i, const sim_fpu *f,
                      ^~~~~~~~~~~~~
.../sim/mips/cp1.c: In function 'convert_ps':
.../sim/mips/cp1.c:1528:34: warning: pointer targets in passing argument 1 of 'sim_fpu_to32i' differ in signedness [-Wpointer-sign]
       status_u |= sim_fpu_to32i (&res_u, &wop_u, round);
                                  ^~~~~~
In file included from .../sim/mips/sim-main.h:67,
                 from .../sim/mips/cp1.c:46:
.../sim/mips/../common/sim-fpu.h:270:22: note: expected 'signed32 *' {aka 'int *'} but argument is of type 'unsigned32 *' {aka 'unsigned int *'}
 INLINE_SIM_FPU (int) sim_fpu_to32i (signed32 *i, const sim_fpu *f,
                      ^~~~~~~~~~~~~
.../sim/mips/cp1.c:1529:34: warning: pointer targets in passing argument 1 of 'sim_fpu_to32i' differ in signedness [-Wpointer-sign]
       status_l |= sim_fpu_to32i (&res_l, &wop_l, round);
                                  ^~~~~~
In file included from .../sim/mips/sim-main.h:67,
                 from .../sim/mips/cp1.c:46:
.../sim/mips/../common/sim-fpu.h:270:22: note: expected 'signed32 *' {aka 'int *'} but argument is of type 'unsigned32 *' {aka 'unsigned int *'}
 INLINE_SIM_FPU (int) sim_fpu_to32i (signed32 *i, const sim_fpu *f,
                      ^~~~~~~~~~~~~

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
sim/mips/Makefile.in
sim/mips/cp1.c