+#define MSGCODE(major, minor) \
+ ((((uint32_t)(major)&0x0000000fu) << 0) ^ \
+ (((uint32_t)(major)&0x0000000fu) << 8) ^ \
+ (((uint32_t)(major)&0x0000000fu) << 16) ^ \
+ (((uint32_t)(major)&0x0000000fu) << 24) ^ \
+ (((uint32_t)(major)&0x0000fff0u) << 4) ^ \
+ (((uint32_t)(minor)&0x0000000fu) << 4) ^ \
+ (((uint32_t)(minor)&0x0000000fu) << 28) ^ \
+ (((uint32_t)(minor)&0x0000fff0u) << 16))
+
+/* Extract major and minor codes from a 32-bit message label. */
+#define MSGMAJOR(label) \
+ ((((uint32_t)(label)&0x0000000fu) << 0) ^ \
+ (((uint32_t)(label)&0x0000000fu) << 4) ^ \
+ (((uint32_t)(label)&0x0000000fu) << 12) ^ \
+ (((uint32_t)(label)&0x000fff00u) >> 4))
+#define MSGMINOR(label) \
+ ((((uint32_t)(label)&0x000000ffu) << 8) ^ \
+ (((uint32_t)(label)&0x000000f0u) >> 4) ^ \
+ (((uint32_t)(label)&0xfff00000u) >> 16))
+
+#define LABEL_NAK MSGCODE( 0, 0)
+#define LABEL_MSG0 MSGCODE(0x2020, 0) /* ! */
+#define LABEL_MSG1 MSGCODE( 1, 0)
+#define LABEL_MSG2 MSGCODE( 2, 0)
+#define LABEL_MSG3 MSGCODE( 3, 0)
+#define LABEL_MSG3BIS MSGCODE( 3, 1)
+#define LABEL_MSG4 MSGCODE( 4, 0)
+#define LABEL_MSG5 MSGCODE( 5, 0)
+#define LABEL_MSG6 MSGCODE( 6, 0)
+#define LABEL_MSG7 MSGCODE( 7, 0)
+#define LABEL_MSG8 MSGCODE( 8, 0)
+#define LABEL_MSG9 MSGCODE( 9, 0)
+#define LABEL_PROD MSGCODE( 10, 0)