mirror of
https://github.com/RKX1209/nsemu.git
synced 2024-06-22 22:22:34 -04:00
Fixed some bugs
This commit is contained in:
parent
3d88811a54
commit
95a8fbf6c6
|
@ -21,7 +21,7 @@ int Interpreter::SingleStep() {
|
|||
void Interpreter::Run() {
|
||||
debug_print ("Running with Interpreter\n");
|
||||
static uint64_t counter = 0;
|
||||
uint64_t estimate = 3500000, mx = 3720;
|
||||
uint64_t estimate = 3500000, mx = 10000;
|
||||
//uint64_t estimate = 0, mx = 100000;
|
||||
while (Cpu::GetState () == Cpu::State::Running) {
|
||||
if (GdbStub::enabled) {
|
||||
|
@ -283,7 +283,7 @@ void IntprCallback::MoviI64(unsigned int reg_idx, uint64_t imm, bool bit64) {
|
|||
void IntprCallback::DepositI64(unsigned int rd_idx, uint64_t imm, unsigned int pos, unsigned int len, bool bit64) {
|
||||
char regc = bit64? 'X': 'W';
|
||||
debug_print ("MOVK: %c[%u] = 0x%lx\n", regc, rd_idx, imm << pos);
|
||||
uint32_t mask = (1 << len) - 1; //XXX: hard coded bit size: 16
|
||||
uint64_t mask = (1ULL << len) - 1;
|
||||
X(rd_idx) = (X(rd_idx) & ~(mask << pos)) | (imm << pos);
|
||||
}
|
||||
|
||||
|
|
1
Cpu.cpp
1
Cpu.cpp
|
@ -8,6 +8,7 @@ FILE *TraceOut;
|
|||
void Init() {
|
||||
ARMv8::Init ();
|
||||
SVC::Init ();
|
||||
// TODO: Thread::Init()
|
||||
}
|
||||
|
||||
void Run() {
|
||||
|
|
3
Ipc.cpp
3
Ipc.cpp
|
@ -91,11 +91,14 @@ std::unordered_map<uint32_t, IpcService *> handles;
|
|||
|
||||
void InitIPC() {
|
||||
sm.Initialize();
|
||||
//handle_id = 0xde00; // XXX: Magic number?
|
||||
handle_id = 0xde01; // XXX: Initial thread should have 0xde00 handle in TLS (See. ThreadManager::create in Mephisito)
|
||||
SERVICE_MAPPING(); // From IpcStubs.hpp
|
||||
}
|
||||
|
||||
uint32_t NewHandle(IpcService *srv) {
|
||||
handles[handle_id] = srv;
|
||||
ns_print("New Handle 0x%x\n",handle_id);
|
||||
return handle_id++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue