Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/le/lancevar.h
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | #ifdef m68k | ||||
* machine code for m68k. This was carefully tuned | * machine code for m68k. This was carefully tuned | ||||
* so it compiles to just 8 short (2-byte) op-codes! | * so it compiles to just 8 short (2-byte) op-codes! | ||||
*/ | */ | ||||
diff = *a++ - *b++; | diff = *a++ - *b++; | ||||
diff |= *a++ - *b++; | diff |= *a++ - *b++; | ||||
diff |= *a++ - *b++; | diff |= *a++ - *b++; | ||||
#else | #else | ||||
/* | /* | ||||
* Most modern CPUs do better with a single expresion. | * Most modern CPUs do better with a single expression. | ||||
* Note that short-cut evaluation is NOT helpful here, | * Note that short-cut evaluation is NOT helpful here, | ||||
* because it just makes the code longer, not faster! | * because it just makes the code longer, not faster! | ||||
*/ | */ | ||||
diff = (a[0] - b[0]) | (a[1] - b[1]) | (a[2] - b[2]); | diff = (a[0] - b[0]) | (a[1] - b[1]) | (a[2] - b[2]); | ||||
#endif | #endif | ||||
return (diff); | return (diff); | ||||
} | } | ||||
#endif /* _DEV_LE_LANCEVAR_H_ */ | #endif /* _DEV_LE_LANCEVAR_H_ */ |