jit: Add Barr C code standard

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar 2025-10-26 13:59:48 -04:00
parent a543f78b77
commit 1c3b730899
No known key found for this signature in database
GPG key ID: 04307C401999C596
5 changed files with 1628 additions and 136 deletions

View file

@ -5,29 +5,29 @@
#include <stdint.h>
#include "host/memory/arena.h"
namespace pound::jit::decoder
{
namespace pound::jit::decoder {
typedef struct arm32_decoder arm32_decoder_t;
typedef void (*arm32_handler_fn)(arm32_decoder_t* decoder, uint32_t instruction);
typedef struct
{
const char* name;
uint32_t mask;
uint32_t expected;
const char *p_name;
uint32_t mask;
uint32_t expected;
} arm32_instruction_info_t;
struct arm32_decoder
{
pound::host::memory::arena_t allocator;
arm32_instruction_info_t* instructions;
size_t instruction_count;
size_t instruction_capacity;
arm32_instruction_info_t *p_instructions;
size_t instruction_count;
size_t instruction_capacity;
};
extern arm32_decoder_t g_arm32_decoder;
void arm32_init(pound::host::memory::arena_t allocator, arm32_decoder_t* decoder);
arm32_instruction_info_t* arm32_decode(arm32_decoder_t* decoder, uint32_t instruction);
void arm32_init(pound::host::memory::arena_t allocator,
arm32_decoder_t *p_decoder);
arm32_instruction_info_t *arm32_decode(arm32_decoder_t *p_decoder,
uint32_t instruction);
}
#endif // POUND_JIT_DECODER_ARM32_H
#endif // POUND_JIT_DECODER_ARM32_H