aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2022-05-20 17:48:05 +0900
committerMITSUNARI Shigeo <[email protected]>2022-05-20 17:48:05 +0900
commitd808f9ecbcfdcf35137eca9c91a11e5f9af19b52 (patch)
tree3344578d306ecf73d0bd204bb7aef7a491f3baef
parentb48a7bb1b72ff4bf0c8363985ab7c3cb3c68ae7b (diff)
downloadxbyak-d808f9ecbcfdcf35137eca9c91a11e5f9af19b52.tar.gz
xbyak-d808f9ecbcfdcf35137eca9c91a11e5f9af19b52.zip
add test of Cpu::has
-rw-r--r--test/misc.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/misc.cpp b/test/misc.cpp
index ec08e49..236dfb8 100644
--- a/test/misc.cpp
+++ b/test/misc.cpp
@@ -1,8 +1,8 @@
#include <stdio.h>
#include <string.h>
#include <string>
-#define XBYAK_NO_OP_NAMES
#include <xbyak/xbyak.h>
+#include <xbyak/xbyak_util.h>
#include <cybozu/inttype.hpp>
#include <cybozu/test.hpp>
@@ -1967,3 +1967,11 @@ CYBOZU_TEST_AUTO(misc)
CYBOZU_TEST_EQUAL(c.getSize(), n);
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
}
+
+CYBOZU_TEST_AUTO(cpu)
+{
+ // https://github.com/herumi/xbyak/issues/148
+ using namespace Xbyak::util;
+ Cpu cpu;
+ CYBOZU_TEST_EQUAL(cpu.has(Cpu::tINTEL) && cpu.has(Cpu::tAMD), cpu.has(Cpu::tINTEL | Cpu::tAMD));
+}