~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
base/asm-common.h (x86), and knock-on: Add macros for full-size regs.
[catacomb]
/
symm
/
modes-test.c
diff --git
a/symm/modes-test.c
b/symm/modes-test.c
index
b06d230
..
a6c28ba
100644
(file)
--- a/
symm/modes-test.c
+++ b/
symm/modes-test.c
@@
-38,6
+38,7
@@
#include <mLib/bits.h>
#include <mLib/dstr.h>
#include <mLib/quis.h>
#include <mLib/bits.h>
#include <mLib/dstr.h>
#include <mLib/quis.h>
+#include <mLib/macros.h>
#include <mLib/report.h>
#include "modes-test.h"
#include <mLib/report.h>
#include "modes-test.h"
@@
-164,7
+165,7
@@
static int regress_data(int rmode, FILE *fp, const char *what,
if (!fread(t, sz, 1, fp))
die(1, "failed to read %s: %s", what,
ferror(fp) ? strerror(errno) : "unexpected eof");
if (!fread(t, sz, 1, fp))
die(1, "failed to read %s: %s", what,
ferror(fp) ? strerror(errno) : "unexpected eof");
- if (
memcmp(p, t, sz) != 0
) return (-1);
+ if (
MEMCMP(p, !=, t, sz)
) return (-1);
return (0);
default:
abort();
return (0);
default:
abort();
@@
-372,7
+373,7
@@
int test_encmode(const char *name,
if (!p || !*p) {
if (i >= argc) break;
p = argv[i++];
if (!p || !*p) {
if (i >= argc) break;
p = argv[i++];
- if (
strcmp(p, "--") == 0
) break;
+ if (
STRCMP(p, ==, "--")
) break;
if (p[0] != '-' || p[1] == 0) { i--; break; }
p++;
}
if (p[0] != '-' || p[1] == 0) { i--; break; }
p++;
}
@@
-478,7
+479,7
@@
int test_encmode(const char *name,
regr = 0;
if ((f&TEMF_REFALIGN) && (sz0%blksz || sz1%blksz)) regr = 1;
else if (!refp) { memcpy(ref, ct, TEXTSZ); regr = 1; refp = 1; }
regr = 0;
if ((f&TEMF_REFALIGN) && (sz0%blksz || sz1%blksz)) regr = 1;
else if (!refp) { memcpy(ref, ct, TEXTSZ); regr = 1; refp = 1; }
- else if (
memcmp(ref, ct, TEXTSZ) != 0
) {
+ else if (
MEMCMP(ref, !=, ct, TEXTSZ)
) {
ok = 0;
printf("\nConsistency failure (split = %lu/%lu/%lu)\n",
(unsigned long)sz0, (unsigned long)sz1, (unsigned long)sz2);
ok = 0;
printf("\nConsistency failure (split = %lu/%lu/%lu)\n",
(unsigned long)sz0, (unsigned long)sz1, (unsigned long)sz2);
@@
-509,7
+510,7
@@
int test_encmode(const char *name,
}
if (sz2)
dec(ct + sz0 + sz1, pt + sz0 + sz1, sz2);
}
if (sz2)
dec(ct + sz0 + sz1, pt + sz0 + sz1, sz2);
- if (
memcmp(text, pt, TEXTSZ) != 0
) {
+ if (
MEMCMP(text, !=, pt, TEXTSZ)
) {
ok = 0;
printf("\nRound-trip failure (split = %lu/%lu/%lu)\n",
(unsigned long)sz0, (unsigned long)sz1, (unsigned long)sz2);
ok = 0;
printf("\nRound-trip failure (split = %lu/%lu/%lu)\n",
(unsigned long)sz0, (unsigned long)sz1, (unsigned long)sz2);