Skip to content

Commit

Permalink
Fix -Wuninitialized error in edonr_byteorder.h on PPC
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhutter committed Jun 28, 2016
1 parent 7b32e13 commit 145c821
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions module/icp/algs/edonr/edonr_byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@
#else
#define aix_ld_swap64(s64, d64) \
{ \
uint64_t *s4, h; \
uint64_t *s4 = 0, h; \
\
__asm__("addi %0,%3,4;lwbrx %1,0,%3;lwbrx %2,0,%0;rldimi %1,%2,32,0"\
: "+r"(s4), "=r"(d64), "=r"(h) : "b"(s64)); \
}

#define aix_st_swap64(s64, d64) \
{ \
uint64_t *s4, h; \
uint64_t *s4 = 0, h; \
h = (s64) >> 32; \
__asm__ volatile("addi %0,%3,4;stwbrx %1,0,%3;stwbrx %2,0,%0" \
: "+r"(s4) : "r"(s64), "r"(h), "b"(d64)); \
Expand All @@ -103,15 +103,15 @@
#else
#define aix_ld_swap64(s64, d64) \
{ \
uint32_t *s4, h, l; \
uint32_t *s4 = 0, h, l; \
__asm__("addi %0,%3,4;lwbrx %1,0,%3;lwbrx %2,0,%0" \
: "+r"(s4), "=r"(l), "=r"(h) : "b"(s64)); \
d64 = ((uint64_t)h<<32) | l; \
}

#define aix_st_swap64(s64, d64) \
{ \
uint32_t *s4, h, l; \
uint32_t *s4 = 0, h, l; \
l = (s64) & 0xfffffffful, h = (s64) >> 32; \
__asm__ volatile("addi %0,%3,4;stwbrx %1,0,%3;stwbrx %2,0,%0" \
: "+r"(s4) : "r"(l), "r"(h), "b"(d64)); \
Expand Down

0 comments on commit 145c821

Please sign in to comment.