[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [RFC 5/6] target-ppc: add modulo word operat
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [RFC 5/6] target-ppc: add modulo word operations |
Date: |
Thu, 21 Jul 2016 13:41:57 +0530 |
User-agent: |
Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu) |
Richard Henderson <address@hidden> writes:
> 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.
What is the thumb rule to implement it has helper?
As I am implementing other instructions as well.
One as you suggested many branches.
Regards
Nikunj
- Re: [Qemu-ppc] [Qemu-devel] [RFC 1/6] target-ppc: Introduce Power9 family, (continued)
[Qemu-ppc] [RFC 6/6] target-ppc: add modulo dword operations, Nikunj A Dadhania, 2016/07/12
[Qemu-ppc] [RFC 4/6] target-ppc: add cmprb instruction, Nikunj A Dadhania, 2016/07/12
[Qemu-ppc] [RFC 3/6] target-ppc: adding addpcis instruction, Nikunj A Dadhania, 2016/07/12