qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] [V3 PATCH 02/14] target-ppc: Add ISA2.06 bpe


From: Alexander Graf
Subject: Re: [Qemu-devel] [Qemu-ppc] [V3 PATCH 02/14] target-ppc: Add ISA2.06 bpermd Instruction
Date: Mon, 30 Dec 2013 16:43:31 +0100


> Am 30.12.2013 um 15:48 schrieb Richard Henderson <address@hidden>:
> 
>> On 12/27/2013 04:23 PM, Scott Wood wrote:
>>> On Tue, 2013-12-24 at 07:17 -0800, Richard Henderson wrote:
>>>> On 12/18/2013 12:48 PM, Tom Musta wrote:
>>>> +DEF_HELPER_3(bpermd, i64, env, i64, i64)
>>> 
>>> Should be DEF_HELPER_FLAGS_2(bpermd, TCG_CALL_NO_RWG_SE, i64, i64, i64)
>>> 
>>>> +uint64_t helper_bpermd(CPUPPCState *env, uint64_t rs, uint64_t rb)
>>>> +{
>>>> +    int i;
>>>> +    uint64_t ra = 0;
>>>> +
>>>> +    for (i = 0; i < 8; i++) {
>>>> +        int index = (rs >> (i*8)) & 0xFF;
>>>> +        if (index < 64) {
>>>> +            if (rb & (1ul << (63-index))) {
>>>> +                ra |= 1 << i;
>>>> +            }
>>>> +        }
>>>> +    }
>>>> +    return ra;
>>>> +}
>>>> +
>>> 
>>> You don't need env as an argument; it's unused.
>>> 
>>> Why is all of this specific to ppc64?  Can't you run an ISA2.06B machine in
>>> 32-bit mode?
>> 
>> bpermd is a 64-bit instruction.  32-bit implementations do not have it.
> 
> What has that got to do with running a 64-bit chip in 32-bit mode?

Yes you can, but we only expose 64bit capable cpus with TARGET_PPC64 defined. 
You couldn't select them with the 32bit target.

There is even a special linux user target that loads 32bit binaries with the 
64bit emulator and 32bit syscall wrapper.

Or are you referring to something else than the #ifdef TARGET_PPC64?

Alex

> 
> 
> r~
> 
> 



reply via email to

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