On 07/18/2016 10:38 AM, Nikunj A Dadhania wrote:
David Gibson <da...@gibson.dropbear.id.au> writes:

[ Unknown signature status ]
On Tue, Jul 12, 2016 at 11:33:21PM +0530, Nikunj A Dadhania wrote:
Adding following instructions:

moduw: Modulo Unsigned Word
modsw: Modulo Signed Word

Signed-off-by: Nikunj A Dadhania <nik...@linux.vnet.ibm.com>

Hrm.. any reason you're not using the TCG inbuilt remainder ops
(tcg_gen_rem_i32() etc.)?

I have an updated version with me which uses inbuilt ops, i was searching
for modulo expressions, which I didn't find, so wrote. Found later that
it is called tcg_gen_rem. Will send in the next version.

It would probably be better to use helper functions for both div and mod, because of the branches required.

C.f. target-arm/helper-a64.c, helper_sdiv64 et al.


r~


Reply via email to