diff mbox series

[v1,1/8] s390x/tcg: Implement ADD HALFWORD (AGH)

Message ID 20200922103129.12824-2-david@redhat.com
State New
Headers show
Series s390x/tcg: Implement some z14 facilities | expand

Commit Message

David Hildenbrand Sept. 22, 2020, 10:31 a.m. UTC
Easy, just like ADD HALFWORD IMMEDIATE (AGHI).

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 target/s390x/insn-data.def | 1 +
 target/s390x/translate.c   | 1 +
 2 files changed, 2 insertions(+)

Comments

Thomas Huth Sept. 23, 2020, 4:49 a.m. UTC | #1
On 22/09/2020 12.31, David Hildenbrand wrote:
> Easy, just like ADD HALFWORD IMMEDIATE (AGHI).

> 

> Signed-off-by: David Hildenbrand <david@redhat.com>

> ---

>  target/s390x/insn-data.def | 1 +

>  target/s390x/translate.c   | 1 +

>  2 files changed, 2 insertions(+)

> 

> diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def

> index d79ae9e3f1..8dbeaf8c49 100644

> --- a/target/s390x/insn-data.def

> +++ b/target/s390x/insn-data.def

> @@ -52,6 +52,7 @@

>  /* ADD HALFWORD */

>      C(0x4a00, AH,      RX_a,  Z,   r1, m2_16s, new, r1_32, add, adds32)

>      C(0xe37a, AHY,     RXY_a, LD,  r1, m2_16s, new, r1_32, add, adds32)

> +    C(0xe338, AGH,     RXY_a, MIE2,r1, m2_16s, r1, 0, add, adds64)

>  /* ADD HALFWORD IMMEDIATE */

>      C(0xa70a, AHI,     RI_a,  Z,   r1, i2, new, r1_32, add, adds32)

>      C(0xa70b, AGHI,    RI_a,  Z,   r1, i2, r1, 0, add, adds64)

> diff --git a/target/s390x/translate.c b/target/s390x/translate.c

> index a777343821..21d77b7e74 100644

> --- a/target/s390x/translate.c

> +++ b/target/s390x/translate.c

> @@ -6098,6 +6098,7 @@ enum DisasInsnEnum {

>  #define FAC_AIS         S390_FEAT_ADAPTER_INT_SUPPRESSION

>  #define FAC_V           S390_FEAT_VECTOR /* vector facility */

>  #define FAC_VE          S390_FEAT_VECTOR_ENH /* vector enhancements facility 1 */

> +#define FAC_MIE2        S390_FEAT_MISC_INSTRUCTION_EXT /* miscellaneous-instruction-extensions facility 2 */

>  

>  static const DisasInsn insn_info[] = {

>  #include "insn-data.def"

> 


Looks right to me.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Thomas Huth Sept. 23, 2020, 4:53 a.m. UTC | #2
On 22/09/2020 12.31, David Hildenbrand wrote:
> Easy, just like ADD HALFWORD IMMEDIATE (AGHI).

> 

> Signed-off-by: David Hildenbrand <david@redhat.com>

> ---

>  target/s390x/insn-data.def | 1 +

>  target/s390x/translate.c   | 1 +

>  2 files changed, 2 insertions(+)

> 

> diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def

> index d79ae9e3f1..8dbeaf8c49 100644

> --- a/target/s390x/insn-data.def

> +++ b/target/s390x/insn-data.def

> @@ -52,6 +52,7 @@

>  /* ADD HALFWORD */

>      C(0x4a00, AH,      RX_a,  Z,   r1, m2_16s, new, r1_32, add, adds32)

>      C(0xe37a, AHY,     RXY_a, LD,  r1, m2_16s, new, r1_32, add, adds32)

> +    C(0xe338, AGH,     RXY_a, MIE2,r1, m2_16s, r1, 0, add, adds64)

>  /* ADD HALFWORD IMMEDIATE */

>      C(0xa70a, AHI,     RI_a,  Z,   r1, i2, new, r1_32, add, adds32)

>      C(0xa70b, AGHI,    RI_a,  Z,   r1, i2, r1, 0, add, adds64)

> diff --git a/target/s390x/translate.c b/target/s390x/translate.c

> index a777343821..21d77b7e74 100644

> --- a/target/s390x/translate.c

> +++ b/target/s390x/translate.c

> @@ -6098,6 +6098,7 @@ enum DisasInsnEnum {

>  #define FAC_AIS         S390_FEAT_ADAPTER_INT_SUPPRESSION

>  #define FAC_V           S390_FEAT_VECTOR /* vector facility */

>  #define FAC_VE          S390_FEAT_VECTOR_ENH /* vector enhancements facility 1 */

> +#define FAC_MIE2        S390_FEAT_MISC_INSTRUCTION_EXT /* miscellaneous-instruction-extensions facility 2 */


Maybe you should use "S390_FEAT_MISC_INSTRUCTION_EXT2" (i.e. with 2 at
the end) to avoid that it gets confused with the first MIE ?

 Thomas
David Hildenbrand Sept. 23, 2020, 7:50 a.m. UTC | #3
On 23.09.20 06:53, Thomas Huth wrote:
> On 22/09/2020 12.31, David Hildenbrand wrote:

>> Easy, just like ADD HALFWORD IMMEDIATE (AGHI).

>>

>> Signed-off-by: David Hildenbrand <david@redhat.com>

>> ---

>>  target/s390x/insn-data.def | 1 +

>>  target/s390x/translate.c   | 1 +

>>  2 files changed, 2 insertions(+)

>>

>> diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def

>> index d79ae9e3f1..8dbeaf8c49 100644

>> --- a/target/s390x/insn-data.def

>> +++ b/target/s390x/insn-data.def

>> @@ -52,6 +52,7 @@

>>  /* ADD HALFWORD */

>>      C(0x4a00, AH,      RX_a,  Z,   r1, m2_16s, new, r1_32, add, adds32)

>>      C(0xe37a, AHY,     RXY_a, LD,  r1, m2_16s, new, r1_32, add, adds32)

>> +    C(0xe338, AGH,     RXY_a, MIE2,r1, m2_16s, r1, 0, add, adds64)

>>  /* ADD HALFWORD IMMEDIATE */

>>      C(0xa70a, AHI,     RI_a,  Z,   r1, i2, new, r1_32, add, adds32)

>>      C(0xa70b, AGHI,    RI_a,  Z,   r1, i2, r1, 0, add, adds64)

>> diff --git a/target/s390x/translate.c b/target/s390x/translate.c

>> index a777343821..21d77b7e74 100644

>> --- a/target/s390x/translate.c

>> +++ b/target/s390x/translate.c

>> @@ -6098,6 +6098,7 @@ enum DisasInsnEnum {

>>  #define FAC_AIS         S390_FEAT_ADAPTER_INT_SUPPRESSION

>>  #define FAC_V           S390_FEAT_VECTOR /* vector facility */

>>  #define FAC_VE          S390_FEAT_VECTOR_ENH /* vector enhancements facility 1 */

>> +#define FAC_MIE2        S390_FEAT_MISC_INSTRUCTION_EXT /* miscellaneous-instruction-extensions facility 2 */

> 

> Maybe you should use "S390_FEAT_MISC_INSTRUCTION_EXT2" (i.e. with 2 at

> the end) to avoid that it gets confused with the first MIE ?


Yes, renaming S390_FEAT_MISC_INSTRUCTION_EXT ->
S390_FEAT_MISC_INSTRUCTION_EXT2 makes sense.

> 

>  Thomas

> 



-- 
Thanks,

David / dhildenb
Richard Henderson Sept. 25, 2020, 9:25 p.m. UTC | #4
On 9/22/20 3:31 AM, David Hildenbrand wrote:
> Easy, just like ADD HALFWORD IMMEDIATE (AGHI).

> 

> Signed-off-by: David Hildenbrand <david@redhat.com>

> ---

>  target/s390x/insn-data.def | 1 +

>  target/s390x/translate.c   | 1 +

>  2 files changed, 2 insertions(+)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index d79ae9e3f1..8dbeaf8c49 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -52,6 +52,7 @@ 
 /* ADD HALFWORD */
     C(0x4a00, AH,      RX_a,  Z,   r1, m2_16s, new, r1_32, add, adds32)
     C(0xe37a, AHY,     RXY_a, LD,  r1, m2_16s, new, r1_32, add, adds32)
+    C(0xe338, AGH,     RXY_a, MIE2,r1, m2_16s, r1, 0, add, adds64)
 /* ADD HALFWORD IMMEDIATE */
     C(0xa70a, AHI,     RI_a,  Z,   r1, i2, new, r1_32, add, adds32)
     C(0xa70b, AGHI,    RI_a,  Z,   r1, i2, r1, 0, add, adds64)
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index a777343821..21d77b7e74 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -6098,6 +6098,7 @@  enum DisasInsnEnum {
 #define FAC_AIS         S390_FEAT_ADAPTER_INT_SUPPRESSION
 #define FAC_V           S390_FEAT_VECTOR /* vector facility */
 #define FAC_VE          S390_FEAT_VECTOR_ENH /* vector enhancements facility 1 */
+#define FAC_MIE2        S390_FEAT_MISC_INSTRUCTION_EXT /* miscellaneous-instruction-extensions facility 2 */
 
 static const DisasInsn insn_info[] = {
 #include "insn-data.def"