Commit d71008ff authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

wasn't directly decrementing loop variable, use better names in swap_loop macro.

parent 9d65b220
......@@ -32,15 +32,16 @@
#include <altivec.h>
#endif
/* Macro for in-place swap of two values a and b of type t. */
#define swap_loop(t, a, b, c) \
while (c >= sizeof(t)) { \
register t temp = *(t *)a; \
*(t *)a = *(t *)b; \
*(t *)b = temp; \
a += sizeof(t); \
b += sizeof(t); \
bytes -= sizeof(t); \
/* Macro for in-place swap of two values a and b of type t. a and b are
assumed to be of type char* so that the pointer arithmetic works. */
#define swap_loop(type, a, b, count) \
while (count >= sizeof(type)) { \
register type temp = *(type *)a; \
*(type *)a = *(type *)b; \
*(type *)b = temp; \
a += sizeof(type); \
b += sizeof(type); \
count -= sizeof(type); \
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment