Skip to content

Commit

Permalink
Removed unused float state code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kstenerud committed Dec 2, 2016
1 parent 82eca78 commit 2e683a2
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 58 deletions.
16 changes: 0 additions & 16 deletions Source/KSCrash-Tests/KSCPU_Tests.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,6 @@ - (void) testThreadState
[thread cancel];
}

- (void) testFloatState
{
TestThread* thread = [[TestThread alloc] init];
[thread start];
[NSThread sleepForTimeInterval:0.1];
kern_return_t kr;
kr = thread_suspend(thread.thread);
XCTAssertTrue(kr == KERN_SUCCESS, @"");

_STRUCT_MCONTEXT machineContext;
bool success = kscpu_floatState(thread.thread, &machineContext);
XCTAssertTrue(success, @"");
thread_resume(thread.thread);
[thread cancel];
}

- (void) testExceptionState
{
TestThread* thread = [[TestThread alloc] init];
Expand Down
10 changes: 0 additions & 10 deletions Source/KSCrash/Recording/Tools/KSCPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@ uintptr_t kscpu_faultAddress(const STRUCT_MCONTEXT_L* machineContext);
*/
bool kscpu_threadState(thread_t thread, STRUCT_MCONTEXT_L* machineContext);

/** Get a thread's floating point state and place it in a machine context.
*
* @param thread The thread to fetch state for.
*
* @param machineContext The machine context to store the state in.
*
* @return true if successful.
*/
bool kscpu_floatState(thread_t thread, STRUCT_MCONTEXT_L* machineContext);

/** Get a thread's exception state and place it in a machine context.
*
* @param thread The thread to fetch state for.
Expand Down
8 changes: 0 additions & 8 deletions Source/KSCrash/Recording/Tools/KSCPU_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ bool kscpu_threadState(const thread_t thread, STRUCT_MCONTEXT_L* const machineCo
ARM_THREAD_STATE_COUNT);
}

bool kscpu_floatState(const thread_t thread, STRUCT_MCONTEXT_L* const machineContext)
{
return kscpu_i_fillState(thread,
(thread_state_t)&machineContext->__fs,
ARM_VFP_STATE,
ARM_VFP_STATE_COUNT);
}

bool kscpu_exceptionState(const thread_t thread, STRUCT_MCONTEXT_L* const machineContext)
{
return kscpu_i_fillState(thread,
Expand Down
8 changes: 0 additions & 8 deletions Source/KSCrash/Recording/Tools/KSCPU_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ bool kscpu_threadState(const thread_t thread, STRUCT_MCONTEXT_L* const machineCo
ARM_THREAD_STATE64_COUNT);
}

bool kscpu_floatState(const thread_t thread, STRUCT_MCONTEXT_L* const machineContext)
{
return kscpu_i_fillState(thread,
(thread_state_t)&machineContext->__ns,
ARM_VFP_STATE,
ARM_VFP_STATE_COUNT);
}

bool kscpu_exceptionState(const thread_t thread, STRUCT_MCONTEXT_L* const machineContext)
{
return kscpu_i_fillState(thread,
Expand Down
8 changes: 0 additions & 8 deletions Source/KSCrash/Recording/Tools/KSCPU_x86_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,6 @@ bool kscpu_threadState(const thread_t thread, STRUCT_MCONTEXT_L* const machineCo
x86_THREAD_STATE32_COUNT);
}

bool kscpu_floatState(const thread_t thread, STRUCT_MCONTEXT_L* const machineContext)
{
return kscpu_i_fillState(thread,
(thread_state_t)&machineContext->__fs,
x86_FLOAT_STATE32,
x86_FLOAT_STATE32_COUNT);
}

bool kscpu_exceptionState(const thread_t thread, STRUCT_MCONTEXT_L* const machineContext)
{
return kscpu_i_fillState(thread,
Expand Down
8 changes: 0 additions & 8 deletions Source/KSCrash/Recording/Tools/KSCPU_x86_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@ bool kscpu_threadState(const thread_t thread, STRUCT_MCONTEXT_L* const machineCo
x86_THREAD_STATE64_COUNT);
}

bool kscpu_floatState(const thread_t thread, STRUCT_MCONTEXT_L* const machineContext)
{
return kscpu_i_fillState(thread,
(thread_state_t)&machineContext->__fs,
x86_FLOAT_STATE64,
x86_FLOAT_STATE64_COUNT);
}

bool kscpu_exceptionState(const thread_t thread, STRUCT_MCONTEXT_L* const machineContext)
{
return kscpu_i_fillState(thread,
Expand Down

0 comments on commit 2e683a2

Please sign in to comment.