OSDN Git Service

target/mips: Make the results of DIV_<U|S>.<B|H|W|D> the same as on hardware
authorMateja Marjanovic <Mateja.Marjanovic@rt-rk.com>
Tue, 2 Apr 2019 12:11:49 +0000 (14:11 +0200)
committerAleksandar Markovic <amarkovic@wavecomp.com>
Sun, 26 May 2019 15:32:31 +0000 (17:32 +0200)
commitd2a40a5f6938f30f44b536e997e1e89bb62b971c
treeea519320aa5f8fbcaca697858aee64fb26d7c00f
parenta7b21f6762a2d6ec08106d8a7ccb11829914523f
target/mips: Make the results of DIV_<U|S>.<B|H|W|D> the same as on hardware

MSA instructions DIV_<U|S>.<B|H|W|D> when dividing by zero,
didn't return the same value when executed on a referent hardware
(FPGA MIPS 64 r6, little endian) and when executed on QEMU, which
is not a real bug, because the result when dividing by zero is
UNPREDICTABLE [1] (page 141, 142).

[1] MIPS Architecture for Programmers
    Volume IV-j: The MIPS64 SIMD
    Architecture Module, Revision 1.12

Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1554207110-9113-2-git-send-email-mateja.marjanovic@rt-rk.com>
target/mips/msa_helper.c