ppc64: Fix patterns for rotate doubleword instructions
PATCH v2 1/1 ppc64: Fix patterns for rotate doubleword instructions
The patterns for the following instructions are fixed:
* Rotate Left Doubleword then Clear Right (rldcr[.])
* Rotate Left Doubleword Immediate then Clear Right (rldicr[.])
* Rotate Left Doubleword Immediate then Mask Insert (rldimi[.])
The first instruction has a typo. For the other two instructions, the extended opcodes are incorrect and the shift field 'sha' is absent. Also, the shift field 'sh' should be used in place of the register field 'rb'.
--- ppc64.risu | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
ppc64.risu +5 -5
@@ -1451,7 +1451,7 @@ RLDCLd PPC64LE 011110 rs:5 ra:5 rb:5 mb:6 10001 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MDS book:I page:103 PPC SR rldcr Rotate Left Dword then Clear Right -RLCDR PPC64LE 011110 rs:5 ra:5 rb:5 mb:6 10010 \ +RLDCR PPC64LE 011110 rs:5 ra:5 rb:5 mb:6 10010 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MDS book:I page:103 PPC SR rldcr Rotate Left Dword then Clear Right RLDCRd PPC64LE 011110 rs:5 ra:5 rb:5 mb:6 10011 \
@@ -1472,17 +1472,17 @@ RLDICLd PPC64LE 011110 rs:5 ra:5 sh:5 mb:6 000 sha:1 1 \ !constraints { $rs != 1 && $ra != 1 && $rs != 13 && $ra != 13; } # format:MD book:I page:105 PPC SR rldicr[.] Rotate Left Dword Immediate then Clear Right -RLDICR PPC64LE 011110 rs:5 ra:5 rb:5 me:6 00010 \ +RLDICR PPC64LE 011110 rs:5 ra:5 sh:5 me:6 001 sha:1 0 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MD book:I page:105 PPC SR rldicr[.] Rotate Left Dword Immediate then Clear Right -RLDICRd PPC64LE 011110 rs:5 ra:5 rb:5 me:6 00011 \ +RLDICRd PPC64LE 011110 rs:5 ra:5 sh:5 me:6 001 sha:1 1 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MD book:I page:105 PPC SR rldimi[.] Rotate Left Dword Immediate then Mask Insert -RLDIMI PPC64LE 011110 rs:5 ra:5 rb:5 me:6 00110 \ +RLDIMI PPC64LE 011110 rs:5 ra:5 sh:5 me:6 011 sha:1 0 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MD book:I page:105 PPC SR rldimi[.] Rotate Left Dword Immediate then Mask Insert -RLDIMId PPC64LE 011110 rs:5 ra:5 rb:5 me:6 00111 \ +RLDIMId PPC64LE 011110 rs:5 ra:5 sh:5 me:6 011 sha:1 1 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:M book:I page:102 v:P1 SR rlwimi[.] Rotate Left Word Immediate then Mask Insert
Signature · 1 line
2.7.4
Quoted 11 lines · Sandipan Das
The patterns for the following instructions are fixed:
* Rotate Left Doubleword then Clear Right (rldcr[.])
* Rotate Left Doubleword Immediate then Clear Right (rldicr[.])
* Rotate Left Doubleword Immediate then Mask Insert (rldimi[.])The first instruction has a typo. For the other two instructions, the extended opcodes are incorrect and the shift field 'sha' is absent. Also, the shift field 'sh' should be used in place of the register field 'rb'.
Signed-off-by Sandipan Das <[email protected]>
Quoted 41 lines
--- ppc64.risu | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)ppc64.risu +5
-5@@ -1451,7 +1451,7 @@ RLDCLd PPC64LE 011110 rs:5 ra:5 rb:5 mb:6 10001 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MDS book:I page:103 PPC SR rldcr Rotate Left Dword then Clear Right -RLCDR PPC64LE 011110 rs:5 ra:5 rb:5 mb:6 10010 \ +RLDCR PPC64LE 011110 rs:5 ra:5 rb:5 mb:6 10010 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MDS book:I page:103 PPC SR rldcr Rotate Left Dword then Clear Right RLDCRd PPC64LE 011110 rs:5 ra:5 rb:5 mb:6 10011 \@@ -1472,17 +1472,17 @@ RLDICLd PPC64LE 011110 rs:5 ra:5 sh:5 mb:6 000 sha:1 1 \ !constraints { $rs != 1 && $ra != 1 && $rs != 13 && $ra != 13; } # format:MD book:I page:105 PPC SR rldicr[.] Rotate Left Dword Immediate then Clear Right -RLDICR PPC64LE 011110 rs:5 ra:5 rb:5 me:6 00010 \ +RLDICR PPC64LE 011110 rs:5 ra:5 sh:5 me:6 001 sha:1 0 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MD book:I page:105 PPC SR rldicr[.] Rotate Left Dword Immediate then Clear Right -RLDICRd PPC64LE 011110 rs:5 ra:5 rb:5 me:6 00011 \ +RLDICRd PPC64LE 011110 rs:5 ra:5 sh:5 me:6 001 sha:1 1 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MD book:I page:105 PPC SR rldimi[.] Rotate Left Dword Immediate then Mask Insert -RLDIMI PPC64LE 011110 rs:5 ra:5 rb:5 me:6 00110 \ +RLDIMI PPC64LE 011110 rs:5 ra:5 sh:5 me:6 011 sha:1 0 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:MD book:I page:105 PPC SR rldimi[.] Rotate Left Dword Immediate then Mask Insert -RLDIMId PPC64LE 011110 rs:5 ra:5 rb:5 me:6 00111 \ +RLDIMId PPC64LE 011110 rs:5 ra:5 sh:5 me:6 011 sha:1 1 \ !constraints { $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } # format:M book:I page:102 v:P1 SR rlwimi[.] Rotate Left Word Immediate then Mask InsertSignature · 1 line
2.7.4
Quoted 7 lines · Nikunj A Dadhania
Quoted 5 lines · Sandipan Das
The patterns for the following instructions are fixed:
* Rotate Left Doubleword then Clear Right (rldcr[.])
* Rotate Left Doubleword Immediate then Clear Right (rldicr[.])
* Rotate Left Doubleword Immediate then Mask Insert (rldimi[.])
Quoted 8 lines
Quoted 6 lines
The first instruction has a typo. For the other two instructions, the extended opcodes are incorrect and the shift field 'sha' is absent. Also, the shift field 'sh' should be used in place of the register field 'rb'.
Signed-off-by Sandipan Das <[email protected]>Reviewed-by Nikunj A Dadhania <[email protected]>
Thanks; applied to risu master.
-- PMM
Quoted 13 lines · Peter Maydell
Quoted 12 lines · Nikunj A Dadhania
Quoted 10 lines · Sandipan Das
The patterns for the following instructions are fixed:
* Rotate Left Doubleword then Clear Right (rldcr[.])
* Rotate Left Doubleword Immediate then Clear Right (rldicr[.])
* Rotate Left Doubleword Immediate then Mask Insert (rldimi[.])The first instruction has a typo. For the other two instructions, the extended opcodes are incorrect and the shift field 'sha' is absent. Also, the shift field 'sh' should be used in place of the register field 'rb'.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Sandipan Das <[email protected]>Reviewed-by Nikunj A Dadhania <[email protected]>Thanks; applied to risu master.
...but I foolishly didn't run build-all-archs first, which points out that there's a bug:
Syntax error detected evaluating RLDIMId PPC64LE constraints string: ]
{ $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } Global symbol "$rb" requires explicit package name (did you forget to declare "my $rb"?) at (eval 429) line 1.
Global symbol "$rb" requires explicit package name (did you forget to declare "my $rb"?) at (eval 429) line 1.
You forgot to update the constraints when you changed the field names... I think that the constraints on $rb should be removed rather than just changed to use $sh because this field is an immediate, not a register number, so we don't need to make it avoid 1 and 13. This would bring them into line with the other rotate-immediates. I'll post a patch in a second.
thanks
-- PMM
Quoted 14 lines · Peter Maydell
Quoted 13 lines · Peter Maydell
Quoted 12 lines · Nikunj A Dadhania
Quoted 10 lines · Sandipan Das
The patterns for the following instructions are fixed:
* Rotate Left Doubleword then Clear Right (rldcr[.])
* Rotate Left Doubleword Immediate then Clear Right (rldicr[.])
* Rotate Left Doubleword Immediate then Mask Insert (rldimi[.])The first instruction has a typo. For the other two instructions, the extended opcodes are incorrect and the shift field 'sha' is absent. Also, the shift field 'sh' should be used in place of the register field 'rb'.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Sandipan Das <[email protected]>Reviewed-by Nikunj A Dadhania <[email protected]>Thanks; applied to risu master.
...but I foolishly didn't run build-all-archs first, which points out that there's a bug:
Ouch :(
Quoted 7 lines
Syntax error detected evaluating RLDIMId PPC64LE constraints string: ]
{ $rs != 1 && $ra != 1 && $rb != 1 && $rs != 13 && $ra != 13 && $rb != 13; } Global symbol "$rb" requires explicit package name (did you forget to declare "my $rb"?) at (eval 429) line 1.
Global symbol "$rb" requires explicit package name (did you forget to declare "my $rb"?) at (eval 429) line 1.
Quoted 6 lines
You forgot to update the constraints when you changed the field names... I think that the constraints on $rb should be removed rather than just changed to use $sh because this field is an immediate, not a register number, so we don't need to make it avoid 1 and 13. This would bring them into line with the other rotate-immediates. I'll post a patch in a second.
Regards
Nikunj