Skip to content

Commit ac32432

Browse files
Bruno Larsen (billionai)mferst
authored andcommitted
tests/tcg;ppc64le: tests for the other blend instructions
Signed-off-by: Bruno Larsen (billionai) <[email protected]>
1 parent 945d018 commit ac32432

File tree

9 files changed

+147519
-2
lines changed

9 files changed

+147519
-2
lines changed

tests/tcg/ppc64/Makefile.target

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PPC64_TESTS=bcdsub
1010
endif
1111
bcdsub: CFLAGS += -mpower8-vector
1212

13-
POWER10_TESTS := byte_reverse cfuged paddi pdepd pextd setbc vcfuged vpdepd vpextd
13+
POWER10_TESTS := blendv byte_reverse cfuged paddi pdepd pextd setbc vcfuged vpdepd vpextd
1414
ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),)
1515
$(POWER10_TESTS): CFLAGS += -mpower10
1616
$(POWER10_TESTS): inputs.h
@@ -29,5 +29,9 @@ PPC64_TESTS += $(POWER10_TESTS)
2929
vcfuged: CFLAGS += -mvsx
3030
vpdepd: CFLAGS += -mvsx
3131
vpextd: CFLAGS += -mvsx
32+
vcfuged: CFLAGS += -mvsx
33+
vpdepd: CFLAGS += -mvsx
34+
vpextd: CFLAGS += -mvsx
35+
blendv: CFLAGS += -mvsx
3236

3337
TESTS += $(PPC64_TESTS)

tests/tcg/ppc64le/Makefile.target

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PPC64LE_TESTS=bcdsub
99
endif
1010
bcdsub: CFLAGS += -mpower8-vector
1111

12-
POWER10_TESTS := byte_reverse cfuged paddi pdepd pextd setbc vcfuged vpdepd vpextd
12+
POWER10_TESTS := blendv byte_reverse cfuged paddi pdepd pextd setbc vcfuged vpdepd vpextd
1313
ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),)
1414
$(POWER10_TESTS): CFLAGS += -mpower10
1515
$(POWER10_TESTS): inputs.h
@@ -28,5 +28,6 @@ PPC64LE_TESTS += $(POWER10_TESTS)
2828
vcfuged: CFLAGS += -mvsx
2929
vpdepd: CFLAGS += -mvsx
3030
vpextd: CFLAGS += -mvsx
31+
blendv: CFLAGS += -mvsx
3132

3233
TESTS += $(PPC64LE_TESTS)

tests/tcg/ppc64le/blendvd.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "inputs.h"
2+
#include "blendvd_outputs.h"
3+
4+
void blendvd(quadword *a, quadword *b, quadword *c, quadword *ret)
5+
{
6+
asm("xxblendvd %[xt], %[xa], %[xb], %[xc]"
7+
: [xt] "=v" (*ret)
8+
: [xa] "v" (*a)
9+
, [xb] "v" (*b)
10+
, [xc] "v" (*c));
11+
}
12+
13+
int main(){
14+
return vtest4(blendvd, blendvd_outputs);
15+
}

0 commit comments

Comments
 (0)