Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Jun 11, 2024
2 parents 80477f6 + b536ef6 commit aabb091
Show file tree
Hide file tree
Showing 21 changed files with 60 additions and 16 deletions.
32 changes: 32 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing to Xbyak

Thank you for considering contributing to the Xbyak project. This document provides guidelines on how to contribute.

## Bug Reports and Feedback

If you find a bug, have a feature request, or have questions, please open an issue. Include the following information:

- Detailed description of the problem
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment details (OS, compiler version, etc.)

## Creating Pull Requests

If you want to add features or make fixes, follow these steps to create a pull request:

1. Fork the repository
2. Create a new branch: `git checkout -b my-feature-branch`
3. Make your changes
4. Run tests and ensure all tests pass
5. Commit your changes: `git commit -am 'Add new feature'`
6. Push the branch: `git push origin my-feature-branch`
7. Create a pull request

When creating a pull request, clearly describe the changes and include any related issue numbers.

## License

Xbyak is released under the BSD-3-Clause License. Any code contributions will be licensed under the same license.

2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
container:
image: debian:testing
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: apt -y update
- run: apt -y install g++-multilib libboost-dev make nasm yasm
- run: make test
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)

project(xbyak LANGUAGES CXX VERSION 7.06)
project(xbyak LANGUAGES CXX VERSION 7.07)

file(GLOB headers xbyak/*.h)

Expand Down
1 change: 1 addition & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# History

* 2024/Jun/11 ver 7.07 support xresldtrk/xsusldtrk
* 2024/Mar/07 ver 7.06 Xbyak::util::Cpu supports AMD processor
* 2024/Feb/11 ver 7.05.1 fix extractBit() in util::Cpu and align() for autoGrow mode
* 2024/Jan/03 ver 7.05 support RAO-INT for APX
Expand Down
2 changes: 2 additions & 0 deletions gen/gen_code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@ void put()
{ "wbinvd", 0x0F, 0x09 },
{ "wrmsr", 0x0F, 0x30 },
{ "xlatb", 0xD7 },
{ "xresldtrk", 0xF2, 0x0F, 0x01, 0xE9 },
{ "xsusldtrk", 0xF2, 0x0F, 0x01, 0xE8 },
{ "xend", 0x0f, 0x01, 0xd5 },

{ "popf", 0x9D },
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
project(
'xbyak',
'cpp',
version: '7.06',
version: '7.07',
license: 'BSD-3-Clause',
default_options: 'b_ndebug=if-release'
)
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Xbyak 7.06 [![Badge Build]][Build Status]
# Xbyak 7.07 [![Badge Build]][Build Status]

*A C++ JIT assembler for x86 (IA32), x64 (AMD64, x86-64)*

Expand Down Expand Up @@ -33,6 +33,7 @@ If you want to use them, then specify `-fno-operator-names` option to gcc/clang.

### News

- support xresldtrk/xsusldtrk
- support RAO-INT for APX
- support AVX10 detection, AESKLE, WIDE_KL, KEYLOCKER, KEYLOCKER_WIDE
- support APX except for a few instructions
Expand Down
3 changes: 2 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 7.06
C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 7.07

-----------------------------------------------------------------------------
◎概要
Expand Down Expand Up @@ -404,6 +404,7 @@ sample/{echo,hello}.bfは http://www.kmonos.net/alang/etc/brainfuck.php から
-----------------------------------------------------------------------------
◎履歴

2024/06/11 ver 7.07 xresldtrk/xsusldtrkサポート
2024/03/07 ver 7.06 util::Cpuのキャッシュ判定周りがAMD CPU対応
2024/02/11 ver 7.05.1 util::CpuのextractBit()とautoGrowモードでのalign()の修正
2024/01/03 ver 7.05 APX対応RAO-INT
Expand Down
2 changes: 1 addition & 1 deletion sample/cpuid/cpuid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi

make -C ../ test_util64

cpus=(p4p mrm pnr nhm wsm snb ivb hsw bdw slt slm glm glp tnt skl cnl icl skx clx cpx icx knl knm tgl adl mtl rpl spr gnr srf grr arl lnl)
cpus=(p4p mrm pnr nhm wsm snb ivb hsw bdw slt slm glm glp tnt skl cnl icl skx clx cpx icx tgl adl mtl rpl spr emr gnr gnr256 srf arl lnl)

for cpu in ${cpus[@]} ; do
echo $cpu
Expand Down
2 changes: 2 additions & 0 deletions sample/cpuid/emr.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor intel
mmx mmx2 cmov sse sse2 sse3 ssse3 sse41 sse42 popcnt aesni rdtscp xsave(xgetvb) osxsave pclmulqdq avx fma avx2 bmi1 bmi2 lzcnt prefetchw enh_rep rdrand adx rdseed smap sha f16c movbe avx512f avx512dq avx512_ifma avx512cd avx512bw avx512vl avx512_vbmi avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq avx512_bf16 amx(tile) amx(int8) amx(bf16) avx_vnni avx512_fp16 waitpkg clflushopt cldemote clwb movdiri movdir64b uintr serialize
2 changes: 2 additions & 0 deletions sample/cpuid/gnr256.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor intel
mmx mmx2 cmov sse sse2 sse3 ssse3 sse41 sse42 popcnt aesni rdtscp xsave(xgetvb) osxsave pclmulqdq avx fma avx2 bmi1 bmi2 lzcnt prefetchw enh_rep rdrand adx rdseed smap sha f16c movbe gfni vaes vpclmulqdq amx(tile) amx(int8) amx(bf16) avx_vnni waitpkg clflushopt cldemote clwb movdiri movdir64b uintr serialize amx_fp16 prefetchiti avx10
2 changes: 0 additions & 2 deletions sample/cpuid/grr.txt

This file was deleted.

2 changes: 0 additions & 2 deletions sample/cpuid/knl.txt

This file was deleted.

2 changes: 0 additions & 2 deletions sample/cpuid/knm.txt

This file was deleted.

2 changes: 1 addition & 1 deletion sample/cpuid/spr.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vendor intel
mmx mmx2 cmov sse sse2 sse3 ssse3 sse41 sse42 popcnt aesni rdtscp xsave(xgetvb) osxsave pclmulqdq avx fma avx2 bmi1 bmi2 lzcnt prefetchw enh_rep rdrand adx rdseed smap sha f16c movbe avx512f avx512dq avx512_ifma avx512cd avx512bw avx512vl avx512_vbmi avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq avx512_bf16 amx(tile) amx(int8) amx(bf16) avx_vnni avx512_fp16 waitpkg clflushopt cldemote clwb movdiri movdir64b uintr serialize
mmx mmx2 cmov sse sse2 sse3 ssse3 sse41 sse42 popcnt aesni rdtscp xsave(xgetvb) osxsave pclmulqdq avx fma avx2 bmi1 bmi2 lzcnt prefetchw enh_rep rdrand adx rdseed smap sha f16c movbe avx512f avx512dq avx512_ifma avx512cd avx512bw avx512vl avx512_vbmi avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq avx512_bf16 amx(tile) amx(int8) amx(bf16) avx_vnni avx512_fp16 waitpkg clflushopt cldemote clwb movdiri movdir64b uintr serialize tsxldtrk
2 changes: 1 addition & 1 deletion sample/memfd.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
a sample to use MmapAllocator with an user-defined name
cat /proc/`psidof ./memfd`/maps
cat /proc/`pidof ./memfd`/maps
7fca70b44000-7fca70b4a000 rw-p 00000000 00:00 0
7fca70b67000-7fca70b68000 rwxs 00000000 00:05 19960170 /memfd:xyz (deleted)
Expand Down
1 change: 1 addition & 0 deletions sample/test_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ void putCPUinfo(bool onlyCpuidFeature)
{ Cpu::tWIDE_KL, "wide_kl" },
{ Cpu::tKEYLOCKER, "keylocker" },
{ Cpu::tKEYLOCKER_WIDE, "keylocker_wide" },
{ Cpu::tTSXLDTRK, "tsxldtrk" },
};
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
if (cpu.has(tbl[i].type)) printf(" %s", tbl[i].str);
Expand Down
4 changes: 4 additions & 0 deletions test/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1944,6 +1944,8 @@ CYBOZU_TEST_AUTO(misc)
cldemote(ptr[eax+esi*4+0x12]);
movdiri(ptr[edx+esi*2+4], eax);
movdir64b(eax, ptr[edx]);
xresldtrk();
xsusldtrk();
#ifdef XBYAK64
cldemote(ptr[rax+rdi*8+0x123]);
movdiri(ptr[rax+r12], r9);
Expand Down Expand Up @@ -1973,6 +1975,8 @@ CYBOZU_TEST_AUTO(misc)
0x67,
#endif
0x0f, 0x38, 0xf8, 0x02, // movdir64b
0xf2, 0x0f, 0x01, 0xe9, // xresldtrk
0xf2, 0x0f, 0x01, 0xe8, // xsusldtrk
#ifdef XBYAK64
0x0f, 0x1c, 0x84, 0xf8, 0x23, 0x01, 0x00, 0x00, // cldemote
0x4e, 0x0f, 0x38, 0xf9, 0x0c, 0x20, // movdiri
Expand Down
2 changes: 1 addition & 1 deletion xbyak/xbyak.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ namespace Xbyak {

enum {
DEFAULT_MAX_CODE_SIZE = 4096,
VERSION = 0x7060 /* 0xABCD = A.BC(.D) */
VERSION = 0x7070 /* 0xABCD = A.BC(.D) */
};

#ifndef MIE_INTEGER_TYPE_DEFINED
Expand Down
4 changes: 3 additions & 1 deletion xbyak/xbyak_mnemonic.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const char *getVersionString() const { return "7.06"; }
const char *getVersionString() const { return "7.07"; }
void aadd(const Address& addr, const Reg32e &reg) { opMR(addr, reg, T_0F38, 0x0FC, T_APX); }
void aand(const Address& addr, const Reg32e &reg) { opMR(addr, reg, T_0F38|T_66, 0x0FC, T_APX|T_66); }
void adc(const Operand& op, uint32_t imm) { opOI(op, imm, 0x10, 2); }
Expand Down Expand Up @@ -1612,6 +1612,8 @@ void xor_(const Reg& d, const Operand& op, uint32_t imm) { opROI(d, op, imm, T_N
void xor_(const Reg& d, const Operand& op1, const Operand& op2) { opROO(d, op1, op2, T_NF|T_CODE1_IF1, 0x30); }
void xorpd(const Xmm& xmm, const Operand& op) { opSSE(xmm, op, T_0F | T_66, 0x57, isXMM_XMMorMEM); }
void xorps(const Xmm& xmm, const Operand& op) { opSSE(xmm, op, T_0F, 0x57, isXMM_XMMorMEM); }
void xresldtrk() { db(0xF2); db(0x0F); db(0x01); db(0xE9); }
void xsusldtrk() { db(0xF2); db(0x0F); db(0x01); db(0xE8); }
#ifdef XBYAK_ENABLE_OMITTED_OPERAND
void vblendpd(const Xmm& x, const Operand& op, uint8_t imm) { vblendpd(x, x, op, imm); }
void vblendps(const Xmm& x, const Operand& op, uint8_t imm) { vblendps(x, x, op, imm); }
Expand Down
2 changes: 2 additions & 0 deletions xbyak/xbyak_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ class Cpu {
XBYAK_DEFINE_TYPE(87, tKEYLOCKER_WIDE);
XBYAK_DEFINE_TYPE(88, tSSE4a);
XBYAK_DEFINE_TYPE(89, tCLWB);
XBYAK_DEFINE_TYPE(90, tTSXLDTRK);

#undef XBYAK_SPLIT_ID
#undef XBYAK_DEFINE_TYPE
Expand Down Expand Up @@ -684,6 +685,7 @@ class Cpu {
if (ECX & (1U << 28)) type_ |= tMOVDIR64B;
if (EDX & (1U << 5)) type_ |= tUINTR;
if (EDX & (1U << 14)) type_ |= tSERIALIZE;
if (EDX & (1U << 16)) type_ |= tTSXLDTRK;
if (EDX & (1U << 22)) type_ |= tAMX_BF16;
if (EDX & (1U << 24)) type_ |= tAMX_TILE;
if (EDX & (1U << 25)) type_ |= tAMX_INT8;
Expand Down

0 comments on commit aabb091

Please sign in to comment.