Patchwork [3/3] target-arm: explicitly decode SEVL instruction

login
register
mail settings
Submitter Måns Rullgård
Date June 7, 2013, 12:06 p.m.
Message ID <1370606786-5650-3-git-send-email-mans@mansr.com>
Download mbox | patch
Permalink /patch/249753/
State New
Headers show

Comments

Måns Rullgård - June 7, 2013, 12:06 p.m.
The ARMv8 SEVL instruction is in the architectural hint space already
emulated as nop.  This makes the decoding of SEVL explicit for clarity.

Signed-off-by: Mans Rullgard <mans@mansr.com>
---
 target-arm/translate.c | 1 +
 1 file changed, 1 insertion(+)
Peter Maydell - June 13, 2013, 12:59 p.m.
On 7 June 2013 13:06, Mans Rullgard <mans@mansr.com> wrote:
> The ARMv8 SEVL instruction is in the architectural hint space already
> emulated as nop.  This makes the decoding of SEVL explicit for clarity.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM
Andreas Färber - June 13, 2013, 1:15 p.m.
Am 07.06.2013 14:06, schrieb Mans Rullgard:
> The ARMv8 SEVL instruction is in the architectural hint space already
> emulated as nop.  This makes the decoding of SEVL explicit for clarity.
> 
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---
>  target-arm/translate.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index f529257..cfd148e 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -3501,6 +3501,7 @@ static void gen_nop_hint(DisasContext *s, int val)
>          break;
>      case 2: /* wfe */
>      case 4: /* sev */
> +    case 5: /* sevl */
>          /* TODO: Implement SEV and WFE.  May help SMP performance.  */
>      default: /* nop */
>          break;

So does SEVL need to be implemented? Then the TODO should be updated.
Otherwise moving it a line down may be clearer.

Regards,
Andreas
Måns Rullgård - June 13, 2013, 1:39 p.m.
Andreas Färber <afaerber@suse.de> writes:

> Am 07.06.2013 14:06, schrieb Mans Rullgard:
>> The ARMv8 SEVL instruction is in the architectural hint space already
>> emulated as nop.  This makes the decoding of SEVL explicit for clarity.
>> 
>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>> ---
>>  target-arm/translate.c | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/target-arm/translate.c b/target-arm/translate.c
>> index f529257..cfd148e 100644
>> --- a/target-arm/translate.c
>> +++ b/target-arm/translate.c
>> @@ -3501,6 +3501,7 @@ static void gen_nop_hint(DisasContext *s, int val)
>>          break;
>>      case 2: /* wfe */
>>      case 4: /* sev */
>> +    case 5: /* sevl */
>>          /* TODO: Implement SEV and WFE.  May help SMP performance.  */
>>      default: /* nop */
>>          break;
>
> So does SEVL need to be implemented? Then the TODO should be updated.
> Otherwise moving it a line down may be clearer.

It needs to be implemented when/if SEV and WFE are.
Peter Maydell - July 2, 2013, 12:53 p.m.
On 13 June 2013 14:15, Andreas Färber <afaerber@suse.de> wrote:
> Am 07.06.2013 14:06, schrieb Mans Rullgard:
>>      case 2: /* wfe */
>>      case 4: /* sev */
>> +    case 5: /* sevl */
>>          /* TODO: Implement SEV and WFE.  May help SMP performance.  */
>>      default: /* nop */
>>          break;
>
> So does SEVL need to be implemented? Then the TODO should be updated.
> Otherwise moving it a line down may be clearer.

I updated the comment to mention SEVL as part of taking this patch
into target-arm.next.

thanks
-- PMM

Patch

diff --git a/target-arm/translate.c b/target-arm/translate.c
index f529257..cfd148e 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -3501,6 +3501,7 @@  static void gen_nop_hint(DisasContext *s, int val)
         break;
     case 2: /* wfe */
     case 4: /* sev */
+    case 5: /* sevl */
         /* TODO: Implement SEV and WFE.  May help SMP performance.  */
     default: /* nop */
         break;