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)
commitb859c95cf4b936b5e8019e7ab68ee2740e609ffd
tree921ab79d7fb91870ffe0e83a2a6a7ebeeb7ab07d
parent151c32bf5ebdd41114267717dc4b53d2632cbd30
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