diff options
-rw-r--r-- | readme.md | 4 | ||||
-rw-r--r-- | readme.txt | 5 | ||||
-rw-r--r-- | test/cybozu/COPYRIGHT | 27 | ||||
-rw-r--r-- | test/cybozu/inttype.hpp | 76 | ||||
-rw-r--r-- | test/cybozu/test.hpp | 2 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 2 |
6 files changed, 61 insertions, 55 deletions
@@ -327,10 +327,6 @@ License modified new BSD License http://opensource.org/licenses/BSD-3-Clause -The files under test/cybozu/ are copied from cybozulib(https://github.com/herumi/cybozulib/), -which is licensed by BSD-3-Clause and are used for only tests. -The header files under xbyak/ are independent of cybozulib. - History ------------- * 2018/Aug/14 ver 5.67 remove mutable in Address ; fix setCacheHierarchy for cloud vm @@ -335,11 +335,6 @@ http://opensource.org/licenses/BSD-3-Clause sample/{echo,hello}.bfは http://www.kmonos.net/alang/etc/brainfuck.php から
いただきました。
-test/cybozu/以下のファイルはcybozulib(https://github.com/herumi/cybozulib/)
-の一部を使っています。cybozulibはBSD-3-Clauseライセンスです。
-cybozulibは単体テストでのみ利用されていて、xbyak/ディレクトリ以下のヘッダ
-ファイルはcybozulibとは独立に利用できます。
-
-----------------------------------------------------------------------------
◎履歴
diff --git a/test/cybozu/COPYRIGHT b/test/cybozu/COPYRIGHT deleted file mode 100644 index a91037b..0000000 --- a/test/cybozu/COPYRIGHT +++ /dev/null @@ -1,27 +0,0 @@ - -Copyright (c) 2007-2012 Cybozu Labs, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -Neither the name of the Cybozu Labs, Inc. nor the names of its contributors may -be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. diff --git a/test/cybozu/inttype.hpp b/test/cybozu/inttype.hpp index af32662..62856bd 100644 --- a/test/cybozu/inttype.hpp +++ b/test/cybozu/inttype.hpp @@ -2,10 +2,11 @@ /** @file @brief int type definition and macros - Copyright (C) 2008 Cybozu Labs, Inc., all rights reserved. + @author MITSUNARI Shigeo(@herumi) */ -#if defined(_MSC_VER) && (MSC_VER <= 1500) +#if defined(_MSC_VER) && (MSC_VER <= 1500) && !defined(CYBOZU_DEFINED_INTXX) + #define CYBOZU_DEFINED_INTXX typedef __int64 int64_t; typedef unsigned __int64 uint64_t; typedef unsigned int uint32_t; @@ -38,27 +39,33 @@ #define CYBOZU_ALIGN(x) __attribute__((aligned(x))) #endif #endif +#ifndef CYBOZU_FORCE_INLINE + #ifdef _MSC_VER + #define CYBOZU_FORCE_INLINE __forceinline + #else + #define CYBOZU_FORCE_INLINE __attribute__((always_inline)) + #endif +#endif +#ifndef CYBOZU_UNUSED + #ifdef __GNUC__ + #define CYBOZU_UNUSED __attribute__((unused)) + #else + #define CYBOZU_UNUSED + #endif +#endif #ifndef CYBOZU_ALLOCA #ifdef _MSC_VER #include <malloc.h> #define CYBOZU_ALLOCA(x) _malloca(x) #else - #define CYBOZU_ALLOCA_(x) __builtin_alloca(x) - #endif -#endif -#ifndef CYBOZU_FOREACH - // std::vector<int> v; CYBOZU_FOREACH(auto x, v) {...} - #if defined(_MSC_VER) && (_MSC_VER >= 1400) - #define CYBOZU_FOREACH(type_x, xs) for each (type_x in xs) - #elif defined(__GNUC__) - #define CYBOZU_FOREACH(type_x, xs) for (type_x : xs) + #define CYBOZU_ALLOCA(x) __builtin_alloca(x) #endif #endif #ifndef CYBOZU_NUM_OF_ARRAY #define CYBOZU_NUM_OF_ARRAY(x) (sizeof(x) / sizeof(*x)) #endif #ifndef CYBOZU_SNPRINTF - #ifdef _MSC_VER + #if defined(_MSC_VER) && (_MSC_VER < 1900) #define CYBOZU_SNPRINTF(x, len, ...) (void)_snprintf_s(x, len, len - 1, __VA_ARGS__) #else #define CYBOZU_SNPRINTF(x, len, ...) (void)snprintf(x, len, __VA_ARGS__) @@ -68,20 +75,36 @@ #define CYBOZU_CPP_VERSION_CPP03 0 #define CYBOZU_CPP_VERSION_TR1 1 #define CYBOZU_CPP_VERSION_CPP11 2 +#define CYBOZU_CPP_VERSION_CPP14 3 +#define CYBOZU_CPP_VERSION_CPP17 4 -#if (__cplusplus >= 201103) || (_MSC_VER >= 1500) || defined(__GXX_EXPERIMENTAL_CXX0X__) +#ifdef __GNUC__ + #define CYBOZU_GNUC_PREREQ(major, minor) ((__GNUC__) * 100 + (__GNUC_MINOR__) >= (major) * 100 + (minor)) +#else + #define CYBOZU_GNUC_PREREQ(major, minor) 0 +#endif + +#if (__cplusplus >= 201703) + #define CYBOZU_CPP_VERSION CYBOZU_CPP_VERSION_CPP17 +#elif (__cplusplus >= 201402) + #define CYBOZU_CPP_VERSION CYBOZU_CPP_VERSION_CPP14 +#elif (__cplusplus >= 201103) || (_MSC_VER >= 1500) || defined(__GXX_EXPERIMENTAL_CXX0X__) #if defined(_MSC_VER) && (_MSC_VER <= 1600) #define CYBOZU_CPP_VERSION CYBOZU_CPP_VERSION_TR1 #else #define CYBOZU_CPP_VERSION CYBOZU_CPP_VERSION_CPP11 #endif -#elif (__GNUC__ >= 4 && __GNUC_MINOR__ >= 5) || (__clang_major__ >= 3) +#elif CYBOZU_GNUC_PREREQ(4, 5) || (CYBOZU_GNUC_PREREQ(4, 2) && __GLIBCXX__ >= 20070719) || defined(__INTEL_COMPILER) || (__clang_major__ >= 3) #define CYBOZU_CPP_VERSION CYBOZU_CPP_VERSION_TR1 #else #define CYBOZU_CPP_VERSION CYBOZU_CPP_VERSION_CPP03 #endif -#if (CYBOZU_CPP_VERSION == CYBOZU_CPP_VERSION_TR1) +#ifdef CYBOZU_USE_BOOST + #define CYBOZU_NAMESPACE_STD boost + #define CYBOZU_NAMESPACE_TR1_BEGIN + #define CYBOZU_NAMESPACE_TR1_END +#elif (CYBOZU_CPP_VERSION == CYBOZU_CPP_VERSION_TR1) && !defined(__APPLE__) #define CYBOZU_NAMESPACE_STD std::tr1 #define CYBOZU_NAMESPACE_TR1_BEGIN namespace tr1 { #define CYBOZU_NAMESPACE_TR1_END } @@ -92,25 +115,44 @@ #endif #ifndef CYBOZU_OS_BIT - #if defined(_WIN64) || defined(__x86_64__) + #if defined(_WIN64) || defined(__x86_64__) || defined(__AARCH64EL__) || defined(__EMSCRIPTEN__) #define CYBOZU_OS_BIT 64 #else #define CYBOZU_OS_BIT 32 #endif #endif +#ifndef CYBOZU_HOST + #define CYBOZU_HOST_UNKNOWN 0 + #define CYBOZU_HOST_INTEL 1 + #define CYBOZU_HOST_ARM 2 + #if defined(_M_IX86) || defined(_M_AMD64) || defined(__x86_64__) || defined(__i386__) + #define CYBOZU_HOST CYBOZU_HOST_INTEL + #elif defined(__arm__) || defined(__AARCH64EL__) + #define CYBOZU_HOST CYBOZU_HOST_ARM + #else + #define CYBOZU_HOST CYBOZU_HOST_UNKNOWN + #endif +#endif #ifndef CYBOZU_ENDIAN #define CYBOZU_ENDIAN_UNKNOWN 0 #define CYBOZU_ENDIAN_LITTLE 1 #define CYBOZU_ENDIAN_BIG 2 - #if defined(_M_IX86) || defined(_M_AMD64) || defined(__x86_64__) || defined(__i386__) + #if (CYBOZU_HOST == CYBOZU_HOST_INTEL) + #define CYBOZU_ENDIAN CYBOZU_ENDIAN_LITTLE + #elif (CYBOZU_HOST == CYBOZU_HOST_ARM) && (defined(__ARM_EABI__) || defined(__AARCH64EL__)) #define CYBOZU_ENDIAN CYBOZU_ENDIAN_LITTLE #else #define CYBOZU_ENDIAN CYBOZU_ENDIAN_UNKNOWN #endif #endif +#if CYBOZU_CPP_VERSION >= CYBOZU_CPP_VERSION_CPP11 + #define CYBOZU_NOEXCEPT noexcept +#else + #define CYBOZU_NOEXCEPT throw() +#endif namespace cybozu { template<class T> void disable_warning_unused_variable(const T&) { } diff --git a/test/cybozu/test.hpp b/test/cybozu/test.hpp index fa735d2..7dfffab 100644 --- a/test/cybozu/test.hpp +++ b/test/cybozu/test.hpp @@ -3,7 +3,7 @@ @file @brief unit test class - Copyright (C) 2008 Cybozu Labs, Inc., all rights reserved. + @author MITSUNARI Shigeo(@herumi) */ #include <stdio.h> diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index cbd3eba..9de558d 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -1,4 +1,4 @@ -const char *getVersionString() const { return "5.661"; } +const char *getVersionString() const { return "5.67"; } void adc(const Operand& op, uint32 imm) { opRM_I(op, imm, 0x10, 2); } void adc(const Operand& op1, const Operand& op2) { opRM_RM(op1, op2, 0x10); } void adcx(const Reg32e& reg, const Operand& op) { opGen(reg, op, 0xF6, 0x66, isREG32_REG32orMEM, NONE, 0x38); } |