[PATCH] [POWERPC] Emulate isel (Integer Select) instruction

Kumar Gala galak at kernel.crashing.org
Thu Nov 22 02:34:36 EST 2007


On Nov 21, 2007, at 8:33 AM, Geert Uytterhoeven wrote:

> On Wed, 21 Nov 2007, Kumar Gala wrote:
>> On Nov 21, 2007, at 7:09 AM, Geert Uytterhoeven wrote:
>>> On Tue, 20 Nov 2007, Kumar Gala wrote:
>>>> On Nov 20, 2007, at 11:54 AM, Scott Wood wrote:
>>>>> On Mon, Nov 19, 2007 at 09:36:57PM -0600, Kumar Gala wrote:
>>>>>> isel (Integer Select) is a new user space instruction in the
>>>>>> PowerISA 2.04 spec.  Not all processors implement it so lets  
>>>>>> emulate
>>>>>> to ensure code built with isel will run everywhere.
>>>>>
>>>>> Given that the instruction is meant to be a performance  
>>>>> enhancement,
>>>>> we should probably warn the first few times it's emulated, so  
>>>>> the user
>>>>> knows they should change their toolchain setup if possible.
>>>>
>>>> The same is true of mcrxr, popcntb, and possibly string ld/st.
>>>>
>>>> Feel free to submit a patch that warns about their usage.
>>>
>>> Something like this?
>>>
>>> Probably we also want it for:
>>>
>>> - arch/powerpc/kernel/align.c
>>>     o emulate_dcbz()
>>>     o emulate_multiple()
>>>     o emulate_fp_pair()
>>>     o emulate_spe()
>>>
>>> - arch/powerpc/kernel/softemu8xx.c
>>>     o Soft_emulate_8xx()
>>>
>>> - arch/powerpc/kernel/traps.c
>>>     o SoftwareEmulation()
>>
>> You missed math_emu.
>>
>>>  - arch/powerpc/kernel/vecemu.c
>>>     o emulate_altivec()
>>
>> I'm not sure I would concern this one emulation, there isn't much  
>> you can do
>> about the denorm fixup.
>>
>> How about some per processor counters in sysfs under the processor.
>
> Good idea!
>
>>> Question: do we want it for emulate_single_step(), too?
>>
>> What do you mean, we should could the emulation, the emulate single  
>> step just
>> is for handling if you are doing debug while hitting an emulated  
>> insn.
>
> I mean: should these be counted?

the number of emulated single steps insn?  not sure I follow.  I think  
we should count regardless if we go through emulate_single_step().

- k



More information about the Linuxppc-dev mailing list