projects
/
platform
/
upstream
/
nasm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80d18b5
)
iflag: Do the equality test in iflag_cmp() first
author
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 27 Nov 2013 21:41:50 +0000
(13:41 -0800)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 27 Nov 2013 21:41:50 +0000
(13:41 -0800)
The equality test indicates how long we spin, so do that first.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
iflag.h
patch
|
blob
|
history
diff --git
a/iflag.h
b/iflag.h
index
b1144be
..
8754174
100644
(file)
--- a/
iflag.h
+++ b/
iflag.h
@@
-46,10
+46,10
@@
static inline int iflag_cmp(const iflag_t *a, const iflag_t *b)
int i;
for (i = sizeof(a->field) / sizeof(a->field[0]) - 1; i >= 0; i--) {
- if (a->field[i]
<
b->field[i])
-
return -1
;
- else if (a->field[i] > b->field[i])
-
return
1;
+ if (a->field[i]
==
b->field[i])
+
continue
;
+
+
return (a->field[i] > b->field[i]) ? 1 : -
1;
}
return 0;