Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: crosstest/test_vector_ops.h

Issue 1909013002: Subzero. X86. Lowers shufflevector using xmm instructions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: crosstest/test_vector_ops.h
diff --git a/crosstest/test_vector_ops.h b/crosstest/test_vector_ops.h
index 32903a987198628af5ab53e699049e8f2615090a..e9e8737a7066c69cf12f78bbe2c2078cd15bcf5b 100644
--- a/crosstest/test_vector_ops.h
+++ b/crosstest/test_vector_ops.h
@@ -18,8 +18,8 @@
#include "vectors.h"
// The VectorOps<> class acts like Vectors<> but also has insertelement,
-// Subzero_insertelement, extractelement, and Subzero_extractelement
-// fields.
+// Subzero_insertelement, extractelement, Subzero_extractelement,
+// shufflevector, Subzero_shufflevector, and shufflevector_count fields.
template <typename T> struct VectorOps;
#define FIELD(TYNAME, FIELDNAME) VectorOps<TYNAME>::FIELDNAME
@@ -28,15 +28,21 @@ template <typename T> struct VectorOps;
#define DECLARE_VECTOR_OPS(NAME) \
template <> struct VectorOps<NAME> : public Vectors<NAME> { \
static Ty (*insertelement)(Ty, CastTy, int32_t); \
+ static Ty (*shufflevector)(Ty, Ty, uint32_t); \
static CastTy (*extractelement)(Ty, int32_t); \
static Ty (*Subzero_insertelement)(Ty, CastTy, int32_t); \
+ static Ty (*Subzero_shufflevector)(Ty, Ty, uint32_t); \
static CastTy (*Subzero_extractelement)(Ty, int32_t); \
+ static uint32_t (*shufflevector_count)(); \
}; \
extern "C" { \
TY(NAME) insertelement_##NAME(TY(NAME), CASTTY(NAME), int32_t); \
TY(NAME) Subzero_insertelement_##NAME(TY(NAME), CASTTY(NAME), int32_t); \
CASTTY(NAME) extractelement_##NAME(TY(NAME), int32_t); \
CASTTY(NAME) Subzero_extractelement_##NAME(TY(NAME), int32_t); \
+ TY(NAME) shufflevector_##NAME(TY(NAME), TY(NAME), uint32_t); \
+ TY(NAME) Subzero_shufflevector_##NAME(TY(NAME), TY(NAME), uint32_t); \
+ uint32_t shufflevector_count_##NAME(); \
} \
TY(NAME) (*FIELD(NAME, insertelement))(TY(NAME), CASTTY(NAME), int32_t) = \
&insertelement_##NAME; \
@@ -45,7 +51,12 @@ template <typename T> struct VectorOps;
CASTTY(NAME) (*FIELD(NAME, extractelement))(TY(NAME), int32_t) = \
&extractelement_##NAME; \
CASTTY(NAME) (*FIELD(NAME, Subzero_extractelement))(TY(NAME), int32_t) = \
- &Subzero_extractelement_##NAME;
+ &Subzero_extractelement_##NAME; \
+ TY(NAME) (*FIELD(NAME, shufflevector))(TY(NAME), TY(NAME), uint32_t) = \
+ &shufflevector_##NAME; \
+ TY(NAME) (*FIELD(NAME, Subzero_shufflevector))( \
+ TY(NAME), TY(NAME), uint32_t) = &Subzero_shufflevector_##NAME; \
+ uint32_t (*FIELD(NAME, shufflevector_count))() = &shufflevector_count_##NAME;
#define X(ty, eltty, castty) DECLARE_VECTOR_OPS(ty)
VECTOR_TYPE_TABLE

Powered by Google App Engine
This is Rietveld 408576698