fix __GNUC__PREREQ macro for Mac gcc
This commit is contained in:
parent
0e96302822
commit
8c45c01071
8 changed files with 18 additions and 16 deletions
|
@ -202,6 +202,7 @@ http://www.opensource.org/licenses/bsd-license.php
|
||||||
History
|
History
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
* 2011/Jun/16 ver 3.03 fix __GNUC_PREREQ macro for Mac gcc(thanks to t_teruya)
|
||||||
* 2011/Apr/28 ver 3.02 do not use xgetbv on Mac gcc
|
* 2011/Apr/28 ver 3.02 do not use xgetbv on Mac gcc
|
||||||
* 2011/May/24 ver 3.01 fix typo of OSXSAVE
|
* 2011/May/24 ver 3.01 fix typo of OSXSAVE
|
||||||
* 2011/May/23 ver 3.00 add vcmpeqps and so on
|
* 2011/May/23 ver 3.00 add vcmpeqps and so on
|
||||||
|
@ -228,7 +229,7 @@ History
|
||||||
* 2009/Feb/13 movd(xmm7, dword[eax]) drops 0x66 prefix (thanks to Gabest)
|
* 2009/Feb/13 movd(xmm7, dword[eax]) drops 0x66 prefix (thanks to Gabest)
|
||||||
* 2008/Dec/30 fix call in short relative address(thanks to kato san)
|
* 2008/Dec/30 fix call in short relative address(thanks to kato san)
|
||||||
* 2008/Sep/18 support @@, @f, @b and localization of label(thanks to nobu-q san)
|
* 2008/Sep/18 support @@, @f, @b and localization of label(thanks to nobu-q san)
|
||||||
* 2008/Sep/18 support ptr [rip + 32bit offset] (thanks to Dango-Chu san)
|
* 2008/Sep/18 support ptr[rip + 32bit offset] (thanks to Dango-Chu san)
|
||||||
* 2008/Jun/03 fix align(). mov(ptr[eax],1) throws ERR_MEM_SIZE_IS_NOT_SPECIFIED.
|
* 2008/Jun/03 fix align(). mov(ptr[eax],1) throws ERR_MEM_SIZE_IS_NOT_SPECIFIED.
|
||||||
* 2008/Jun/02 support memory interface allocated by user
|
* 2008/Jun/02 support memory interface allocated by user
|
||||||
* 2008/May/26 fix protect() to avoid invalid setting(thanks to shinichiro_h san)
|
* 2008/May/26 fix protect() to avoid invalid setting(thanks to shinichiro_h san)
|
||||||
|
@ -249,5 +250,5 @@ Author
|
||||||
MITSUNARI Shigeo(herumi at nifty dot com)
|
MITSUNARI Shigeo(herumi at nifty dot com)
|
||||||
|
|
||||||
---
|
---
|
||||||
$Revision: 1.11 $
|
$Revision: 1.12 $
|
||||||
$Date: 2011/04/27 20:43:24 $
|
$Date: 2011/06/15 21:55:02 $
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak version 3.02
|
C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak version 3.03
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
◎概要
|
◎概要
|
||||||
|
@ -214,6 +214,7 @@ sample/{echo,hello}.bfは http://www.kmonos.net/alang/etc/brainfuck.php から
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
◎履歴
|
◎履歴
|
||||||
|
|
||||||
|
2011/06/16 ver 3.03 Macのgcc上での__GNUC_PREREQがミスってたのを修正(thanks to t_teruya)
|
||||||
2011/04/28 ver 3.02 Macのgcc上ではxgetbvをdisable
|
2011/04/28 ver 3.02 Macのgcc上ではxgetbvをdisable
|
||||||
2011/03/24 ver 3.01 fix typo of OSXSAVE
|
2011/03/24 ver 3.01 fix typo of OSXSAVE
|
||||||
2011/03/23 ver 3.00 vcmpeqpsなどを追加
|
2011/03/23 ver 3.00 vcmpeqpsなどを追加
|
||||||
|
|
|
@ -19,7 +19,7 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BOOST_EXIST),1)
|
ifeq ($(BOOST_EXIST),1)
|
||||||
TARGET += calc calc2
|
TARGET += calc #calc2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
@author herumi
|
@author herumi
|
||||||
@date $Date: 2009/12/09 05:40:52 $
|
@date $Date: 2011/06/02 02:43:26 $
|
||||||
|
|
||||||
JPEG quantize sample
|
JPEG quantize sample
|
||||||
This program generates a quantization routine by using fast division algorithm in run-time.
|
This program generates a quantization routine by using fast division algorithm in run-time.
|
||||||
|
@ -182,11 +182,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
try {
|
try {
|
||||||
uint32 src[N];
|
uint32 src[N];
|
||||||
uint32 src2[N];
|
|
||||||
uint32 dest[N];
|
uint32 dest[N];
|
||||||
uint32 dest2[N];
|
uint32 dest2[N];
|
||||||
for (int i = 0; i < N; i++) {
|
for (int i = 0; i < N; i++) {
|
||||||
src2[i] = src[i] = rand() % 2048;
|
src[i] = rand() % 2048;
|
||||||
}
|
}
|
||||||
|
|
||||||
Quantize jit(qTbl);
|
Quantize jit(qTbl);
|
||||||
|
@ -220,5 +219,4 @@ int main(int argc, char *argv[])
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
printf("unknown error\n");
|
printf("unknown error\n");
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,8 +140,8 @@ public:
|
||||||
const size_t memTblNum = NUM_OF_ARRAY(memTbl);
|
const size_t memTblNum = NUM_OF_ARRAY(memTbl);
|
||||||
for (size_t i = 0; i < memTblNum; i++) xor(memTbl[i], memTbl[i]);
|
for (size_t i = 0; i < memTblNum; i++) xor(memTbl[i], memTbl[i]);
|
||||||
|
|
||||||
xor(reg[0], reg[0]);
|
xor(esi, esi);
|
||||||
xor(reg[1], reg[1]);
|
xor(edi, edi);
|
||||||
mov(mem, (size_t)mem_);
|
mov(mem, (size_t)mem_);
|
||||||
const size_t end = code_.size();
|
const size_t end = code_.size();
|
||||||
uint32 pc = 0;
|
uint32 pc = 0;
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
@file xbyak.h
|
@file xbyak.h
|
||||||
@brief Xbyak ; JIT assembler for x86(IA32)/x64 by C++
|
@brief Xbyak ; JIT assembler for x86(IA32)/x64 by C++
|
||||||
@author herumi
|
@author herumi
|
||||||
@version $Revision: 1.250 $
|
@version $Revision: 1.251 $
|
||||||
@url http://homepage1.nifty.com/herumi/soft/xbyak.html
|
@url http://homepage1.nifty.com/herumi/soft/xbyak.html
|
||||||
@date $Date: 2011/04/27 20:43:24 $
|
@date $Date: 2011/06/15 21:55:02 $
|
||||||
@note modified new BSD license
|
@note modified new BSD license
|
||||||
http://www.opensource.org/licenses/bsd-license.php
|
http://www.opensource.org/licenses/bsd-license.php
|
||||||
*/
|
*/
|
||||||
|
@ -51,7 +51,7 @@ namespace Xbyak {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
DEFAULT_MAX_CODE_SIZE = 4096,
|
DEFAULT_MAX_CODE_SIZE = 4096,
|
||||||
VERSION = 0x3020, /* 0xABCD = A.BC(D) */
|
VERSION = 0x3030, /* 0xABCD = A.BC(D) */
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef MIE_INTEGER_TYPE_DEFINED
|
#ifndef MIE_INTEGER_TYPE_DEFINED
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const char *getVersionString() const { return "3.02"; }
|
const char *getVersionString() const { return "3.03"; }
|
||||||
void packssdw(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x6B); }
|
void packssdw(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x6B); }
|
||||||
void packsswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x63); }
|
void packsswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x63); }
|
||||||
void packuswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x67); }
|
void packuswb(const Mmx& mmx, const Operand& op) { opMMX(mmx, op, 0x67); }
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
utility class and functions for Xbyak
|
utility class and functions for Xbyak
|
||||||
|
Xbyak::util::Clock ; rdtsc timer
|
||||||
|
Xbyak::util::Cpu ; detect CPU
|
||||||
@note this header is UNDER CONSTRUCTION!
|
@note this header is UNDER CONSTRUCTION!
|
||||||
*/
|
*/
|
||||||
#include "xbyak/xbyak.h"
|
#include "xbyak/xbyak.h"
|
||||||
|
@ -31,7 +33,7 @@
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifndef __GNUC_PREREQ
|
#ifndef __GNUC_PREREQ
|
||||||
#define __GNUC_PREREQ(major, minor) (((major) << 16) + (minor))
|
#define __GNUC_PREREQ(major, minor) ((((__GNUC__) << 16) + (__GNUC__MINOR__)) >= (((major) << 16) + (minor)))
|
||||||
#endif
|
#endif
|
||||||
#if __GNUC_PREREQ(4, 3) && !defined(__APPLE__)
|
#if __GNUC_PREREQ(4, 3) && !defined(__APPLE__)
|
||||||
#include <cpuid.h>
|
#include <cpuid.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue