3533ee301c
target/mips: Use FloatRoundMode enum for FCR31 modes conversion
...
Use the FloatRoundMode enum type introduced in commit 3dede407cc
("softfloat: Name rounding mode enum") instead of 'unsigned int'.
Suggested-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20201123204448.3260804-2-f4bug@amsat.org >
2020-12-13 20:27:11 +01:00
98cf80baa7
target/mips: Remove unused headers from fpu_helper.c
...
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20201206233949.3783184-4-f4bug@amsat.org >
2020-12-13 20:27:11 +01:00
89975214e6
target/mips: Fix Lesser GPL version number
...
There is no "version 2" of the "Lesser" General Public License.
It is either "GPL version 2.0" or "Lesser GPL version 2.1".
This patch replaces all occurrences of "Lesser GPL version 2" with
"Lesser GPL version 2.1" in comment section.
Signed-off-by: Chetan Pant <chetan4windows@gmail.com >
Reviewed-by: Thomas Huth <thuth@redhat.com >
Message-Id: <20201016143509.26692-1-chetan4windows@gmail.com >
[PMD: Split hw/ vs target/]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-11-03 16:51:13 +01:00
32eb97b5eb
target/mips: Demacro helpers for <MAX|MAXA|MIN|MINA>.<D|S>
...
Remove function definitions via macros to achieve better code clarity.
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <1602103041-32017-4-git-send-email-aleksandar.qemu.devel@gmail.com >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-10-17 11:09:33 +02:00
be0cb99426
target/mips: Demacro helpers for M<ADD|SUB>F.<D|S>
...
Remove function definitions via macros to achieve better code clarity.
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <1602103041-32017-3-git-send-email-aleksandar.qemu.devel@gmail.com >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-10-17 11:09:33 +02:00
8a6c9e0fdd
target/mips: Demacro helpers for <ABS|CHS>.<D|S|PS>
...
Remove function definitions via macros to achieve better code clarity.
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <1602103041-32017-2-git-send-email-aleksandar.qemu.devel@gmail.com >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-10-17 11:09:33 +02:00
dda97e385b
target/mips: Fix ADD.S FPU instruction
...
After merging latest QEMU upstream into our CHERI fork,
I noticed that some of the FPU tests in our MIPS baremetal
testsuite [*] started failing.
It turns out commit 1ace099f2a
accidentally changed add.s
into a subtract.
[*] https://github.com/CTSRD-CHERI/cheritest
Fixes: 1ace099f2a
("target/mips: fpu: Demacro ADD.<D|S|PS>")
Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20200703161515.25966-1-Alexander.Richardson@cl.cam.ac.uk >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-07-14 21:49:33 +02:00
9579f78168
target/mips: fpu: Refactor conversion from ieee to mips exception flags
...
The original coversion function is used for regular and MSA floating
point instructions handling. Since there are some nuanced differences
between regular and MSA floating point exception handling, provide two
instances of the conversion function, rather than just a single common
one. Inline both instances of this function instances for the sake of
performance. Improve variable naming in surrounding code for clarity.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-17-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
485cd2e4ce
target/mips: fpu: Name better paired-single variables
...
Use consistently 'l' and 'h' for low and high halves.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-16-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
bdbe48db40
target/mips: fpu: Remove now unused FLOAT_RINT macro
...
After demacroing RINT.<D|S>, this macro is not needed anymore.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-15-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
728e424690
target/mips: fpu: Demacro RINT.<D|S>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-14-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
6971a1b970
target/mips: fpu: Remove now unused FLOAT_CLASS macro
...
After demacroing CLASS.<D|S>, this macro is not needed anymore.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-13-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
0bd99ac77c
target/mips: fpu: Demacro CLASS.<D|S>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-12-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
32574f1d1c
target/mips: fpu: Remove now unused UNFUSED_FMA and FLOAT_FMA macros
...
After demacroing <MADD|MSUB|NMADD|NMSUB>.<D|S|PS>, these macros
are not needed anymore.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-11-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
5c591e2259
target/mips: fpu: Demacro NMSUB.<D|S|PS>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-10-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
0278586d60
target/mips: fpu: Demacro NMADD.<D|S|PS>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-9-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
faec75244c
target/mips: fpu: Demacro MSUB.<D|S|PS>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-8-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
16734cc1da
target/mips: fpu: Demacro MADD.<D|S|PS>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-7-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
8248c9c5b2
target/mips: fpu: Remove now unused macro FLOAT_BINOP
...
After demacroing <ADD|SUB|MUL|DIV>.<D|S|PS>, this macro is not
needed anymore.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-6-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
bcca8c4b1a
target/mips: fpu: Demacro DIV.<D|S|PS>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-5-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
11811198ef
target/mips: fpu: Demacro MUL.<D|S|PS>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-4-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
92ebdd7fa4
target/mips: fpu: Demacro SUB.<D|S|PS>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-3-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
1ace099f2a
target/mips: fpu: Demacro ADD.<D|S|PS>
...
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com >
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com >
Message-Id: <20200518200920.17344-2-aleksandar.qemu.devel@gmail.com >
2020-06-09 17:32:45 +02:00
7b77f048e2
target/mips: Separate FPU-related helpers into their own file
...
For clarity and easier maintenence, create target/mips/fpu_helper.c, and
move all FPU-related content form target/mips/op_helper.c to that file.
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com >
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com >
Message-Id: <1580745443-24650-3-git-send-email-aleksandar.markovic@rt-rk.com >
2020-02-04 08:53:54 +01:00