temp commit

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar 2025-10-19 00:33:42 -04:00
parent 2e2b5df20c
commit e2459f5392
No known key found for this signature in database
GPG key ID: 04307C401999C596
3 changed files with 5 additions and 25 deletions

View file

@ -97,7 +97,6 @@ add_executable(Pound
add_subdirectory(3rd_Party)
add_subdirectory(src/common)
add_subdirectory(src/frontend)
add_subdirectory(src/host)
add_subdirectory(src/jit)
add_subdirectory(src/pvm)
@ -110,7 +109,7 @@ add_subdirectory(src/targets/switch1/hardware)
include(TestBigEndian)
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})
# Apply Endianness definitions to all our targets.
if(WORDS_BIGENDIAN)
@ -149,7 +148,6 @@ set_property(TARGET Pound PROPERTY CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TR
target_link_libraries(Pound PRIVATE
common
frontend
host
jit
pvm

View file

@ -1,6 +1,6 @@
#include "arm32.h"
#include <string.h>
#include "common/passert.h"
#include <string.h>
#define LOG_MODULE "jit"
#include "common/logging.h"
@ -81,15 +81,10 @@ void arm32_add_instruction(arm32_decoder_t* decoder, const char* name, const cha
}
++decoder->instruction_count;
LOG_TRACE("========================================");
LOG_TRACE("Instruction Registered: %s", info->name);
LOG_TRACE("Mask: 0x%08X", info->mask);
LOG_TRACE("Expected: 0x%08X", info->expected);
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) {}
@ -109,7 +104,7 @@ void arm32_parse_bitstring(const char* bitstring, uint32_t* mask, uint32_t* expe
*mask = 0;
*expected = 0;
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;
switch (bitstring[i])

View file

@ -31,23 +31,10 @@ struct arm32_decoder
arm32_instruction_info_t* instructions;
size_t instruction_count;
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;
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,
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