2019-09-17 13:22:17 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright © 2018 Google
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
|
*
|
|
|
|
|
* The above copyright notice and this permission notice (including the next
|
|
|
|
|
* paragraph) shall be included in all copies or substantial portions of the
|
|
|
|
|
* Software.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
|
|
|
* IN THE SOFTWARE.
|
2021-06-09 17:54:53 +02:00
|
|
|
*
|
2019-09-17 13:22:17 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "aco_interface.h"
|
2021-06-09 10:14:54 +02:00
|
|
|
|
2019-09-17 13:22:17 +02:00
|
|
|
#include "aco_ir.h"
|
2021-06-09 15:40:03 +02:00
|
|
|
|
2019-09-17 13:22:17 +02:00
|
|
|
#include "vulkan/radv_shader.h"
|
2019-11-11 18:27:25 +01:00
|
|
|
#include "vulkan/radv_shader_args.h"
|
2019-09-17 13:22:17 +02:00
|
|
|
|
2021-06-09 15:40:03 +02:00
|
|
|
#include "util/memstream.h"
|
|
|
|
|
|
2020-11-26 22:06:22 -08:00
|
|
|
#include <array>
|
2019-09-17 13:22:17 +02:00
|
|
|
#include <iostream>
|
2021-06-09 15:40:03 +02:00
|
|
|
#include <vector>
|
2019-09-17 13:22:17 +02:00
|
|
|
|
2021-03-04 16:41:05 +00:00
|
|
|
static const std::array<aco_compiler_statistic_info, aco::num_statistics> statistic_infos = []()
|
2020-11-26 22:06:22 -08:00
|
|
|
{
|
|
|
|
|
std::array<aco_compiler_statistic_info, aco::num_statistics> ret{};
|
2021-06-09 10:14:54 +02:00
|
|
|
ret[aco::statistic_hash] =
|
|
|
|
|
aco_compiler_statistic_info{"Hash", "CRC32 hash of code and constant data"};
|
|
|
|
|
ret[aco::statistic_instructions] =
|
|
|
|
|
aco_compiler_statistic_info{"Instructions", "Instruction count"};
|
|
|
|
|
ret[aco::statistic_copies] =
|
|
|
|
|
aco_compiler_statistic_info{"Copies", "Copy instructions created for pseudo-instructions"};
|
2020-11-26 22:06:22 -08:00
|
|
|
ret[aco::statistic_branches] = aco_compiler_statistic_info{"Branches", "Branch instructions"};
|
2021-06-09 10:14:54 +02:00
|
|
|
ret[aco::statistic_latency] =
|
|
|
|
|
aco_compiler_statistic_info{"Latency", "Issue cycles plus stall cycles"};
|
|
|
|
|
ret[aco::statistic_inv_throughput] = aco_compiler_statistic_info{
|
|
|
|
|
"Inverse Throughput", "Estimated busy cycles to execute one wave"};
|
|
|
|
|
ret[aco::statistic_vmem_clauses] = aco_compiler_statistic_info{
|
|
|
|
|
"VMEM Clause", "Number of VMEM clauses (includes 1-sized clauses)"};
|
|
|
|
|
ret[aco::statistic_smem_clauses] = aco_compiler_statistic_info{
|
|
|
|
|
"SMEM Clause", "Number of SMEM clauses (includes 1-sized clauses)"};
|
|
|
|
|
ret[aco::statistic_sgpr_presched] =
|
|
|
|
|
aco_compiler_statistic_info{"Pre-Sched SGPRs", "SGPR usage before scheduling"};
|
|
|
|
|
ret[aco::statistic_vgpr_presched] =
|
|
|
|
|
aco_compiler_statistic_info{"Pre-Sched VGPRs", "VGPR usage before scheduling"};
|
2020-11-26 22:06:22 -08:00
|
|
|
return ret;
|
|
|
|
|
}();
|
2019-12-04 15:19:56 +00:00
|
|
|
|
2021-03-04 16:41:05 +00:00
|
|
|
const unsigned aco_num_statistics = aco::num_statistics;
|
2021-06-09 10:14:54 +02:00
|
|
|
const aco_compiler_statistic_info* aco_statistic_infos = statistic_infos.data();
|
2021-03-04 16:41:05 +00:00
|
|
|
|
2021-06-09 10:14:54 +02:00
|
|
|
static void
|
|
|
|
|
validate(aco::Program* program)
|
2020-01-30 11:49:20 +00:00
|
|
|
{
|
2020-08-18 08:14:06 +02:00
|
|
|
if (!(aco::debug_flags & aco::DEBUG_VALIDATE_IR))
|
2020-01-30 11:49:20 +00:00
|
|
|
return;
|
|
|
|
|
|
2020-08-22 20:41:45 +02:00
|
|
|
ASSERTED bool is_valid = aco::validate_ir(program);
|
2020-01-30 11:49:20 +00:00
|
|
|
assert(is_valid);
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-15 10:03:21 +02:00
|
|
|
static std::string
|
|
|
|
|
get_disasm_string(aco::Program* program, std::vector<uint32_t>& code,
|
|
|
|
|
unsigned exec_size)
|
|
|
|
|
{
|
|
|
|
|
std::string disasm;
|
|
|
|
|
|
|
|
|
|
if (check_print_asm_support(program)) {
|
|
|
|
|
char* data = NULL;
|
|
|
|
|
size_t disasm_size = 0;
|
|
|
|
|
struct u_memstream mem;
|
|
|
|
|
if (u_memstream_open(&mem, &data, &disasm_size)) {
|
|
|
|
|
FILE* const memf = u_memstream_get(&mem);
|
|
|
|
|
aco::print_asm(program, code, exec_size / 4u, memf);
|
|
|
|
|
fputc(0, memf);
|
|
|
|
|
u_memstream_close(&mem);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
disasm = std::string(data, data + disasm_size);
|
|
|
|
|
free(data);
|
|
|
|
|
} else {
|
|
|
|
|
disasm = "Shader disassembly is not supported in the current configuration"
|
|
|
|
|
#ifndef LLVM_AVAILABLE
|
|
|
|
|
" (LLVM not available)"
|
|
|
|
|
#endif
|
|
|
|
|
".\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return disasm;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-09 10:14:54 +02:00
|
|
|
void
|
2022-05-16 14:54:05 +10:00
|
|
|
aco_compile_shader(const struct aco_compiler_options* options,
|
2022-05-05 13:34:41 +10:00
|
|
|
const struct aco_shader_info* info,
|
2021-10-08 16:14:15 +02:00
|
|
|
unsigned shader_count, struct nir_shader* const* shaders,
|
|
|
|
|
const struct radv_shader_args *args,
|
|
|
|
|
struct radv_shader_binary** binary)
|
2019-09-17 13:22:17 +02:00
|
|
|
{
|
2020-01-22 19:57:20 +00:00
|
|
|
aco::init();
|
2019-09-17 13:22:17 +02:00
|
|
|
|
|
|
|
|
ac_shader_config config = {0};
|
|
|
|
|
std::unique_ptr<aco::Program> program{new aco::Program};
|
|
|
|
|
|
2021-10-08 16:14:15 +02:00
|
|
|
program->collect_statistics = options->record_stats;
|
2019-12-04 15:19:56 +00:00
|
|
|
if (program->collect_statistics)
|
|
|
|
|
memset(program->statistics, 0, sizeof(program->statistics));
|
|
|
|
|
|
2021-10-08 16:14:15 +02:00
|
|
|
program->debug.func = options->debug.func;
|
|
|
|
|
program->debug.private_data = options->debug.private_data;
|
2020-08-14 13:59:16 +02:00
|
|
|
|
2019-09-17 13:22:17 +02:00
|
|
|
/* Instruction Selection */
|
2019-11-15 11:31:03 +00:00
|
|
|
if (args->is_gs_copy_shader)
|
2021-10-08 16:14:15 +02:00
|
|
|
aco::select_gs_copy_shader(program.get(), shaders[0], &config, options, info, args);
|
2020-08-18 18:44:07 +02:00
|
|
|
else if (args->is_trap_handler_shader)
|
2021-10-08 16:14:15 +02:00
|
|
|
aco::select_trap_handler_shader(program.get(), shaders[0], &config, options, info, args);
|
2019-11-15 11:31:03 +00:00
|
|
|
else
|
2021-10-08 16:14:15 +02:00
|
|
|
aco::select_program(program.get(), shader_count, shaders, &config, options, info, args);
|
|
|
|
|
if (options->dump_preoptir)
|
2019-09-17 13:22:17 +02:00
|
|
|
aco_print_program(program.get(), stderr);
|
|
|
|
|
|
2020-08-21 11:33:22 +02:00
|
|
|
aco::live live_vars;
|
|
|
|
|
if (!args->is_trap_handler_shader) {
|
|
|
|
|
/* Phi lowering */
|
|
|
|
|
aco::lower_phis(program.get());
|
|
|
|
|
aco::dominator_tree(program.get());
|
|
|
|
|
validate(program.get());
|
|
|
|
|
|
|
|
|
|
/* Optimization */
|
2021-10-08 16:14:15 +02:00
|
|
|
if (!options->key.optimisations_disabled) {
|
2020-08-28 08:41:20 +02:00
|
|
|
if (!(aco::debug_flags & aco::DEBUG_NO_VN))
|
|
|
|
|
aco::value_numbering(program.get());
|
|
|
|
|
if (!(aco::debug_flags & aco::DEBUG_NO_OPT))
|
|
|
|
|
aco::optimize(program.get());
|
|
|
|
|
}
|
2020-08-21 11:33:22 +02:00
|
|
|
|
|
|
|
|
/* cleanup and exec mask handling */
|
|
|
|
|
aco::setup_reduce_temp(program.get());
|
|
|
|
|
aco::insert_exec_mask(program.get());
|
|
|
|
|
validate(program.get());
|
|
|
|
|
|
|
|
|
|
/* spilling and scheduling */
|
2020-10-08 10:12:58 +02:00
|
|
|
live_vars = aco::live_var_analysis(program.get());
|
|
|
|
|
aco::spill(program.get(), live_vars);
|
2020-08-21 11:33:22 +02:00
|
|
|
}
|
2019-09-17 13:22:17 +02:00
|
|
|
|
2019-09-24 15:23:46 +01:00
|
|
|
std::string llvm_ir;
|
2021-10-08 16:14:15 +02:00
|
|
|
if (options->record_ir) {
|
2021-06-09 10:14:54 +02:00
|
|
|
char* data = NULL;
|
2019-09-24 15:23:46 +01:00
|
|
|
size_t size = 0;
|
2020-08-04 10:58:11 -07:00
|
|
|
u_memstream mem;
|
|
|
|
|
if (u_memstream_open(&mem, &data, &size)) {
|
2021-06-09 10:14:54 +02:00
|
|
|
FILE* const memf = u_memstream_get(&mem);
|
2020-08-04 10:58:11 -07:00
|
|
|
aco_print_program(program.get(), memf);
|
|
|
|
|
fputc(0, memf);
|
|
|
|
|
u_memstream_close(&mem);
|
2019-09-24 15:23:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
llvm_ir = std::string(data, data + size);
|
|
|
|
|
free(data);
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-18 16:10:46 +00:00
|
|
|
if (program->collect_statistics)
|
|
|
|
|
aco::collect_presched_stats(program.get());
|
|
|
|
|
|
2021-10-08 16:14:15 +02:00
|
|
|
if ((aco::debug_flags & aco::DEBUG_LIVE_INFO) && options->dump_shader)
|
2021-03-15 14:17:14 +00:00
|
|
|
aco_print_program(program.get(), stderr, live_vars, aco::print_live_vars | aco::print_kill);
|
|
|
|
|
|
2020-08-21 11:33:22 +02:00
|
|
|
if (!args->is_trap_handler_shader) {
|
2021-10-08 16:14:15 +02:00
|
|
|
if (!options->key.optimisations_disabled && !(aco::debug_flags & aco::DEBUG_NO_SCHED))
|
2020-08-26 14:24:45 +02:00
|
|
|
aco::schedule_program(program.get(), live_vars);
|
2020-08-21 11:33:22 +02:00
|
|
|
validate(program.get());
|
2019-09-17 13:22:17 +02:00
|
|
|
|
2020-08-21 11:33:22 +02:00
|
|
|
/* Register Allocation */
|
|
|
|
|
aco::register_allocation(program.get(), live_vars.live_out);
|
|
|
|
|
|
2020-10-08 10:12:58 +02:00
|
|
|
if (aco::validate_ra(program.get())) {
|
2020-08-21 11:33:22 +02:00
|
|
|
aco_print_program(program.get(), stderr);
|
|
|
|
|
abort();
|
2021-10-08 16:14:15 +02:00
|
|
|
} else if (options->dump_shader) {
|
2021-04-20 17:35:41 +01:00
|
|
|
aco_print_program(program.get(), stderr);
|
2020-08-21 11:33:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
validate(program.get());
|
2019-09-17 13:22:17 +02:00
|
|
|
|
2020-11-24 11:39:28 +01:00
|
|
|
/* Optimization */
|
2021-10-08 16:14:15 +02:00
|
|
|
if (!options->key.optimisations_disabled && !(aco::debug_flags & aco::DEBUG_NO_OPT)) {
|
2020-11-24 11:39:28 +01:00
|
|
|
aco::optimize_postRA(program.get());
|
|
|
|
|
validate(program.get());
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-21 11:33:22 +02:00
|
|
|
aco::ssa_elimination(program.get());
|
|
|
|
|
}
|
2020-06-16 10:03:00 +01:00
|
|
|
|
2019-09-17 13:22:17 +02:00
|
|
|
/* Lower to HW Instructions */
|
|
|
|
|
aco::lower_to_hw_instr(program.get());
|
|
|
|
|
|
|
|
|
|
/* Insert Waitcnt */
|
|
|
|
|
aco::insert_wait_states(program.get());
|
|
|
|
|
aco::insert_NOPs(program.get());
|
|
|
|
|
|
2022-05-12 02:50:17 -04:00
|
|
|
if (program->gfx_level >= GFX10)
|
2020-07-13 13:42:24 +01:00
|
|
|
aco::form_hard_clauses(program.get());
|
|
|
|
|
|
2021-02-03 13:40:54 +00:00
|
|
|
if (program->collect_statistics || (aco::debug_flags & aco::DEBUG_PERF_INFO))
|
2019-12-04 15:19:56 +00:00
|
|
|
aco::collect_preasm_stats(program.get());
|
|
|
|
|
|
2019-09-17 13:22:17 +02:00
|
|
|
/* Assembly */
|
|
|
|
|
std::vector<uint32_t> code;
|
|
|
|
|
unsigned exec_size = aco::emit_program(program.get(), code);
|
|
|
|
|
|
2019-12-04 15:19:56 +00:00
|
|
|
if (program->collect_statistics)
|
|
|
|
|
aco::collect_postasm_stats(program.get(), code);
|
|
|
|
|
|
2021-10-08 16:14:15 +02:00
|
|
|
bool get_disasm = options->dump_shader || options->record_ir;
|
2019-09-17 13:22:17 +02:00
|
|
|
|
2019-09-24 15:23:46 +01:00
|
|
|
size_t size = llvm_ir.size();
|
2019-09-17 13:22:17 +02:00
|
|
|
|
|
|
|
|
std::string disasm;
|
|
|
|
|
if (get_disasm) {
|
2021-10-15 10:03:21 +02:00
|
|
|
disasm = get_disasm_string(program.get(), code, exec_size);
|
|
|
|
|
size += disasm.size();
|
2019-09-17 13:22:17 +02:00
|
|
|
}
|
|
|
|
|
|
2019-12-04 15:19:56 +00:00
|
|
|
size_t stats_size = 0;
|
|
|
|
|
if (program->collect_statistics)
|
2021-03-04 16:41:05 +00:00
|
|
|
stats_size = aco::num_statistics * sizeof(uint32_t);
|
2019-12-04 15:19:56 +00:00
|
|
|
size += stats_size;
|
|
|
|
|
|
2019-09-17 13:22:17 +02:00
|
|
|
size += code.size() * sizeof(uint32_t) + sizeof(radv_shader_binary_legacy);
|
2019-09-24 17:21:51 +01:00
|
|
|
/* We need to calloc to prevent unintialized data because this will be used
|
|
|
|
|
* directly for the disk cache. Uninitialized data can appear because of
|
|
|
|
|
* padding in the struct or because legacy_binary->data can be at an offset
|
|
|
|
|
* from the start less than sizeof(radv_shader_binary_legacy). */
|
2021-06-09 10:14:54 +02:00
|
|
|
radv_shader_binary_legacy* legacy_binary = (radv_shader_binary_legacy*)calloc(size, 1);
|
2019-09-17 13:22:17 +02:00
|
|
|
|
|
|
|
|
legacy_binary->base.type = RADV_BINARY_TYPE_LEGACY;
|
2021-06-09 10:14:54 +02:00
|
|
|
legacy_binary->base.stage = shaders[shader_count - 1]->info.stage;
|
2019-11-15 11:31:03 +00:00
|
|
|
legacy_binary->base.is_gs_copy_shader = args->is_gs_copy_shader;
|
2019-09-17 13:22:17 +02:00
|
|
|
legacy_binary->base.total_size = size;
|
|
|
|
|
|
2021-03-04 16:41:05 +00:00
|
|
|
if (program->collect_statistics)
|
|
|
|
|
memcpy(legacy_binary->data, program->statistics, aco::num_statistics * sizeof(uint32_t));
|
2019-12-04 15:19:56 +00:00
|
|
|
legacy_binary->stats_size = stats_size;
|
2019-12-04 14:46:31 +00:00
|
|
|
|
2021-06-09 10:14:54 +02:00
|
|
|
memcpy(legacy_binary->data + legacy_binary->stats_size, code.data(),
|
|
|
|
|
code.size() * sizeof(uint32_t));
|
2019-09-17 13:22:17 +02:00
|
|
|
legacy_binary->exec_size = exec_size;
|
|
|
|
|
legacy_binary->code_size = code.size() * sizeof(uint32_t);
|
|
|
|
|
|
2021-09-22 10:13:01 +02:00
|
|
|
legacy_binary->base.config = config;
|
2019-09-17 13:22:17 +02:00
|
|
|
legacy_binary->disasm_size = 0;
|
2019-09-25 11:48:04 +01:00
|
|
|
legacy_binary->ir_size = llvm_ir.size();
|
2019-09-24 15:23:46 +01:00
|
|
|
|
2021-06-09 10:14:54 +02:00
|
|
|
llvm_ir.copy((char*)legacy_binary->data + legacy_binary->stats_size + legacy_binary->code_size,
|
|
|
|
|
llvm_ir.size());
|
2019-09-17 13:22:17 +02:00
|
|
|
|
|
|
|
|
if (get_disasm) {
|
2021-06-09 10:14:54 +02:00
|
|
|
disasm.copy((char*)legacy_binary->data + legacy_binary->stats_size +
|
|
|
|
|
legacy_binary->code_size + llvm_ir.size(),
|
|
|
|
|
disasm.size());
|
2019-09-24 15:23:46 +01:00
|
|
|
legacy_binary->disasm_size = disasm.size();
|
2019-09-17 13:22:17 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-09 10:14:54 +02:00
|
|
|
*binary = (radv_shader_binary*)legacy_binary;
|
2019-09-17 13:22:17 +02:00
|
|
|
}
|
2021-04-16 11:55:59 +01:00
|
|
|
|
|
|
|
|
void
|
2022-05-16 14:54:05 +10:00
|
|
|
aco_compile_vs_prolog(const struct aco_compiler_options* options,
|
2022-05-05 13:34:41 +10:00
|
|
|
const struct aco_shader_info* info,
|
2022-05-05 14:27:01 +10:00
|
|
|
const struct aco_vs_prolog_key* key,
|
2021-10-08 16:14:15 +02:00
|
|
|
const struct radv_shader_args* args,
|
|
|
|
|
struct radv_prolog_binary** binary)
|
2021-04-16 11:55:59 +01:00
|
|
|
{
|
2021-05-17 17:53:30 +01:00
|
|
|
aco::init();
|
|
|
|
|
|
|
|
|
|
/* create program */
|
|
|
|
|
ac_shader_config config = {0};
|
|
|
|
|
std::unique_ptr<aco::Program> program{new aco::Program};
|
|
|
|
|
program->collect_statistics = false;
|
|
|
|
|
program->debug.func = NULL;
|
|
|
|
|
program->debug.private_data = NULL;
|
|
|
|
|
|
|
|
|
|
/* create IR */
|
|
|
|
|
unsigned num_preserved_sgprs;
|
2021-10-08 16:14:15 +02:00
|
|
|
aco::select_vs_prolog(program.get(), key, &config, options, info, args, &num_preserved_sgprs);
|
2021-05-17 17:53:30 +01:00
|
|
|
aco::insert_NOPs(program.get());
|
|
|
|
|
|
2021-10-08 16:14:15 +02:00
|
|
|
if (options->dump_shader)
|
2021-05-17 17:53:30 +01:00
|
|
|
aco_print_program(program.get(), stderr);
|
|
|
|
|
|
|
|
|
|
/* assembly */
|
|
|
|
|
std::vector<uint32_t> code;
|
|
|
|
|
code.reserve(align(program->blocks[0].instructions.size() * 2, 16));
|
|
|
|
|
unsigned exec_size = aco::emit_program(program.get(), code);
|
|
|
|
|
|
|
|
|
|
/* copy into binary */
|
|
|
|
|
size_t size = code.size() * sizeof(uint32_t) + sizeof(radv_prolog_binary);
|
2021-10-15 10:03:21 +02:00
|
|
|
|
|
|
|
|
bool get_disasm = options->dump_shader || options->record_ir;
|
|
|
|
|
|
|
|
|
|
std::string disasm;
|
|
|
|
|
if (get_disasm) {
|
|
|
|
|
disasm = get_disasm_string(program.get(), code, exec_size);
|
|
|
|
|
size += disasm.size();
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-17 17:53:30 +01:00
|
|
|
radv_prolog_binary* prolog_binary = (radv_prolog_binary*)calloc(size, 1);
|
|
|
|
|
|
|
|
|
|
prolog_binary->num_sgprs = config.num_sgprs;
|
|
|
|
|
prolog_binary->num_vgprs = config.num_vgprs;
|
|
|
|
|
prolog_binary->num_preserved_sgprs = num_preserved_sgprs;
|
|
|
|
|
prolog_binary->code_size = code.size() * sizeof(uint32_t);
|
|
|
|
|
memcpy(prolog_binary->data, code.data(), prolog_binary->code_size);
|
|
|
|
|
|
2021-10-15 10:03:21 +02:00
|
|
|
if (get_disasm) {
|
|
|
|
|
disasm.copy((char*)prolog_binary->data + prolog_binary->code_size,
|
|
|
|
|
disasm.size());
|
|
|
|
|
prolog_binary->disasm_size = disasm.size();
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-17 17:53:30 +01:00
|
|
|
*binary = prolog_binary;
|
2021-04-16 11:55:59 +01:00
|
|
|
}
|