mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-16 13:36:57 +00:00
Fix formatting compiler warnings
Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
parent
e47570693f
commit
d6c29e412a
6 changed files with 102 additions and 92 deletions
|
|
@ -6,106 +6,105 @@
|
|||
#include "common/logging.h"
|
||||
|
||||
namespace pound::jit::ir {
|
||||
|
||||
const value_t*
|
||||
instruction_get_arg (const instruction_t *instruction, const size_t arg_index)
|
||||
value_t *
|
||||
instruction_get_arg (instruction_t *instruction, size_t arg_index)
|
||||
{
|
||||
PVM_ASSERT(nullptr != instruction);
|
||||
PVM_ASSERT(arg_index < MAX_IR_ARGS);
|
||||
|
||||
const value_t *arg = &instruction->args[arg_index];
|
||||
value_t *arg = &instruction->args[arg_index];
|
||||
PVM_ASSERT(nullptr != arg);
|
||||
return arg;
|
||||
}
|
||||
|
||||
const uint64_t
|
||||
instruction_get_arg_u64(const instruction_t *instruction, const size_t arg_index)
|
||||
uint64_t
|
||||
instruction_get_arg_u64 (instruction_t *instruction, const size_t arg_index)
|
||||
{
|
||||
PVM_ASSERT(nullptr != instruction);
|
||||
PVM_ASSERT(arg_index < MAX_IR_ARGS);
|
||||
|
||||
const value_t* arg = instruction_get_arg(instruction, arg_index);
|
||||
value_t *arg = instruction_get_arg(instruction, arg_index);
|
||||
PVM_ASSERT(nullptr != arg);
|
||||
|
||||
PVM_ASSERT(IR_TYPE_U64 == arg->type);
|
||||
const uint64_t value = value_get_u64(arg);
|
||||
uint64_t value = value_get_u64(arg);
|
||||
return value;
|
||||
}
|
||||
|
||||
const uint32_t
|
||||
instruction_get_arg_u32(const instruction_t *instruction, const size_t arg_index)
|
||||
uint32_t
|
||||
instruction_get_arg_u32 (instruction_t *instruction, const size_t arg_index)
|
||||
{
|
||||
PVM_ASSERT(nullptr != instruction);
|
||||
PVM_ASSERT(arg_index < MAX_IR_ARGS);
|
||||
|
||||
const value_t* arg = instruction_get_arg(instruction, arg_index);
|
||||
value_t *arg = instruction_get_arg(instruction, arg_index);
|
||||
PVM_ASSERT(nullptr != arg);
|
||||
|
||||
PVM_ASSERT(IR_TYPE_U32 == arg->type);
|
||||
const uint32_t value = value_get_u32(arg);
|
||||
uint32_t value = value_get_u32(arg);
|
||||
return value;
|
||||
}
|
||||
|
||||
const uint8_t
|
||||
instruction_get_arg_u8(const instruction_t *instruction, const size_t arg_index)
|
||||
uint8_t
|
||||
instruction_get_arg_u8 (instruction_t *instruction, const size_t arg_index)
|
||||
{
|
||||
PVM_ASSERT(nullptr != instruction);
|
||||
PVM_ASSERT(arg_index < MAX_IR_ARGS);
|
||||
|
||||
const value_t* arg = instruction_get_arg(instruction, arg_index);
|
||||
value_t *arg = instruction_get_arg(instruction, arg_index);
|
||||
PVM_ASSERT(nullptr != arg);
|
||||
|
||||
PVM_ASSERT(IR_TYPE_U8 == arg->type);
|
||||
const uint8_t value = value_get_u8(arg);
|
||||
uint8_t value = value_get_u8(arg);
|
||||
return value;
|
||||
}
|
||||
|
||||
const bool
|
||||
instruction_get_arg_u1(const instruction_t *instruction, const size_t arg_index)
|
||||
bool
|
||||
instruction_get_arg_u1 (instruction_t *instruction, const size_t arg_index)
|
||||
{
|
||||
PVM_ASSERT(nullptr != instruction);
|
||||
PVM_ASSERT(arg_index < MAX_IR_ARGS);
|
||||
|
||||
const value_t* arg = instruction_get_arg(instruction, arg_index);
|
||||
value_t *arg = instruction_get_arg(instruction, arg_index);
|
||||
PVM_ASSERT(nullptr != arg);
|
||||
|
||||
PVM_ASSERT(IR_TYPE_U1 == arg->type);
|
||||
const uint8_t value = value_get_u1(arg);
|
||||
uint8_t value = value_get_u1(arg);
|
||||
return value;
|
||||
}
|
||||
|
||||
const pound::jit::a32_register_t
|
||||
instruction_get_arg_a32_register(const instruction_t *instruction, const size_t arg_index)
|
||||
pound::jit::a32_register_t
|
||||
instruction_get_arg_a32_register (instruction_t *instruction, const size_t arg_index)
|
||||
{
|
||||
PVM_ASSERT(nullptr != instruction);
|
||||
PVM_ASSERT(arg_index < MAX_IR_ARGS);
|
||||
|
||||
const value_t* arg = instruction_get_arg(instruction, arg_index);
|
||||
value_t *arg = instruction_get_arg(instruction, arg_index);
|
||||
PVM_ASSERT(nullptr != arg);
|
||||
|
||||
PVM_ASSERT(IR_TYPE_A32_REGISTER == arg->type);
|
||||
const pound::jit::a32_register_t value = value_get_a32_register(arg);
|
||||
pound::jit::a32_register_t value = value_get_a32_register(arg);
|
||||
return value;
|
||||
}
|
||||
|
||||
const type_t
|
||||
instruction_get_return_type (const instruction_t *instruction)
|
||||
type_t
|
||||
instruction_get_return_type (instruction_t *instruction)
|
||||
{
|
||||
PVM_ASSERT(nullptr != instruction);
|
||||
PVM_ASSERT(instruction->opcode < NUM_OPCODE);
|
||||
|
||||
const decoded_opcode_t *decoded_opcode = &g_opcodes[instruction->opcode];
|
||||
decoded_opcode_t *decoded_opcode = &g_opcodes[instruction->opcode];
|
||||
PVM_ASSERT(nullptr != decoded_opcode);
|
||||
|
||||
return decoded_opcode->type;
|
||||
}
|
||||
|
||||
const char*
|
||||
instruction_get_opcode_name(const instruction_t *instruction)
|
||||
const char *
|
||||
instruction_get_opcode_name (const instruction_t *instruction)
|
||||
{
|
||||
PVM_ASSERT(nullptr != instruction);
|
||||
|
||||
const decoded_opcode_t *decoded_opcode = &g_opcodes[instruction->opcode];
|
||||
decoded_opcode_t *decoded_opcode = &g_opcodes[instruction->opcode];
|
||||
PVM_ASSERT(nullptr != decoded_opcode);
|
||||
|
||||
const char *name = decoded_opcode->name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue