From fdefed7c26be5016944e59ccb39d4d254bd817f3 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 11 May 2020 09:41:57 +0930 Subject: Power10 VSX Mask Manipulation Operations opcodes/ * ppc-opc.c (MP, VXVAM_MASK): Define. (VXVAPS_MASK): Use VXVA_MASK. (powerpc_opcodes): Add mtvsrbmi, vexpandbm, vexpandhm, vexpandwm, vexpanddm, vexpandqm, vextractbm, vextracthm, vextractwm, vextractdm, vextractqm, mtvsrbm, mtvsrhm, mtvsrwm, mtvsrdm, mtvsrqm, vcntmbb, vcntmbh, vcntmbw, vcntmbd. gas/ * testsuite/gas/ppc/maskmanip.d, * testsuite/gas/ppc/maskmanip.s: New test. * testsuite/gas/ppc/ppc.exp: Run it. --- gas/ChangeLog | 6 ++++++ gas/testsuite/gas/ppc/maskmanip.d | 30 ++++++++++++++++++++++++++++++ gas/testsuite/gas/ppc/maskmanip.s | 22 ++++++++++++++++++++++ gas/testsuite/gas/ppc/ppc.exp | 1 + 4 files changed, 59 insertions(+) create mode 100644 gas/testsuite/gas/ppc/maskmanip.d create mode 100644 gas/testsuite/gas/ppc/maskmanip.s (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 0fe429a..c0a072a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,4 +1,10 @@ 2020-05-11 Alan Modra + + * testsuite/gas/ppc/maskmanip.d, + * testsuite/gas/ppc/maskmanip.s: New test. + * testsuite/gas/ppc/ppc.exp: Run it. + +2020-05-11 Alan Modra Peter Bergner * config/tc-ppc.c (pre_defined_registers): Add accumulators. diff --git a/gas/testsuite/gas/ppc/maskmanip.d b/gas/testsuite/gas/ppc/maskmanip.d new file mode 100644 index 0000000..3cd2c4d --- /dev/null +++ b/gas/testsuite/gas/ppc/maskmanip.d @@ -0,0 +1,30 @@ +#as: -mpower10 +#objdump: -dr -Mpower10 +#name: mask manipulation operations + +.* + + +Disassembly of section \.text: + +0+0 <_start>: +.*: (10 10 0e 42|42 0e 10 10) mtvsrbm v0,r1 +.*: (10 51 1e 42|42 1e 51 10) mtvsrhm v2,r3 +.*: (10 92 2e 42|42 2e 92 10) mtvsrwm v4,r5 +.*: (10 d3 3e 42|42 3e d3 10) mtvsrdm v6,r7 +.*: (11 14 4e 42|42 4e 14 11) mtvsrqm v8,r9 +.*: (11 5a 12 14|14 12 5a 11) mtvsrbmi v10,4660 +.*: (11 60 66 42|42 66 60 11) vexpandbm v11,v12 +.*: (11 a1 76 42|42 76 a1 11) vexpandhm v13,v14 +.*: (11 e2 86 42|42 86 e2 11) vexpandwm v15,v16 +.*: (12 23 96 42|42 96 23 12) vexpanddm v17,v18 +.*: (12 64 a6 42|42 a6 64 12) vexpandqm v19,v20 +.*: (12 a8 b6 42|42 b6 a8 12) vextractbm r21,v22 +.*: (12 e9 c6 42|42 c6 e9 12) vextracthm r23,v24 +.*: (13 2a d6 42|42 d6 2a 13) vextractwm r25,v26 +.*: (13 6b e6 42|42 e6 6b 13) vextractdm r27,v28 +.*: (13 ac f6 42|42 f6 ac 13) vextractqm r29,v30 +.*: (13 f8 06 42|42 06 f8 13) vcntmbb r31,v0,0 +.*: (13 db 0e 42|42 0e db 13) vcntmbh r30,v1,1 +.*: (13 bd 16 42|42 16 bd 13) vcntmbw r29,v2,1 +.*: (13 9e 1e 42|42 1e 9e 13) vcntmbd r28,v3,0 diff --git a/gas/testsuite/gas/ppc/maskmanip.s b/gas/testsuite/gas/ppc/maskmanip.s new file mode 100644 index 0000000..6e3688b --- /dev/null +++ b/gas/testsuite/gas/ppc/maskmanip.s @@ -0,0 +1,22 @@ + .text +_start: + mtvsrbm 0,1 + mtvsrhm 2,3 + mtvsrwm 4,5 + mtvsrdm 6,7 + mtvsrqm 8,9 + mtvsrbmi 10,0x1234 + vexpandbm 11,12 + vexpandhm 13,14 + vexpandwm 15,16 + vexpanddm 17,18 + vexpandqm 19,20 + vextractbm 21,22 + vextracthm 23,24 + vextractwm 25,26 + vextractdm 27,28 + vextractqm 29,30 + vcntmbb 31,0,0 + vcntmbh 30,1,1 + vcntmbw 29,2,1 + vcntmbd 28,3,0 diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp index 34cc82c9..c250acf 100644 --- a/gas/testsuite/gas/ppc/ppc.exp +++ b/gas/testsuite/gas/ppc/ppc.exp @@ -138,3 +138,4 @@ run_dump_test "vsx_32byte" run_dump_test "int128" run_dump_test "simd_perm" run_dump_test "outerprod" +run_dump_test "maskmanip" -- cgit v1.1