2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
7 #include "native_client/src/trusted/service_runtime/nacl_config.h"
12 * This entry point is used on Mac OS X for resuming a
13 * suspended thread with registers modified, because OS X's
14 * thread_set_state() ignores non-trusted-code segment
17 * This point will be entered with most registers restored via
18 * thread_set_state(): we want to minimize the number of
19 * instructions executed before reaching untrusted code
20 * because, if the trap flag is set, the exception handler
21 * will have to single-step through them.
23 DEFINE_GLOBAL_HIDDEN_FUNCTION(NaClSwitchRemainingRegsViaECX):
24 /* Restore segment registers to values for untrusted code. */
29 /* Jump to springboard, restoring %cs. */
31 DEFINE_GLOBAL_HIDDEN_LOCATION(NaClSwitchRemainingRegsAsmEnd):