2023-12-22 11:57:49 +00:00
|
|
|
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
|
|
|
// SPDX-License-Identifier: LGPL-3.0+
|
2021-09-21 10:05:20 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "Pcsx2Defs.h"
|
|
|
|
#include <cstdint>
|
|
|
|
#include <cstddef>
|
|
|
|
|
|
|
|
struct fastjmp_buf
|
|
|
|
{
|
2022-03-21 08:43:18 +00:00
|
|
|
#if defined(_WIN32)
|
2021-09-21 10:05:20 +00:00
|
|
|
static constexpr std::size_t BUF_SIZE = 240;
|
2023-12-26 10:25:26 +00:00
|
|
|
#elif defined(_M_ARM64)
|
|
|
|
static constexpr std::size_t BUF_SIZE = 168;
|
2021-09-21 10:05:20 +00:00
|
|
|
#else
|
2022-03-21 08:43:18 +00:00
|
|
|
static constexpr std::size_t BUF_SIZE = 64;
|
2021-09-21 10:05:20 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
alignas(16) std::uint8_t buf[BUF_SIZE];
|
|
|
|
};
|
|
|
|
|
|
|
|
extern "C" {
|
2022-05-12 12:34:42 +00:00
|
|
|
int fastjmp_set(fastjmp_buf* buf);
|
|
|
|
__noreturn void fastjmp_jmp(const fastjmp_buf* buf, int ret);
|
2021-09-21 10:05:20 +00:00
|
|
|
}
|