summaryrefslogtreecommitdiffstats
path: root/target/mips/msa_helper.c
Commit message (Collapse)AuthorAgeFilesLines
* target/mips: msa: Split helpers for MULV.<B|H|W|D>Aleksandar Markovic2020-06-151-7/+72
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-15-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for SUBV.<B|H|W|D>Aleksandar Markovic2020-06-151-9/+72
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-14-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for SUBSUU_S.<B|H|W|D>Aleksandar Markovic2020-06-151-18/+84
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-13-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for SUBSUS_U.<B|H|W|D>Aleksandar Markovic2020-06-151-18/+84
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-12-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for SUBS_U.<B|H|W|D>Aleksandar Markovic2020-06-151-8/+74
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-11-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for SUBS_S.<B|H|W|D>Aleksandar Markovic2020-06-151-12/+78
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-10-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for DOTP_U.<H|W|D>Aleksandar Markovic2020-06-151-12/+53
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-9-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for DOTP_S.<H|W|D>Aleksandar Markovic2020-06-151-12/+54
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-8-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for DPSUB_U.<H|W|D>Aleksandar Markovic2020-06-151-13/+54
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-7-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for DPSUB_S.<H|W|D>Aleksandar Markovic2020-06-151-13/+54
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-6-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for DPADD_U.<H|W|D>Aleksandar Markovic2020-06-151-13/+54
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-5-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for DPADD_S.<H|W|D>Aleksandar Markovic2020-06-151-26/+64
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-4-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for MSUBV.<B|H|W|D>Aleksandar Markovic2020-06-151-7/+72
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-3-aleksandar.qemu.devel@gmail.com>
* target/mips: msa: Split helpers for MADDV.<B|H|W|D>Aleksandar Markovic2020-06-151-8/+71
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200613152133.8964-2-aleksandar.qemu.devel@gmail.com>
* target/mips: fpu: Refactor conversion from ieee to mips exception flagsAleksandar Markovic2020-06-091-25/+52
| | | | | | | | | | | | | 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>
* softfloat: Replace flag with boolRichard Henderson2020-05-191-5/+5
| | | | | | | | We have had this on the to-do list for quite some time. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/mips: Refactor handling of vector compare 'less than' (signed) ↵Filip Bozuta2019-10-251-30/+50
| | | | | | | | | | | | instructions Remove unnecessary argument and provide separate function for each instruction. Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571837825-24438-3-git-send-email-Filip.Bozuta@rt-rk.com>
* target/mips: Refactor handling of vector compare 'equal' instructionsFilip Bozuta2019-10-251-30/+50
| | | | | | | | | | Remove unnecessary argument and provide separate function for each instruction. Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571837825-24438-2-git-send-email-Filip.Bozuta@rt-rk.com>
* target/mips: msa: Split helpers for ASUB_<S|U>.<B|H|W|D>Aleksandar Markovic2019-10-251-18/+151
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Message-Id: <1571826227-10583-13-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for HSUB_<S|U>.<H|W|D>Aleksandar Markovic2019-10-251-13/+95
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Message-Id: <1571826227-10583-12-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for PCK<EV|OD>.<B|H|W|D>Aleksandar Markovic2019-10-251-178/+208
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-11-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for S<LL|RA|RAR|RL|RLR>.<B|H|W|D>Aleksandar Markovic2019-10-251-48/+376
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-10-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for HADD_<S|U>.<H|W|D>Aleksandar Markovic2019-10-251-24/+107
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-9-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for ADD<_A|S_A|S_S|S_U|V>.<B|H|W|D>Aleksandar Markovic2019-10-251-49/+377
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-8-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for ILV<EV|OD|L|R>.<B|H|W|D>Aleksandar Markovic2019-10-251-353/+415
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-7-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for <MAX|MIN>_<S|U>.<B|H|W|D>Aleksandar Markovic2019-10-251-28/+292
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-6-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for <MAX|MIN>_A.<B|H|W|D>Aleksandar Markovic2019-10-251-17/+146
| | | | | | | | Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-5-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Move helpers for <AND|NOR|OR|XOR>.VAleksandar Markovic2019-10-011-41/+40Star
| | | | | | | | Cosmetic reorganization. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-21-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Simplify and move helper for MOVE.VAleksandar Markovic2019-10-011-18/+13Star
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-20-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for MOD_<S|U>.<B|H|W|D>Aleksandar Markovic2019-10-011-18/+146
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-19-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for DIV_<S|U>.<B|H|W|D>Aleksandar Markovic2019-10-011-19/+148
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-18-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for CLT_<S|U>.<B|H|W|D>Aleksandar Markovic2019-10-011-14/+144
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-17-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for CLE_<S|U>.<B|H|W|D>Aleksandar Markovic2019-10-011-14/+144
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-16-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for CEQ.<B|H|W|D>Aleksandar Markovic2019-10-011-7/+66
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-15-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for AVER_<S|U>.<B|H|W|D>Aleksandar Markovic2019-10-011-16/+146
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-14-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for AVE_<S|U>.<B|H|W|D>Aleksandar Markovic2019-10-011-17/+145
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-13-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for B<CLR|NEG|SEL>.<B|H|W|D>Aleksandar Markovic2019-10-011-23/+204
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-12-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Unroll loops and demacro <BMNZ|BMZ|BSEL>.VAleksandar Markovic2019-10-011-24/+39
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-11-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for BINS<L|R>.<B|H|W|D>Aleksandar Markovic2019-10-011-34/+164
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-10-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for PCNT.<B|H|W|D>Aleksandar Markovic2019-10-011-69/+74
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-9-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: msa: Split helpers for <NLOC|NLZC>.<B|H|W|D>Aleksandar Markovic2019-10-011-29/+141
| | | | | | | | Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-8-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: rationalise softfloat includesAlex Bennée2019-08-191-0/+1
| | | | | | | | | | | | We should avoid including the whole of softfloat headers in cpu.h and explicitly include it only where we will be calling softfloat functions. We can use the -types.h in cpu.h for the few bits that are global. We also move the restore_snan_bit_mode into internal.h and include -helpers.h there. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
* target/mips: Fix emulation of MSA pack instructions on big endian hostsAleksandar Markovic2019-07-221-0/+74
| | | | | | | | Fix emulation of MSA pack instructions on big endian hosts. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1563812573-30309-3-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: Correct helper for MSA FCLASS.<W|D> instructionsAleksandar Markovic2019-07-021-1/+3
| | | | | | | | Correct helper for MSA FCLASS.<W|D> instructions. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1562068213-11307-8-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: Unroll loops for MSA float max/min instructionsAleksandar Markovic2019-07-021-73/+125
| | | | | | | | Slight preformance improvement for MSA float max/min instructions. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1562068213-11307-7-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: Correct comments in msa_helper.cAleksandar Markovic2019-07-021-17/+41
| | | | | | | | Fix some errors in comments for MSA helpers. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1562068213-11307-6-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: Fix big endian host behavior for interleave MSA instructionsAleksandar Markovic2019-06-261-12/+12
| | | | | | | | | | Fix big endian host behavior for interleave MSA instructions. Previous fix used TARGET_WORDS_BIGENDIAN instead of HOST_WORDS_BIGENDIAN, which was a mistake. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561543629-20327-9-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: Fix emulation of ILVR.<B|H|W> on big endian hostAleksandar Markovic2019-06-211-0/+37
| | | | | | | | | Fix emulation of ILVR.<B|H|W> on big endian host by applying mapping of data element indexes from one endian to another. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561038349-17105-5-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: Fix emulation of ILVL.<B|H|W> on big endian hostAleksandar Markovic2019-06-211-0/+37
| | | | | | | | | Fix emulation of ILVL.<B|H|W> on big endian host by applying mapping of data element indexes from one endian to another. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561038349-17105-4-git-send-email-aleksandar.markovic@rt-rk.com>
* target/mips: Fix emulation of ILVOD.<B|H|W> on big endian hostAleksandar Markovic2019-06-211-0/+37
| | | | | | | | | Fix emulation of ILVOD.<B|H|W> on big endian host by applying mapping of data element indexes from one endian to another. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561038349-17105-3-git-send-email-aleksandar.markovic@rt-rk.com>