Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
simde
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
simde
Commits
5b07b50c
Commit
5b07b50c
authored
Dec 28, 2020
by
Evan Nemerson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lots of fixes for native aliases on Arm.
parent
0eb9e26e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
12 deletions
+31
-12
arm/neon/dot.h
arm/neon/dot.h
+4
-4
arm/neon/dot_lane.h
arm/neon/dot_lane.h
+4
-4
simde-diagnostic.h
simde-diagnostic.h
+12
-1
x86/sse.h
x86/sse.h
+10
-2
x86/sse2.h
x86/sse2.h
+1
-1
No files found.
arm/neon/dot.h
View file @
5b07b50c
...
@@ -67,7 +67,7 @@ simde_vdot_s32(simde_int32x2_t r, simde_int8x8_t a, simde_int8x8_t b) {
...
@@ -67,7 +67,7 @@ simde_vdot_s32(simde_int32x2_t r, simde_int8x8_t a, simde_int8x8_t b) {
return
simde_vadd_s32
(
r
,
simde_int32x2_from_private
(
r_
));
return
simde_vadd_s32
(
r
,
simde_int32x2_from_private
(
r_
));
#endif
#endif
}
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
|| (defined(SIMDE_ENABLE_NATIVE_ALIASES) && !defined(__ARM_FEATURE_DOTPROD))
#undef vdot_s32
#undef vdot_s32
#define vdot_s32(r, a, b) simde_vdot_s32((r), (a), (b))
#define vdot_s32(r, a, b) simde_vdot_s32((r), (a), (b))
#endif
#endif
...
@@ -97,7 +97,7 @@ simde_vdot_u32(simde_uint32x2_t r, simde_uint8x8_t a, simde_uint8x8_t b) {
...
@@ -97,7 +97,7 @@ simde_vdot_u32(simde_uint32x2_t r, simde_uint8x8_t a, simde_uint8x8_t b) {
return
simde_vadd_u32
(
r
,
simde_uint32x2_from_private
(
r_
));
return
simde_vadd_u32
(
r
,
simde_uint32x2_from_private
(
r_
));
#endif
#endif
}
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
|| (defined(SIMDE_ENABLE_NATIVE_ALIASES) && !defined(__ARM_FEATURE_DOTPROD))
#undef vdot_u32
#undef vdot_u32
#define vdot_u32(r, a, b) simde_vdot_u32((r), (a), (b))
#define vdot_u32(r, a, b) simde_vdot_u32((r), (a), (b))
#endif
#endif
...
@@ -128,7 +128,7 @@ simde_vdotq_s32(simde_int32x4_t r, simde_int8x16_t a, simde_int8x16_t b) {
...
@@ -128,7 +128,7 @@ simde_vdotq_s32(simde_int32x4_t r, simde_int8x16_t a, simde_int8x16_t b) {
return
simde_vaddq_s32
(
r
,
simde_int32x4_from_private
(
r_
));
return
simde_vaddq_s32
(
r
,
simde_int32x4_from_private
(
r_
));
#endif
#endif
}
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
|| (defined(SIMDE_ENABLE_NATIVE_ALIASES) && !defined(__ARM_FEATURE_DOTPROD))
#undef vdotq_s32
#undef vdotq_s32
#define vdotq_s32(r, a, b) simde_vdotq_s32((r), (a), (b))
#define vdotq_s32(r, a, b) simde_vdotq_s32((r), (a), (b))
#endif
#endif
...
@@ -159,7 +159,7 @@ simde_vdotq_u32(simde_uint32x4_t r, simde_uint8x16_t a, simde_uint8x16_t b) {
...
@@ -159,7 +159,7 @@ simde_vdotq_u32(simde_uint32x4_t r, simde_uint8x16_t a, simde_uint8x16_t b) {
return
simde_vaddq_u32
(
r
,
simde_uint32x4_from_private
(
r_
));
return
simde_vaddq_u32
(
r
,
simde_uint32x4_from_private
(
r_
));
#endif
#endif
}
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
|| (defined(SIMDE_ENABLE_NATIVE_ALIASES) && !defined(__ARM_FEATURE_DOTPROD))
#undef vdotq_u32
#undef vdotq_u32
#define vdotq_u32(r, a, b) simde_vdotq_u32((r), (a), (b))
#define vdotq_u32(r, a, b) simde_vdotq_u32((r), (a), (b))
#endif
#endif
...
...
arm/neon/dot_lane.h
View file @
5b07b50c
...
@@ -74,7 +74,7 @@ simde_vdot_lane_s32(simde_int32x2_t r, simde_int8x8_t a, simde_int8x8_t b, const
...
@@ -74,7 +74,7 @@ simde_vdot_lane_s32(simde_int32x2_t r, simde_int8x8_t a, simde_int8x8_t b, const
#endif
#endif
return
result
;
return
result
;
}
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
|| (defined(SIMDE_ENABLE_NATIVE_ALIASES) && !defined(__ARM_FEATURE_DOTPROD))
#undef vdot_lane_s32
#undef vdot_lane_s32
#define vdot_lane_s32(r, a, b, lane) simde_vdot_lane_s32((r), (a), (b), (lane))
#define vdot_lane_s32(r, a, b, lane) simde_vdot_lane_s32((r), (a), (b), (lane))
#endif
#endif
...
@@ -110,7 +110,7 @@ simde_vdot_lane_u32(simde_uint32x2_t r, simde_uint8x8_t a, simde_uint8x8_t b, co
...
@@ -110,7 +110,7 @@ simde_vdot_lane_u32(simde_uint32x2_t r, simde_uint8x8_t a, simde_uint8x8_t b, co
#endif
#endif
return
result
;
return
result
;
}
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
|| (defined(SIMDE_ENABLE_NATIVE_ALIASES) && !defined(__ARM_FEATURE_DOTPROD))
#undef vdot_lane_u32
#undef vdot_lane_u32
#define vdot_lane_u32(r, a, b, lane) simde_vdot_lane_u32((r), (a), (b), (lane))
#define vdot_lane_u32(r, a, b, lane) simde_vdot_lane_u32((r), (a), (b), (lane))
#endif
#endif
...
@@ -147,7 +147,7 @@ simde_vdot_laneq_s32(simde_int32x4_t r, simde_int8x16_t a, simde_int8x16_t b, co
...
@@ -147,7 +147,7 @@ simde_vdot_laneq_s32(simde_int32x4_t r, simde_int8x16_t a, simde_int8x16_t b, co
#endif
#endif
return
result
;
return
result
;
}
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
|| (defined(SIMDE_ENABLE_NATIVE_ALIASES) && !defined(__ARM_FEATURE_DOTPROD))
#undef vdot_laneq_s32
#undef vdot_laneq_s32
#define vdot_laneq_s32(r, a, b, lane) simde_vdot_laneq_s32((r), (a), (b), (lane))
#define vdot_laneq_s32(r, a, b, lane) simde_vdot_laneq_s32((r), (a), (b), (lane))
#endif
#endif
...
@@ -184,7 +184,7 @@ simde_vdot_laneq_u32(simde_uint32x4_t r, simde_uint8x16_t a, simde_uint8x16_t b,
...
@@ -184,7 +184,7 @@ simde_vdot_laneq_u32(simde_uint32x4_t r, simde_uint8x16_t a, simde_uint8x16_t b,
#endif
#endif
return
result
;
return
result
;
}
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
|| (defined(SIMDE_ENABLE_NATIVE_ALIASES) && !defined(__ARM_FEATURE_DOTPROD))
#undef vdot_laneq_u32
#undef vdot_laneq_u32
#define vdot_laneq_u32(r, a, b, lane) simde_vdot_laneq_u32((r), (a), (b), (lane))
#define vdot_laneq_u32(r, a, b, lane) simde_vdot_laneq_u32((r), (a), (b), (lane))
#endif
#endif
...
...
simde-diagnostic.h
View file @
5b07b50c
...
@@ -181,7 +181,10 @@
...
@@ -181,7 +181,10 @@
* before we can access certain SIMD intrinsics, but this diagnostic
* before we can access certain SIMD intrinsics, but this diagnostic
* warns about it being a reserved name. It is a reserved name, but
* warns about it being a reserved name. It is a reserved name, but
* it's reserved for the compiler and we are using it to convey
* it's reserved for the compiler and we are using it to convey
* information to the compiler. */
* information to the compiler.
*
* This is also used when enabling native aliases since we don't get to
* choose the macro names. */
#if HEDLEY_HAS_WARNING("-Wdouble-promotion")
#if HEDLEY_HAS_WARNING("-Wdouble-promotion")
#define SIMDE_DIAGNOSTIC_DISABLE_RESERVED_ID_MACRO_ _Pragma("clang diagnostic ignored \"-Wreserved-id-macro\"")
#define SIMDE_DIAGNOSTIC_DISABLE_RESERVED_ID_MACRO_ _Pragma("clang diagnostic ignored \"-Wreserved-id-macro\"")
#else
#else
...
@@ -377,7 +380,15 @@
...
@@ -377,7 +380,15 @@
#define SIMDE_DIAGNOSTIC_DISABLE_MAYBE_UNINITIAZILED_
#define SIMDE_DIAGNOSTIC_DISABLE_MAYBE_UNINITIAZILED_
#endif
#endif
#if defined(SIMDE_ENABLE_NATIVE_ALIASES)
#define SIMDE_DISABLE_UNWANTED_DIAGNOSTICS_NATIVE_ALIASES_ \
SIMDE_DIAGNOSTIC_DISABLE_RESERVED_ID_MACRO_
#else
#define SIMDE_DISABLE_UNWANTED_DIAGNOSTICS_NATIVE_ALIASES_
#endif
#define SIMDE_DISABLE_UNWANTED_DIAGNOSTICS \
#define SIMDE_DISABLE_UNWANTED_DIAGNOSTICS \
SIMDE_DISABLE_UNWANTED_DIAGNOSTICS_NATIVE_ALIASES_ \
SIMDE_DIAGNOSTIC_DISABLE_PSABI_ \
SIMDE_DIAGNOSTIC_DISABLE_PSABI_ \
SIMDE_DIAGNOSTIC_DISABLE_NO_EMMS_INSTRUCTION_ \
SIMDE_DIAGNOSTIC_DISABLE_NO_EMMS_INSTRUCTION_ \
SIMDE_DIAGNOSTIC_DISABLE_SIMD_PRAGMA_DEPRECATED_ \
SIMDE_DIAGNOSTIC_DISABLE_SIMD_PRAGMA_DEPRECATED_ \
...
...
x86/sse.h
View file @
5b07b50c
...
@@ -2479,7 +2479,11 @@ simde_mm_loadh_pi (simde__m128 a, simde__m64 const* mem_addr) {
...
@@ -2479,7 +2479,11 @@ simde_mm_loadh_pi (simde__m128 a, simde__m64 const* mem_addr) {
#endif
#endif
}
}
#if defined(SIMDE_X86_SSE_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_X86_SSE_ENABLE_NATIVE_ALIASES)
# define _mm_loadh_pi(a, mem_addr) simde_mm_loadh_pi((a), (simde__m64 const*) (mem_addr))
#if HEDLEY_HAS_WARNING("-Wold-style-cast")
#define _mm_loadh_pi(a, mem_addr) simde_mm_loadh_pi((a), HEDLEY_REINTERPRET_CAST(simde__m64 const*, (mem_addr)))
#else
#define _mm_loadh_pi(a, mem_addr) simde_mm_loadh_pi((a), (simde__m64 const*) (mem_addr))
#endif
#endif
#endif
/* The SSE documentation says that there are no alignment requirements
/* The SSE documentation says that there are no alignment requirements
...
@@ -2517,7 +2521,11 @@ simde_mm_loadl_pi (simde__m128 a, simde__m64 const* mem_addr) {
...
@@ -2517,7 +2521,11 @@ simde_mm_loadl_pi (simde__m128 a, simde__m64 const* mem_addr) {
#endif
#endif
}
}
#if defined(SIMDE_X86_SSE_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_X86_SSE_ENABLE_NATIVE_ALIASES)
# define _mm_loadl_pi(a, mem_addr) simde_mm_loadl_pi((a), (simde__m64 const*) (mem_addr))
#if HEDLEY_HAS_WARNING("-Wold-style-cast")
#define _mm_loadl_pi(a, mem_addr) simde_mm_loadl_pi((a), HEDLEY_REINTERPRET_CAST(simde__m64 const*, (mem_addr)))
#else
#define _mm_loadl_pi(a, mem_addr) simde_mm_loadl_pi((a), (simde__m64 const*) (mem_addr))
#endif
#endif
#endif
SIMDE_FUNCTION_ATTRIBUTES
SIMDE_FUNCTION_ATTRIBUTES
...
...
x86/sse2.h
View file @
5b07b50c
...
@@ -5243,7 +5243,7 @@ simde_mm_shufflelo_epi16 (simde__m128i a, const int imm8)
...
@@ -5243,7 +5243,7 @@ simde_mm_shufflelo_epi16 (simde__m128i a, const int imm8)
#if defined(SIMDE_X86_SSE2_NATIVE)
#if defined(SIMDE_X86_SSE2_NATIVE)
#define simde_mm_shufflelo_epi16(a, imm8) _mm_shufflelo_epi16((a), (imm8))
#define simde_mm_shufflelo_epi16(a, imm8) _mm_shufflelo_epi16((a), (imm8))
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
#define _mm_shufflelo_epi16(a, imm8) \
#define
simde
_mm_shufflelo_epi16(a, imm8) \
__extension__({ \
__extension__({ \
int16x8_t ret = vreinterpretq_s16_s64(a); \
int16x8_t ret = vreinterpretq_s16_s64(a); \
int16x4_t lowBits = vget_low_s16(ret); \
int16x4_t lowBits = vget_low_s16(ret); \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment