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 27, 2016
1 parent 7b32e13 commit 4c5d249
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 @@ -89,23 +89,23 @@
uint64_t *s4, 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)); \
: "=&r"(s4), "=r"(d64), "=r"(h) : "b"(s64)); \
}

#define aix_st_swap64(s64, d64) \
{ \
uint64_t *s4, 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)); \
: "=&r"(s4) : "r"(s64), "r"(h), "b"(d64)); \
}
#endif /* 64BIT && PWR7 */
#else
#define aix_ld_swap64(s64, d64) \
{ \
uint32_t *s4, h, l; \
__asm__("addi %0,%3,4;lwbrx %1,0,%3;lwbrx %2,0,%0" \
: "+r"(s4), "=r"(l), "=r"(h) : "b"(s64)); \
: "=&r"(s4), "=r"(l), "=r"(h) : "b"(s64)); \
d64 = ((uint64_t)h<<32) | l; \
}

Expand All @@ -114,7 +114,7 @@
uint32_t *s4, 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)); \
: "=&r"(s4) : "r"(l), "r"(h), "b"(d64)); \
}
#endif /* __64BIT__ */
#define aix_ld_swap32(s32, d32)\
Expand Down

0 comments on commit 4c5d249

Please sign in to comment.