diff mbox series

[risu,2/4] s390x: Add simple s390x.risu file

Message ID 20230904140040.33153-3-thuth@redhat.com
State New
Headers show
Series Add support for s390x to RISU | expand

Commit Message

Thomas Huth Sept. 4, 2023, 2 p.m. UTC
This only adds a limited set of s390x instructions for initial testing.
More instructions will be added later.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 s390x.risu | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 s390x.risu

Comments

Ilya Leoshkevich Sept. 4, 2023, 2:20 p.m. UTC | #1
On Mon, 2023-09-04 at 16:00 +0200, Thomas Huth wrote:
> This only adds a limited set of s390x instructions for initial
> testing.
> More instructions will be added later.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  s390x.risu | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 48 insertions(+)
>  create mode 100644 s390x.risu

Can this be somehow automatically derived from
target/s390x/tcg/insn-data.h.inc?

Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Thomas Huth Sept. 5, 2023, 9:56 a.m. UTC | #2
On 04/09/2023 16.20, Ilya Leoshkevich wrote:
> On Mon, 2023-09-04 at 16:00 +0200, Thomas Huth wrote:
>> This only adds a limited set of s390x instructions for initial
>> testing.
>> More instructions will be added later.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   s390x.risu | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 48 insertions(+)
>>   create mode 100644 s390x.risu
> 
> Can this be somehow automatically derived from
> target/s390x/tcg/insn-data.h.inc?

Hmm, maybe ... OTOH, if something is wrong in that file, you won't find the 
bug with RISU is you used the same source, I guess...

> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>

Thanks!

  Thomas
diff mbox series

Patch

diff --git a/s390x.risu b/s390x.risu
new file mode 100644
index 0000000..3ad7015
--- /dev/null
+++ b/s390x.risu
@@ -0,0 +1,48 @@ 
+###############################################################################
+# Copyright 2023 Red Hat Inc.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Thomas Huth - initial implementation
+###############################################################################
+
+.mode s390x
+
+# format:RR Add (register + register, 32 bit)
+AR Z 00011010 r1:4 r2:4
+
+# format:RRE Add (register + register, 64 bit)
+AGR Z 10111001 00001000 00000000 r1:4 r2:4
+
+# format:RRE Add (register + register, 32 bit to 64 bit)
+AGFR Z 10111001 00011000 00000000 r1:4 r2:4
+
+# format:RRF-a Add (three registers, 32 bit)
+ARK STFLE45 10111001 11111000 r3:4 0000 r1:4 r2:4
+
+# format:RRF-a Add (three registers, 64 bit)
+AGRK STFLE45 10111001 11101000 r3:4 0000 r1:4 r2:4
+
+
+# format:RRE Add Halfword Immediate (32 bit)
+AHI Z 10100111 r1:4 1010 i2:16
+
+# format:RI Add Halfword Immediate (64 bit)
+AGHI Z 10100111 r1:4 1011 i2:16
+
+
+# format:RR Add Logical (32 bit)
+ALR Z 00011110 r1:4 r2:4
+
+# format:RRE Add Logical (64 bit)
+ALGR Z 10111001 00001010 00000000 r1:4 r2:4
+
+# format:RRE Add Logical (32 bit to 64 bit)
+ALGFR Z 10111001 00011010 00000000 r1:4 r2:4
+
+
+# format:RRF-c Population Count
+POPCNT STFLE45 10111001 11100001 m3:4 0000 r1:4 r2:4