|
From: <sv...@va...> - 2009-05-21 21:55:57
|
Author: sewardj
Date: 2009-05-21 22:55:50 +0100 (Thu, 21 May 2009)
New Revision: 1897
Log:
This should have been committed as part of r1894 (Add a new
capabilities bit for AMD64, indicating whether or not cmpxchg16b is
supported.)
Modified:
branches/DCAS/priv/main/vex_main.c
Modified: branches/DCAS/priv/main/vex_main.c
===================================================================
--- branches/DCAS/priv/main/vex_main.c 2009-05-21 21:53:41 UTC (rev 1896)
+++ branches/DCAS/priv/main/vex_main.c 2009-05-21 21:55:50 UTC (rev 1897)
@@ -744,17 +744,22 @@
| VEX_HWCAPS_X86_SSE2 | VEX_HWCAPS_X86_SSE3))
return "x86-sse1-sse2-sse3";
- return False;
+ return NULL;
}
static HChar* show_hwcaps_amd64 ( UInt hwcaps )
{
- /* Monotonic, SSE3 > baseline. */
- if (hwcaps == 0)
- return "amd64-sse2";
- if (hwcaps == VEX_HWCAPS_AMD64_SSE3)
- return "amd64-sse3";
- return False;
+ /* SSE3 and CX16 are orthogonal and > baseline, although we really
+ don't expect to come across anything which can do SSE3 but can't
+ do CX16. Still, we can handle that case. */
+ const UInt SSE3 = VEX_HWCAPS_AMD64_SSE3;
+ const UInt CX16 = VEX_HWCAPS_AMD64_CX16;
+ UInt c = hwcaps;
+ if (c == 0) return "amd64-sse2";
+ if (c == SSE3) return "amd64-sse3";
+ if (c == CX16) return "amd64-sse2-cx16";
+ if (c == (SSE3|CX16)) return "amd64-sse3-cx16";
+ return NULL;
}
static HChar* show_hwcaps_ppc32 ( UInt hwcaps )
|