diff mbox

[16/16] exec-all.h: Increase MAX_OP_PER_INSTR for ARM A64 decoder

Message ID 1394377867-7115-17-git-send-email-peter.maydell@linaro.org
State Superseded
Headers show

Commit Message

Peter Maydell March 9, 2014, 3:11 p.m. UTC
The ARM A64 decoder's worst case number of TCG ops per instruction
is 266 (for insn 0x4c800000, a post-indexed ST4 multiple-structures
store). Raise the MAX_OP_PER_INSTR define accordingly.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/exec/exec-all.h    |  2 +-
 target-arm/translate-a64.c | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

Comments

Michael Matz March 10, 2014, 1:24 p.m. UTC | #1
Hi,

On Sun, 9 Mar 2014, Peter Maydell wrote:

> diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
> index 6a3597d..2435c95 100644
> --- a/target-arm/translate-a64.c
> +++ b/target-arm/translate-a64.c
> @@ -9007,9 +9007,8 @@ static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn)
>          case 0x19: /* FRINTM */
>          case 0x38: /* FRINTP */
>          case 0x39: /* FRINTZ */
> -        case 0x58: /* FRINTA */
>              need_rmode = true;
> -            rmode = extract32(opcode, 5, 2) | (extract32(opcode, 0, 1) << 1);
> +            rmode = extract32(opcode, 5, 1) | (extract32(opcode, 0, 1) << 1);
>              /* fall through */
>          case 0x59: /* FRINTX */
>          case 0x79: /* FRINTI */
> @@ -9019,6 +9018,15 @@ static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn)
>                  return;
>              }
>              break;
> +        case 0x58: /* FRINTA */
> +            need_rmode = true;
> +            rmode = FPROUNDING_TIEAWAY;
> +            need_fpstatus = true;
> +            if (size == 3 && !is_q) {
> +                unallocated_encoding(s);
> +                return;
> +            }
> +            break;

Merge the above into [15/16] ?


Ciao,
Michael.
Peter Maydell March 10, 2014, 1:27 p.m. UTC | #2
On 10 March 2014 13:24, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Sun, 9 Mar 2014, Peter Maydell wrote:
>
>> diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
>> index 6a3597d..2435c95 100644
>> --- a/target-arm/translate-a64.c
>> +++ b/target-arm/translate-a64.c
>> @@ -9007,9 +9007,8 @@ static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn)
>>          case 0x19: /* FRINTM */
>>          case 0x38: /* FRINTP */
>>          case 0x39: /* FRINTZ */
>> -        case 0x58: /* FRINTA */
>>              need_rmode = true;
>> -            rmode = extract32(opcode, 5, 2) | (extract32(opcode, 0, 1) << 1);
>> +            rmode = extract32(opcode, 5, 1) | (extract32(opcode, 0, 1) << 1);
>>              /* fall through */
>>          case 0x59: /* FRINTX */
>>          case 0x79: /* FRINTI */
>> @@ -9019,6 +9018,15 @@ static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn)
>>                  return;
>>              }
>>              break;
>> +        case 0x58: /* FRINTA */
>> +            need_rmode = true;
>> +            rmode = FPROUNDING_TIEAWAY;
>> +            need_fpstatus = true;
>> +            if (size == 3 && !is_q) {
>> +                unallocated_encoding(s);
>> +                return;
>> +            }
>> +            break;
>
> Merge the above into [15/16] ?

Yes, indeed. I obviously refreshed these FRINT
changes into the wrong patch.

thanks
-- PMM
diff mbox

Patch

diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index a387922..6af84f6 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -44,7 +44,7 @@  struct TranslationBlock;
 typedef struct TranslationBlock TranslationBlock;
 
 /* XXX: make safe guess about sizes */
-#define MAX_OP_PER_INSTR 208
+#define MAX_OP_PER_INSTR 266
 
 #if HOST_LONG_BITS == 32
 #define MAX_OPC_PARAM_PER_ARG 2
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
index 6a3597d..2435c95 100644
--- a/target-arm/translate-a64.c
+++ b/target-arm/translate-a64.c
@@ -9007,9 +9007,8 @@  static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn)
         case 0x19: /* FRINTM */
         case 0x38: /* FRINTP */
         case 0x39: /* FRINTZ */
-        case 0x58: /* FRINTA */
             need_rmode = true;
-            rmode = extract32(opcode, 5, 2) | (extract32(opcode, 0, 1) << 1);
+            rmode = extract32(opcode, 5, 1) | (extract32(opcode, 0, 1) << 1);
             /* fall through */
         case 0x59: /* FRINTX */
         case 0x79: /* FRINTI */
@@ -9019,6 +9018,15 @@  static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn)
                 return;
             }
             break;
+        case 0x58: /* FRINTA */
+            need_rmode = true;
+            rmode = FPROUNDING_TIEAWAY;
+            need_fpstatus = true;
+            if (size == 3 && !is_q) {
+                unallocated_encoding(s);
+                return;
+            }
+            break;
         case 0x3c: /* URECPE */
         case 0x3d: /* FRECPE */
         case 0x56: /* FCVTXN, FCVTXN2 */