Mercurial > hg > graal-compiler
comparison src/os/windows/vm/os_windows.cpp @ 4875:379b22e03c32
Merge
author | jcoomes |
---|---|
date | Fri, 03 Feb 2012 12:08:55 -0800 |
parents | de268c8a8075 aa3d708d67c4 |
children | 33df1aeaebbf da4be62fb889 |
comparison
equal
deleted
inserted
replaced
4866:527cf36f4a20 | 4875:379b22e03c32 |
---|---|
2086 #ifdef _M_IA64 | 2086 #ifdef _M_IA64 |
2087 assert(0, "Fix Handle_IDiv_Exception"); | 2087 assert(0, "Fix Handle_IDiv_Exception"); |
2088 #elif _M_AMD64 | 2088 #elif _M_AMD64 |
2089 PCONTEXT ctx = exceptionInfo->ContextRecord; | 2089 PCONTEXT ctx = exceptionInfo->ContextRecord; |
2090 address pc = (address)ctx->Rip; | 2090 address pc = (address)ctx->Rip; |
2091 NOT_PRODUCT(Events::log("idiv overflow exception at " INTPTR_FORMAT , pc)); | |
2092 assert(pc[0] == 0xF7, "not an idiv opcode"); | 2091 assert(pc[0] == 0xF7, "not an idiv opcode"); |
2093 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); | 2092 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); |
2094 assert(ctx->Rax == min_jint, "unexpected idiv exception"); | 2093 assert(ctx->Rax == min_jint, "unexpected idiv exception"); |
2095 // set correct result values and continue after idiv instruction | 2094 // set correct result values and continue after idiv instruction |
2096 ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes | 2095 ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes |
2098 ctx->Rdx = (DWORD)0; // remainder | 2097 ctx->Rdx = (DWORD)0; // remainder |
2099 // Continue the execution | 2098 // Continue the execution |
2100 #else | 2099 #else |
2101 PCONTEXT ctx = exceptionInfo->ContextRecord; | 2100 PCONTEXT ctx = exceptionInfo->ContextRecord; |
2102 address pc = (address)ctx->Eip; | 2101 address pc = (address)ctx->Eip; |
2103 NOT_PRODUCT(Events::log("idiv overflow exception at " INTPTR_FORMAT , pc)); | |
2104 assert(pc[0] == 0xF7, "not an idiv opcode"); | 2102 assert(pc[0] == 0xF7, "not an idiv opcode"); |
2105 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); | 2103 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); |
2106 assert(ctx->Eax == min_jint, "unexpected idiv exception"); | 2104 assert(ctx->Eax == min_jint, "unexpected idiv exception"); |
2107 // set correct result values and continue after idiv instruction | 2105 // set correct result values and continue after idiv instruction |
2108 ctx->Eip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes | 2106 ctx->Eip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes |
5334 _OpenProcessToken != NULL && | 5332 _OpenProcessToken != NULL && |
5335 _LookupPrivilegeValue != NULL; | 5333 _LookupPrivilegeValue != NULL; |
5336 } | 5334 } |
5337 | 5335 |
5338 #endif | 5336 #endif |
5339 |