2018-05-07 13:29:12 +01:00
|
|
|
/* This file is part of the dynarmic project.
|
|
|
|
* Copyright (c) 2018 MerryMage
|
|
|
|
* This software may be used and distributed according to the terms of the GNU
|
|
|
|
* General Public icense version 2 or any later version.
|
|
|
|
*/
|
|
|
|
|
2018-08-14 19:13:47 +01:00
|
|
|
#include "backend/x64/block_of_code.h"
|
|
|
|
#include "backend/x64/emit_x64.h"
|
2018-05-07 13:29:12 +01:00
|
|
|
#include "common/common_types.h"
|
2018-07-29 08:48:28 +01:00
|
|
|
#include "common/crypto/sm4.h"
|
2018-05-07 13:29:12 +01:00
|
|
|
#include "frontend/ir/microinstruction.h"
|
|
|
|
#include "frontend/ir/opcodes.h"
|
|
|
|
|
|
|
|
namespace Dynarmic::BackendX64 {
|
|
|
|
|
|
|
|
void EmitX64::EmitSM4AccessSubstitutionBox(EmitContext& ctx, IR::Inst* inst) {
|
|
|
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
|
|
|
|
|
|
|
ctx.reg_alloc.HostCall(inst, args[0]);
|
2018-07-29 08:48:28 +01:00
|
|
|
code.CallFunction(&Common::Crypto::SM4::AccessSubstitutionBox);
|
2018-05-07 13:29:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Dynarmic::BackendX64
|