projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git]
/
src
/
native_client
/
src
/
trusted
/
service_runtime
/
arch
/
x86_32
/
nacl_syscall_32.S
diff --git
a/src/native_client/src/trusted/service_runtime/arch/x86_32/nacl_syscall_32.S
b/src/native_client/src/trusted/service_runtime/arch/x86_32/nacl_syscall_32.S
index
f4a3b6f
..
3af104e
100644
(file)
--- a/
src/native_client/src/trusted/service_runtime/arch/x86_32/nacl_syscall_32.S
+++ b/
src/native_client/src/trusted/service_runtime/arch/x86_32/nacl_syscall_32.S
@@
-46,8
+46,8
@@
* are still using a stack in untrusted memory, and we need to
* figure out the per-thread secure stack first.
*/
* are still using a stack in untrusted memory, and we need to
* figure out the per-thread secure stack first.
*/
-MACRO(syscallseg)
-MACROENTRY
+.macro syscallseg arg1, arg2, arg3, arg4
+DEFINE_GLOBAL_HIDDEN_LOCATION(\arg1):
cld
xor %eax, %eax
movw %gs, %ax
cld
xor %eax, %eax
movw %gs, %ax
@@
-63,10
+63,10
@@
MACROENTRY
* jump into this code.
*/
movl %eax, %edx
* jump into this code.
*/
movl %eax, %edx
- andl
MACROIMMED(7)
, %edx /* extract TI and RPL fields */
- cmpl
MACROIMMED(7)
, %edx /* make sure it's LDT, ring 3 */
+ andl
$7
, %edx /* extract TI and RPL fields */
+ cmpl
$7
, %edx /* make sure it's LDT, ring 3 */
jne 1f
jne 1f
- shr
MACROIMMED(3)
, %eax
+ shr
$3
, %eax
test %eax, %eax /* zero is illegal (and default) */
jz 1f
test %eax, %eax /* zero is illegal (and default) */
jz 1f
@@
-93,7
+93,7
@@
MACROENTRY
fnstcw NACL_THREAD_CONTEXT_OFFSET_FCW(%edx)
fldcw NACL_THREAD_CONTEXT_OFFSET_SYS_FCW(%edx)
fnstcw NACL_THREAD_CONTEXT_OFFSET_FCW(%edx)
fldcw NACL_THREAD_CONTEXT_OFFSET_SYS_FCW(%edx)
-.if
MACROARG
2
+.if
\arg
2
/*
* Save the SSE control word. Then reload the system default
* state to use while running trusted code.
/*
* Save the SSE control word. Then reload the system default
* state to use while running trusted code.
@@
-101,7
+101,7
@@
MACROENTRY
stmxcsr NACL_THREAD_CONTEXT_OFFSET_MXCSR(%edx)
ldmxcsr NACL_THREAD_CONTEXT_OFFSET_SYS_MXCSR(%edx)
.endif
stmxcsr NACL_THREAD_CONTEXT_OFFSET_MXCSR(%edx)
ldmxcsr NACL_THREAD_CONTEXT_OFFSET_SYS_MXCSR(%edx)
.endif
-DEFINE_GLOBAL_HIDDEN_LOCATION(
MACROARG
3): /* NaClSyscallSegRegsSaved */
+DEFINE_GLOBAL_HIDDEN_LOCATION(
\arg
3): /* NaClSyscallSegRegsSaved */
/*
* We do not save segment registers, which untrusted code is
/*
* We do not save segment registers, which untrusted code is
@@
-142,10
+142,10
@@
DEFINE_GLOBAL_HIDDEN_LOCATION(MACROARG3): /* NaClSyscallSegRegsSaved */
* If stack usage in the above code changes, modify initial %esp
* computation -- see nacl_switch_to_app.c:NaClStartThreadInApp.
*/
* If stack usage in the above code changes, modify initial %esp
* computation -- see nacl_switch_to_app.c:NaClStartThreadInApp.
*/
-DEFINE_GLOBAL_HIDDEN_LOCATION(
MACROARG
4): /* NaClSyscallThreadCaptureFault */
+DEFINE_GLOBAL_HIDDEN_LOCATION(
\arg
4): /* NaClSyscallThreadCaptureFault */
1: hlt
/* noret */
1: hlt
/* noret */
-ENDMACRO
+.endm
/*
* Note that long lines are required here because "\" does not
/*
* Note that long lines are required here because "\" does not