Skip to content

Commit

Permalink
Merge pull request ceph#964 from apeters1971/wip-arch-sse2
Browse files Browse the repository at this point in the history
ARCH: add variable for sse2 register

Reviewed-by: Loic Dachary <[email protected]>
  • Loading branch information
Loic Dachary committed Dec 18, 2013
2 parents fd5f402 + 9414970 commit 202d1f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/arch/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/* flags we export */
int ceph_arch_intel_sse42 = 0;

int ceph_arch_intel_sse2 = 0;

#ifdef __x86_64__

Expand Down Expand Up @@ -31,6 +31,10 @@ int ceph_arch_intel_probe(void)
if ((ecx & (1 << 20)) != 0) {
ceph_arch_intel_sse42 = 1;
}
if ((edx & (1 << 26)) != 0) {
ceph_arch_intel_sse2 = 1;
}

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/arch/intel.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern "C" {
#endif

extern int ceph_arch_intel_sse42; /* true if we have sse 4.2 features */

extern int ceph_arch_intel_sse2; /* true if we have sse 2 features */
extern int ceph_arch_intel_probe(void);

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions src/test/test_arch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ int main(int argc, char **argv)
assert(ceph_arch_probed);

printf("ceph_arch_intel_sse42 = %d\n", ceph_arch_intel_sse42);
printf("ceph_arch_intel_sse2 = %d\n", ceph_arch_intel_sse2);
printf("ceph_arch_neon = %d\n", ceph_arch_neon);

return 0;
Expand Down

0 comments on commit 202d1f7

Please sign in to comment.