< prev index next >

src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp

Print this page
rev 52189 : [mq]: tinit


 195   punwind->FrameRegister = 0;
 196   punwind->FrameOffset = 0;
 197   punwind->ExceptionHandler = (char *)(&(pDCD->ExceptionHandlerInstr[0])) -
 198                               (char*)low;
 199   punwind->ExceptionData[0] = 0;
 200 
 201   // This structure describes the covered dynamic code area.
 202   // Addresses are relative to the beginning on the code cache area
 203   prt = &pDCD->rt;
 204   prt->BeginAddress = 0;
 205   prt->EndAddress = (ULONG)(high - low);
 206   prt->UnwindData = ((char *)punwind - low);
 207 
 208   guarantee(RtlAddFunctionTable(prt, 1, (ULONGLONG)low),
 209             "Failed to register Dynamic Code Exception Handler with RtlAddFunctionTable");
 210 
 211 #endif // AMD64
 212   return true;
 213 }
 214 
 215 void os::initialize_thread(Thread* thr) {
 216 // Nothing to do.
 217 }
 218 
 219 // Atomics and Stub Functions
 220 
 221 typedef int32_t   xchg_func_t            (int32_t,  volatile int32_t*);
 222 typedef int64_t   xchg_long_func_t       (int64_t,  volatile int64_t*);
 223 typedef int32_t   cmpxchg_func_t         (int32_t,  volatile int32_t*, int32_t);
 224 typedef int8_t    cmpxchg_byte_func_t    (int8_t,   volatile int8_t*,  int8_t);
 225 typedef int64_t   cmpxchg_long_func_t    (int64_t,  volatile int64_t*, int64_t);
 226 typedef int32_t   add_func_t             (int32_t,  volatile int32_t*);
 227 typedef int64_t   add_long_func_t        (int64_t,  volatile int64_t*);
 228 
 229 #ifdef AMD64
 230 
 231 int32_t os::atomic_xchg_bootstrap(int32_t exchange_value, volatile int32_t* dest) {
 232   // try to use the stub:
 233   xchg_func_t* func = CAST_TO_FN_PTR(xchg_func_t*, StubRoutines::atomic_xchg_entry());
 234 
 235   if (func != NULL) {
 236     os::atomic_xchg_func = func;
 237     return (*func)(exchange_value, dest);
 238   }




 195   punwind->FrameRegister = 0;
 196   punwind->FrameOffset = 0;
 197   punwind->ExceptionHandler = (char *)(&(pDCD->ExceptionHandlerInstr[0])) -
 198                               (char*)low;
 199   punwind->ExceptionData[0] = 0;
 200 
 201   // This structure describes the covered dynamic code area.
 202   // Addresses are relative to the beginning on the code cache area
 203   prt = &pDCD->rt;
 204   prt->BeginAddress = 0;
 205   prt->EndAddress = (ULONG)(high - low);
 206   prt->UnwindData = ((char *)punwind - low);
 207 
 208   guarantee(RtlAddFunctionTable(prt, 1, (ULONGLONG)low),
 209             "Failed to register Dynamic Code Exception Handler with RtlAddFunctionTable");
 210 
 211 #endif // AMD64
 212   return true;
 213 }
 214 




 215 // Atomics and Stub Functions
 216 
 217 typedef int32_t   xchg_func_t            (int32_t,  volatile int32_t*);
 218 typedef int64_t   xchg_long_func_t       (int64_t,  volatile int64_t*);
 219 typedef int32_t   cmpxchg_func_t         (int32_t,  volatile int32_t*, int32_t);
 220 typedef int8_t    cmpxchg_byte_func_t    (int8_t,   volatile int8_t*,  int8_t);
 221 typedef int64_t   cmpxchg_long_func_t    (int64_t,  volatile int64_t*, int64_t);
 222 typedef int32_t   add_func_t             (int32_t,  volatile int32_t*);
 223 typedef int64_t   add_long_func_t        (int64_t,  volatile int64_t*);
 224 
 225 #ifdef AMD64
 226 
 227 int32_t os::atomic_xchg_bootstrap(int32_t exchange_value, volatile int32_t* dest) {
 228   // try to use the stub:
 229   xchg_func_t* func = CAST_TO_FN_PTR(xchg_func_t*, StubRoutines::atomic_xchg_entry());
 230 
 231   if (func != NULL) {
 232     os::atomic_xchg_func = func;
 233     return (*func)(exchange_value, dest);
 234   }


< prev index next >