mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-11 16:36:59 +00:00
temp commit
Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
parent
2e2b5df20c
commit
e2459f5392
3 changed files with 5 additions and 25 deletions
|
|
@ -97,7 +97,6 @@ add_executable(Pound
|
||||||
|
|
||||||
add_subdirectory(3rd_Party)
|
add_subdirectory(3rd_Party)
|
||||||
add_subdirectory(src/common)
|
add_subdirectory(src/common)
|
||||||
add_subdirectory(src/frontend)
|
|
||||||
add_subdirectory(src/host)
|
add_subdirectory(src/host)
|
||||||
add_subdirectory(src/jit)
|
add_subdirectory(src/jit)
|
||||||
add_subdirectory(src/pvm)
|
add_subdirectory(src/pvm)
|
||||||
|
|
@ -110,7 +109,7 @@ add_subdirectory(src/targets/switch1/hardware)
|
||||||
include(TestBigEndian)
|
include(TestBigEndian)
|
||||||
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
|
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
|
||||||
|
|
||||||
list(APPEND POUND_PROJECT_TARGETS common frontend host pvm)
|
list(APPEND POUND_PROJECT_TARGETS common host pvm)
|
||||||
foreach(TARGET ${POUND_PROJECT_TARGETS})
|
foreach(TARGET ${POUND_PROJECT_TARGETS})
|
||||||
# Apply Endianness definitions to all our targets.
|
# Apply Endianness definitions to all our targets.
|
||||||
if(WORDS_BIGENDIAN)
|
if(WORDS_BIGENDIAN)
|
||||||
|
|
@ -149,7 +148,6 @@ set_property(TARGET Pound PROPERTY CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TR
|
||||||
|
|
||||||
target_link_libraries(Pound PRIVATE
|
target_link_libraries(Pound PRIVATE
|
||||||
common
|
common
|
||||||
frontend
|
|
||||||
host
|
host
|
||||||
jit
|
jit
|
||||||
pvm
|
pvm
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include "arm32.h"
|
#include "arm32.h"
|
||||||
#include <string.h>
|
|
||||||
#include "common/passert.h"
|
#include "common/passert.h"
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#define LOG_MODULE "jit"
|
#define LOG_MODULE "jit"
|
||||||
#include "common/logging.h"
|
#include "common/logging.h"
|
||||||
|
|
@ -81,15 +81,10 @@ void arm32_add_instruction(arm32_decoder_t* decoder, const char* name, const cha
|
||||||
}
|
}
|
||||||
|
|
||||||
++decoder->instruction_count;
|
++decoder->instruction_count;
|
||||||
LOG_TRACE("========================================");
|
|
||||||
LOG_TRACE("Instruction Registered: %s", info->name);
|
LOG_TRACE("Instruction Registered: %s", info->name);
|
||||||
LOG_TRACE("Mask: 0x%08X", info->mask);
|
LOG_TRACE("Mask: 0x%08X", info->mask);
|
||||||
LOG_TRACE("Expected: 0x%08X", info->expected);
|
LOG_TRACE("Expected: 0x%08X", info->expected);
|
||||||
LOG_TRACE("Priority: %d", info->priority);
|
LOG_TRACE("Priority: %d", info->priority);
|
||||||
LOG_TRACE("========================================");
|
|
||||||
|
|
||||||
|
|
||||||
/* TODO(GloriousTacoo:jit): Add instruction to lookup table. */
|
|
||||||
}
|
}
|
||||||
void arm32_ADD_imm_handler(arm32_decoder_t* decoder, arm32_instruction_t instruction) {}
|
void arm32_ADD_imm_handler(arm32_decoder_t* decoder, arm32_instruction_t instruction) {}
|
||||||
|
|
||||||
|
|
@ -109,7 +104,7 @@ void arm32_parse_bitstring(const char* bitstring, uint32_t* mask, uint32_t* expe
|
||||||
*mask = 0;
|
*mask = 0;
|
||||||
*expected = 0;
|
*expected = 0;
|
||||||
uint8_t instruction_size_bits = 32;
|
uint8_t instruction_size_bits = 32;
|
||||||
for (int i = 0; (i < instruction_size_bits) && (bitstring[i] != '\0'); ++i)
|
for (unsigned int i = 0; (i < instruction_size_bits) && (bitstring[i] != '\0'); ++i)
|
||||||
{
|
{
|
||||||
uint32_t bit_position = 31 - i;
|
uint32_t bit_position = 31 - i;
|
||||||
switch (bitstring[i])
|
switch (bitstring[i])
|
||||||
|
|
|
||||||
|
|
@ -31,23 +31,10 @@ struct arm32_decoder
|
||||||
arm32_instruction_info_t* instructions;
|
arm32_instruction_info_t* instructions;
|
||||||
size_t instruction_count;
|
size_t instruction_count;
|
||||||
size_t instruction_capacity;
|
size_t instruction_capacity;
|
||||||
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
arm32_instruction_info_t** bucket;
|
|
||||||
size_t count;
|
|
||||||
size_t capacity;
|
|
||||||
} lookup_table[4096]; /* 2^12 entries. */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern arm32_decoder_t g_arm32_decoder;
|
extern arm32_decoder_t g_arm32_decoder;
|
||||||
|
|
||||||
void arm32_init(pound::host::memory::arena_t allocator, arm32_decoder_t* decoder);
|
void arm32_init(pound::host::memory::arena_t allocator, arm32_decoder_t* decoder);
|
||||||
|
}
|
||||||
void arm32_add_instruction(arm32_decoder_t* decoder, const char* name, arm32_opcode_t mask, arm32_opcode_t expected,
|
#endif // POUND_JIT_DECODER_ARM32_H
|
||||||
arm32_handler_fn handler);
|
|
||||||
void arm32_ADD_imm_handler(arm32_decoder_t* decoder, arm32_instruction_t instruction);
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace pound::jit::decoder
|
|
||||||
#endif // POUND_JIT_DECODER_ARM32_H
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue