]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/test_emulate_step: Add testcases for divde[.] and divdeu[.] instructions
authorBalamuruhan S <bala24@linux.ibm.com>
Tue, 28 Jul 2020 13:03:08 +0000 (18:33 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jul 2020 13:47:52 +0000 (23:47 +1000)
commit241756d0a231d78ade1d777d49706a27ec85ecb5
tree921ab79d7fb91870ffe0e83a2a6a7ebeeb7ab07d
parent0b3beac8970d62a3d5b238ed03164beccbc6b718
powerpc/test_emulate_step: Add testcases for divde[.] and divdeu[.] instructions

Add testcases for divde, divde., divdeu, divdeu. emulated instructions
to cover few scenarios,
  - with same dividend and divisor to have undefine RT
    for divdeu[.]
  - with divide by zero to have undefine RT for both
    divde[.] and divdeu[.]
  - with negative dividend to cover -|divisor| < r <= 0 if
    the dividend is negative for divde[.]
  - normal case with proper dividend and divisor for both
    divde[.] and divdeu[.]

Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
Reviewed-by: Sandipan Das <sandipan@linux.ibm.com>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200728130308.1790982-4-bala24@linux.ibm.com
arch/powerpc/lib/test_emulate_step.c