diff utils/genaltivec.c @ 44:b0a3f0248ecc default tip

altivec: vec_splat_* is actually not at all what I thought it was lol
author Paper <paper@tflc.us>
date Tue, 29 Apr 2025 16:54:13 -0400
parents ca0f0223a62d
children
line wrap: on
line diff
--- a/utils/genaltivec.c	Tue Apr 29 16:48:58 2025 -0400
+++ b/utils/genaltivec.c	Tue Apr 29 16:54:13 2025 -0400
@@ -217,24 +217,18 @@
 	switch (op) {
 	case OP_SPLAT:
 		printf("\tv%sint%dx%d vec;\n", LOSIGN(is_signed), bits, size);
-		puts("#ifdef vec_splats");
 		puts("\tvec.altivec = vec_splats(x);");
-		printf("#elif defined(vec_splat_%s%d)\n", LOAVSIGN(is_signed), bits);
-		printf("\tvec.altivec = vec_splat_%s%d(x);\n", LOAVSIGN(is_signed), bits);
-		puts("#else");
-		puts("# error logic error");
-		puts("#endif");
-		printf("\treturn vec;\n");
+		puts("\treturn vec;");
 		break;
 	case OP_LOAD_ALIGNED:
 		printf("\tv%sint%dx%d vec;\n", LOSIGN(is_signed), bits, size);
 		puts("\tvec.altivec = vec_ld(0, x);");
-		printf("\treturn vec;\n");
+		puts("\treturn vec;");
 		break;
 	case OP_LOAD:
 		printf("\tv%sint%dx%d vec;\n", LOSIGN(is_signed), bits, size);
 		puts("\tvec.altivec = vec_perm(vec_ld(0, x), vec_ld(16, x), vec_lvsl(0, x));");
-		printf("\treturn vec;\n");
+		puts("\treturn vec;");
 		break;
 	case OP_STORE_ALIGNED:
 		puts("\tvec_st(vec.altivec, 0, arr);");
@@ -276,7 +270,7 @@
 		} else {
 			printf("\tvec.altivec = (vector %s %s)vec_%s(vec1.altivec, vec2.altivec);\n", (is_signed) ? "signed" : "unsigned", types[(bits / 8) - 1], op_altivec[op - OP_ADD]);
 		}
-		printf("\treturn vec;\n");
+		puts("\treturn vec;");
 		break;
 	}
 	default: