comparison src/os_cpu/bsd_x86/vm/bsd_x86_32.s @ 11127:980532a806a5

8016697: Use stubs to implement safefetch Summary: Implement Safefetch as stub routines. This reduces compiler and os dependencies. Reviewed-by: twisti, kvn
author goetz
date Thu, 20 Jun 2013 15:02:05 +0200
parents 436b4a3231bf
children de6a9e811145
comparison
equal deleted inserted replaced
11088:ea4d24c1e0c6 11127:980532a806a5
60 SYMBOL(fixcw): 60 SYMBOL(fixcw):
61 pushl $0x27f 61 pushl $0x27f
62 fldcw 0(%esp) 62 fldcw 0(%esp)
63 popl %eax 63 popl %eax
64 ret 64 ret
65
66 .globl SYMBOL(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume)
67 .globl SYMBOL(SafeFetchN)
68 ## TODO: avoid exposing Fetch32PFI and Fetch32Resume.
69 ## Instead, the signal handler would call a new SafeFetchTriage(FaultingEIP)
70 ## routine to vet the address. If the address is the faulting LD then
71 ## SafeFetchTriage() would return the resume-at EIP, otherwise null.
72 ELF_TYPE(SafeFetch32,@function)
73 .p2align 4,,15
74 SYMBOL(SafeFetch32):
75 SYMBOL(SafeFetchN):
76 movl 0x8(%esp), %eax
77 movl 0x4(%esp), %ecx
78 SYMBOL(Fetch32PFI):
79 movl (%ecx), %eax
80 SYMBOL(Fetch32Resume):
81 ret
82
83 65
84 .globl SYMBOL(SpinPause) 66 .globl SYMBOL(SpinPause)
85 ELF_TYPE(SpinPause,@function) 67 ELF_TYPE(SpinPause,@function)
86 .p2align 4,,15 68 .p2align 4,,15
87 SYMBOL(SpinPause): 69 SYMBOL(SpinPause):