mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 16:20:05 +00:00
Set fpscr for new threads
This commit is contained in:
parent
18b517e236
commit
af37dd0d52
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/arm/skyeye_common/arm_regformat.h"
|
#include "core/arm/skyeye_common/arm_regformat.h"
|
||||||
|
#include "core/arm/skyeye_common/vfp/asm_vfp.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
struct ThreadContext;
|
struct ThreadContext;
|
||||||
|
@ -526,6 +526,8 @@ SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority) {
|
|||||||
|
|
||||||
SharedPtr<Thread> thread = thread_res.MoveFrom();
|
SharedPtr<Thread> thread = thread_res.MoveFrom();
|
||||||
|
|
||||||
|
thread->context.fpscr = FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO | FPSCR_IXC; // 0x03C00010
|
||||||
|
|
||||||
// Run new "main" thread
|
// Run new "main" thread
|
||||||
SwitchContext(thread.get());
|
SwitchContext(thread.get());
|
||||||
|
|
||||||
|
@ -502,6 +502,9 @@ static ResultCode CreateThread(Handle* out_handle, s32 priority, u32 entry_point
|
|||||||
|
|
||||||
CASCADE_RESULT(SharedPtr<Thread> thread, Kernel::Thread::Create(
|
CASCADE_RESULT(SharedPtr<Thread> thread, Kernel::Thread::Create(
|
||||||
name, entry_point, priority, arg, processor_id, stack_top));
|
name, entry_point, priority, arg, processor_id, stack_top));
|
||||||
|
|
||||||
|
thread->context.fpscr = FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO; // 0x03C00000
|
||||||
|
|
||||||
CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(thread)));
|
CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(thread)));
|
||||||
|
|
||||||
LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
|
LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
|
||||||
|
Loading…
Reference in New Issue
Block a user