qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 5/6] target-ppc: add modulo word operations


From: Richard Henderson
Subject: Re: [Qemu-devel] [RFC 5/6] target-ppc: add modulo word operations
Date: Thu, 21 Jul 2016 11:54:39 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 07/18/2016 10:38 AM, Nikunj A Dadhania wrote:
David Gibson <address@hidden> 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 <address@hidden>

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

[Prev in Thread] Current Thread [Next in Thread]