+#ifdef __x86_64__
+
+static target_desc *amd64_tdescs[X86_TDESC_LAST] = { };
+static target_desc *x32_tdescs[X86_TDESC_LAST] = { };
+
+const struct target_desc *
+amd64_linux_read_description (uint64_t xcr0, bool is_x32)
+{
+ enum x86_linux_tdesc idx = xcr0_to_tdesc_idx (xcr0, is_x32);
+
+ if (idx == X86_TDESC_LAST)
+ return NULL;
+
+ struct target_desc **tdesc = NULL;
+
+ if (is_x32)
+ tdesc = &x32_tdescs[idx];
+ else
+ tdesc = &amd64_tdescs[idx];
+
+ if (*tdesc == NULL)
+ {
+ *tdesc = amd64_create_target_description (xcr0, is_x32, true, true);
+
+ init_target_desc (*tdesc, amd64_expedite_regs);
+ }
+ return *tdesc;
+}
+
+#endif
+