Fixing stack args and error typo.
This commit is contained in:
parent
f86f6ee79d
commit
862c322cbc
|
@ -49,28 +49,32 @@ inline uint8_t get_arg_8(PPCContext* ppc_context, uint8_t index) {
|
||||||
if (index <= 7) {
|
if (index <= 7) {
|
||||||
return (uint8_t)ppc_context->r[3 + index];
|
return (uint8_t)ppc_context->r[3 + index];
|
||||||
}
|
}
|
||||||
return SHIM_MEM_8(get_arg_stack_ptr(ppc_context, index - 7));
|
uint32_t stack_address = get_arg_stack_ptr(ppc_context, index - 8);
|
||||||
|
return SHIM_MEM_8(stack_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint16_t get_arg_16(PPCContext* ppc_context, uint8_t index) {
|
inline uint16_t get_arg_16(PPCContext* ppc_context, uint8_t index) {
|
||||||
if (index <= 7) {
|
if (index <= 7) {
|
||||||
return (uint16_t)ppc_context->r[3 + index];
|
return (uint16_t)ppc_context->r[3 + index];
|
||||||
}
|
}
|
||||||
return SHIM_MEM_16(get_arg_stack_ptr(ppc_context, index - 7));
|
uint32_t stack_address = get_arg_stack_ptr(ppc_context, index - 8);
|
||||||
|
return SHIM_MEM_16(stack_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t get_arg_32(PPCContext* ppc_context, uint8_t index) {
|
inline uint32_t get_arg_32(PPCContext* ppc_context, uint8_t index) {
|
||||||
if (index <= 7) {
|
if (index <= 7) {
|
||||||
return (uint32_t)ppc_context->r[3 + index];
|
return (uint32_t)ppc_context->r[3 + index];
|
||||||
}
|
}
|
||||||
return SHIM_MEM_32(get_arg_stack_ptr(ppc_context, index - 7));
|
uint32_t stack_address = get_arg_stack_ptr(ppc_context, index - 8);
|
||||||
|
return SHIM_MEM_32(stack_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint64_t get_arg_64(PPCContext* ppc_context, uint8_t index) {
|
inline uint64_t get_arg_64(PPCContext* ppc_context, uint8_t index) {
|
||||||
if (index <= 7) {
|
if (index <= 7) {
|
||||||
return ppc_context->r[3 + index];
|
return ppc_context->r[3 + index];
|
||||||
}
|
}
|
||||||
return SHIM_MEM_64(get_arg_stack_ptr(ppc_context, index - 7));
|
uint32_t stack_address = get_arg_stack_ptr(ppc_context, index - 8);
|
||||||
|
return SHIM_MEM_64(stack_address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -796,7 +796,7 @@ const error_lookup_table error_tables[] = {
|
||||||
dword_result_t RtlNtStatusToDosError(dword_t source_status) {
|
dword_result_t RtlNtStatusToDosError(dword_t source_status) {
|
||||||
uint32_t status = source_status;
|
uint32_t status = source_status;
|
||||||
if (!status || (status & 0x20000000)) {
|
if (!status || (status & 0x20000000)) {
|
||||||
return status & 0xFFFF;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((status >> 16) == 0x8007) {
|
if ((status >> 16) == 0x8007) {
|
||||||
|
|
Loading…
Reference in New Issue