aboutsummaryrefslogtreecommitdiff
path: root/target/mips/fpu_helper.c
AgeCommit message (Collapse)Author
2020-07-14target/mips: Fix ADD.S FPU instructionAlex Richardson
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-06-09target/mips: fpu: Refactor conversion from ieee to mips exception flagsAleksandar Markovic
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-09target/mips: fpu: Name better paired-single variablesAleksandar Markovic
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-09target/mips: fpu: Remove now unused FLOAT_RINT macroAleksandar Markovic
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-09target/mips: fpu: Demacro RINT.<D|S>Aleksandar Markovic
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-09target/mips: fpu: Remove now unused FLOAT_CLASS macroAleksandar Markovic
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-09target/mips: fpu: Demacro CLASS.<D|S>Aleksandar Markovic
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-09target/mips: fpu: Remove now unused UNFUSED_FMA and FLOAT_FMA macrosAleksandar Markovic
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-09target/mips: fpu: Demacro NMSUB.<D|S|PS>Aleksandar Markovic
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-09target/mips: fpu: Demacro NMADD.<D|S|PS>Aleksandar Markovic
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-09target/mips: fpu: Demacro MSUB.<D|S|PS>Aleksandar Markovic
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-09target/mips: fpu: Demacro MADD.<D|S|PS>Aleksandar Markovic
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-09target/mips: fpu: Remove now unused macro FLOAT_BINOPAleksandar Markovic
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-09target/mips: fpu: Demacro DIV.<D|S|PS>Aleksandar Markovic
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-09target/mips: fpu: Demacro MUL.<D|S|PS>Aleksandar Markovic
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-09target/mips: fpu: Demacro SUB.<D|S|PS>Aleksandar Markovic
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-09target/mips: fpu: Demacro ADD.<D|S|PS>Aleksandar Markovic
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-02-04target/mips: Separate FPU-related helpers into their own fileAleksandar Markovic
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>