mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 12:34:35 +03:00
[ABI] Refactored AsmJit to use strong-typed enums, this breaks both API and ABI
[ABI] Added ABI version as an inline namespace, which forms asmjit::_abi_MAJOR_MINOR
[ABI] Added support for AVX512_FP16, 16-bit broadcast, and AVX512_FP16 tests
[ABI] Added initial support for consecutive registers into instruction database and register allocator
[ABI] Added a possibility to use temporary memory in CodeHolder's zone
[ABI] Compiler::setArg() is now deprecated, use FuncNode::setArg()
[Bug] Fixed correct RW information of instructions that only support implicit zeroing with {k}
[Bug] Fixed broadcast to be able to broadcast bcst16 operands
This commit is contained in:
@@ -1,25 +1,7 @@
|
||||
// AsmJit - Machine code generation for C++
|
||||
// This file is part of AsmJit project <https://asmjit.com>
|
||||
//
|
||||
// * Official AsmJit Home Page: https://asmjit.com
|
||||
// * Official Github Repository: https://github.com/asmjit/asmjit
|
||||
//
|
||||
// Copyright (c) 2008-2020 The AsmJit Authors
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would be
|
||||
// appreciated but is not required.
|
||||
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||
// misrepresented as being the original software.
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
// See asmjit.h or LICENSE.md for license and copyright information
|
||||
// SPDX-License-Identifier: Zlib
|
||||
|
||||
#ifndef ASMJIT_TEST_MISC_H_INCLUDED
|
||||
#define ASMJIT_TEST_MISC_H_INCLUDED
|
||||
@@ -60,8 +42,8 @@ static void generateSseAlphaBlendInternal(
|
||||
cc.movd(v0080, gp0.r32());
|
||||
cc.mov(gp0.r32(), 0x01010101);
|
||||
cc.movd(v0101, gp0.r32());
|
||||
cc.pshufd(v0080, v0080, x86::Predicate::shuf(0, 0, 0, 0));
|
||||
cc.pshufd(v0101, v0101, x86::Predicate::shuf(0, 0, 0, 0));
|
||||
cc.pshufd(v0080, v0080, x86::shuffleImm(0, 0, 0, 0));
|
||||
cc.pshufd(v0101, v0101, x86::shuffleImm(0, 0, 0, 0));
|
||||
|
||||
// How many pixels have to be processed to make the loop aligned.
|
||||
cc.xor_(j, j);
|
||||
@@ -89,7 +71,7 @@ static void generateSseAlphaBlendInternal(
|
||||
cc.psrlw(a0, 8);
|
||||
cc.punpcklbw(x0, vzero);
|
||||
|
||||
cc.pshuflw(a0, a0, x86::Predicate::shuf(1, 1, 1, 1));
|
||||
cc.pshuflw(a0, a0, x86::shuffleImm(1, 1, 1, 1));
|
||||
cc.punpcklbw(y0, vzero);
|
||||
|
||||
cc.pmullw(x0, a0);
|
||||
@@ -144,8 +126,8 @@ static void generateSseAlphaBlendInternal(
|
||||
cc.punpckhbw(x1, vzero);
|
||||
cc.punpckhwd(a1, a1);
|
||||
|
||||
cc.pshufd(a0, a0, x86::Predicate::shuf(3, 3, 1, 1));
|
||||
cc.pshufd(a1, a1, x86::Predicate::shuf(3, 3, 1, 1));
|
||||
cc.pshufd(a0, a0, x86::shuffleImm(3, 3, 1, 1));
|
||||
cc.pshufd(a1, a1, x86::shuffleImm(3, 3, 1, 1));
|
||||
|
||||
cc.pmullw(x0, a0);
|
||||
cc.pmullw(x1, a1);
|
||||
@@ -188,7 +170,7 @@ static void generateSseAlphaBlend(asmjit::BaseEmitter& emitter, bool emitPrologE
|
||||
|
||||
if (emitPrologEpilog) {
|
||||
FuncDetail func;
|
||||
func.init(FuncSignatureT<void, void*, const void*, size_t>(CallConv::kIdHost), cc.environment());
|
||||
func.init(FuncSignatureT<void, void*, const void*, size_t>(CallConvId::kHost), cc.environment());
|
||||
|
||||
FuncFrame frame;
|
||||
frame.init(func);
|
||||
@@ -220,7 +202,7 @@ static void generateSseAlphaBlend(asmjit::BaseEmitter& emitter, bool emitPrologE
|
||||
|
||||
if (emitPrologEpilog) {
|
||||
FuncDetail func;
|
||||
func.init(FuncSignatureT<void, void*, const void*, size_t>(CallConv::kIdHost), cc.environment());
|
||||
func.init(FuncSignatureT<void, void*, const void*, size_t>(CallConvId::kHost), cc.environment());
|
||||
|
||||
FuncFrame frame;
|
||||
frame.init(func);
|
||||
@@ -260,10 +242,10 @@ static void generateSseAlphaBlend(asmjit::BaseEmitter& emitter, bool emitPrologE
|
||||
Xmm v6 = cc.newXmm("v6");
|
||||
Xmm v7 = cc.newXmm("v7");
|
||||
|
||||
cc.addFunc(FuncSignatureT<void, void*, const void*, size_t>(CallConv::kIdHost));
|
||||
cc.setArg(0, dst);
|
||||
cc.setArg(1, src);
|
||||
cc.setArg(2, i);
|
||||
FuncNode* funcNode = cc.addFunc(FuncSignatureT<void, void*, const void*, size_t>(CallConvId::kHost));
|
||||
funcNode->setArg(0, dst);
|
||||
funcNode->setArg(1, src);
|
||||
funcNode->setArg(2, i);
|
||||
generateSseAlphaBlendInternal(cc, dst, src, i, j, v0, v1, v2, v3, v4, v5, v6, v7);
|
||||
cc.endFunc();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user