-#define COMPARE_CHARACTERS4(address, char1, char2, char3, char4) \
- (((uint64_t*)(address))[0] == CHARQUAD_TOUINT64(char1, char2, char3, char4))
-#else
-#define COMPARE_CHARACTERS4(address, char1, char2, char3, char4) \
- (COMPARE_CHARACTERS2(address, char1, char2) && COMPARE_CHARACTERS2((address) + 2, char3, char4))
-#endif
-
-#endif
-
-#define COMPARE_CHARACTERS3(address, char1, char2, char3) \
- (COMPARE_CHARACTERS2(address, char1, char2) && ((address)[2] == (char3)))
-#define COMPARE_CHARACTERS5(address, char1, char2, char3, char4, char5) \
- (COMPARE_CHARACTERS4(address, char1, char2, char3, char4) && ((address)[4] == (char5)))
-#define COMPARE_CHARACTERS6(address, char1, char2, char3, char4, char5, char6) \
- (COMPARE_CHARACTERS4(address, char1, char2, char3, char4) && COMPARE_CHARACTERS2(address + 4, char5, char6))
-#define COMPARE_CHARACTERS7(address, char1, char2, char3, char4, char5, char6, char7) \
- (COMPARE_CHARACTERS4(address, char1, char2, char3, char4) && COMPARE_CHARACTERS4(address + 3, char4, char5, char6, char7))
-#define COMPARE_CHARACTERS8(address, char1, char2, char3, char4, char5, char6, char7, char8) \
- (COMPARE_CHARACTERS4(address, char1, char2, char3, char4) && COMPARE_CHARACTERS4(address + 4, char5, char6, char7, char8))
+#define COMPARE_4CHARS(address, char1, char2, char3, char4) \\
+ (((uint32_t*)(address))[0] == CHARQUAD_TOUINT32(char1, char2, char3, char4))
+#define COMPARE_4UCHARS(address, char1, char2, char3, char4) \\
+ (((uint64_t*)(address))[0] == UCHARQUAD_TOUINT64(char1, char2, char3, char4))
+
+#else // CPU(X86_64)
+
+#define COMPARE_4CHARS(address, char1, char2, char3, char4) \\
+ (COMPARE_2CHARS(address, char1, char2) && COMPARE_2CHARS((address) + 2, char3, char4))
+#define COMPARE_4UCHARS(address, char1, char2, char3, char4) \\
+ (COMPARE_2UCHARS(address, char1, char2) && COMPARE_2UCHARS((address) + 2, char3, char4))
+
+#endif // CPU(X86_64)
+
+#endif // CPU(NEEDS_ALIGNED_ACCESS)
+
+#define COMPARE_3CHARS(address, char1, char2, char3) \\
+ (COMPARE_2CHARS(address, char1, char2) && ((address)[2] == (char3)))
+#define COMPARE_3UCHARS(address, char1, char2, char3) \\
+ (COMPARE_2UCHARS(address, char1, char2) && ((address)[2] == (char3)))
+#define COMPARE_5CHARS(address, char1, char2, char3, char4, char5) \\
+ (COMPARE_4CHARS(address, char1, char2, char3, char4) && ((address)[4] == (char5)))
+#define COMPARE_5UCHARS(address, char1, char2, char3, char4, char5) \\
+ (COMPARE_4UCHARS(address, char1, char2, char3, char4) && ((address)[4] == (char5)))
+#define COMPARE_6CHARS(address, char1, char2, char3, char4, char5, char6) \\
+ (COMPARE_4CHARS(address, char1, char2, char3, char4) && COMPARE_2CHARS(address + 4, char5, char6))
+#define COMPARE_6UCHARS(address, char1, char2, char3, char4, char5, char6) \\
+ (COMPARE_4UCHARS(address, char1, char2, char3, char4) && COMPARE_2UCHARS(address + 4, char5, char6))
+#define COMPARE_7CHARS(address, char1, char2, char3, char4, char5, char6, char7) \\
+ (COMPARE_4CHARS(address, char1, char2, char3, char4) && COMPARE_4CHARS(address + 3, char4, char5, char6, char7))
+#define COMPARE_7UCHARS(address, char1, char2, char3, char4, char5, char6, char7) \\
+ (COMPARE_4UCHARS(address, char1, char2, char3, char4) && COMPARE_4UCHARS(address + 3, char4, char5, char6, char7))
+#define COMPARE_8CHARS(address, char1, char2, char3, char4, char5, char6, char7, char8) \\
+ (COMPARE_4CHARS(address, char1, char2, char3, char4) && COMPARE_4CHARS(address + 4, char5, char6, char7, char8))
+#define COMPARE_8UCHARS(address, char1, char2, char3, char4, char5, char6, char7, char8) \\
+ (COMPARE_4UCHARS(address, char1, char2, char3, char4) && COMPARE_4UCHARS(address + 4, char5, char6, char7, char8))