Mercurial > hg > graal-compiler
comparison src/os/windows/vm/os_windows.cpp @ 21559:be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 28 May 2015 15:36:48 +0200 |
parents | 7848fc12602b |
children | c28cb37b2e1d |
comparison
equal
deleted
inserted
replaced
21558:d563baeca9df | 21559:be896a1983c0 |
---|---|
2251 #ifdef _M_IA64 | 2251 #ifdef _M_IA64 |
2252 assert(0, "Fix Handle_IDiv_Exception"); | 2252 assert(0, "Fix Handle_IDiv_Exception"); |
2253 #elif _M_AMD64 | 2253 #elif _M_AMD64 |
2254 PCONTEXT ctx = exceptionInfo->ContextRecord; | 2254 PCONTEXT ctx = exceptionInfo->ContextRecord; |
2255 address pc = (address)ctx->Rip; | 2255 address pc = (address)ctx->Rip; |
2256 #ifdef GRAAL | 2256 #ifdef JVMCI |
2257 assert(pc[0] >= Assembler::REX && pc[0] <= Assembler::REX_WRXB && pc[1] == 0xF7 || pc[0] == 0xF7, "not an idiv opcode"); | 2257 assert(pc[0] >= Assembler::REX && pc[0] <= Assembler::REX_WRXB && pc[1] == 0xF7 || pc[0] == 0xF7, "not an idiv opcode"); |
2258 if (pc[0] == 0xF7) { | 2258 if (pc[0] == 0xF7) { |
2259 // set correct result values and continue after idiv instruction | 2259 // set correct result values and continue after idiv instruction |
2260 ctx->Rip = (DWORD64)pc + 2; // idiv reg, reg is 2 bytes | 2260 ctx->Rip = (DWORD64)pc + 2; // idiv reg, reg is 2 bytes |
2261 } else { | 2261 } else { |
2269 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); | 2269 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); |
2270 assert(ctx->Rax == min_jint, "unexpected idiv exception"); | 2270 assert(ctx->Rax == min_jint, "unexpected idiv exception"); |
2271 // set correct result values and continue after idiv instruction | 2271 // set correct result values and continue after idiv instruction |
2272 ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes | 2272 ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes |
2273 ctx->Rax = (DWORD)min_jint; // result | 2273 ctx->Rax = (DWORD)min_jint; // result |
2274 #endif // GRAAL | 2274 #endif // JVMCI |
2275 ctx->Rdx = (DWORD)0; // remainder | 2275 ctx->Rdx = (DWORD)0; // remainder |
2276 // Continue the execution | 2276 // Continue the execution |
2277 #else | 2277 #else |
2278 PCONTEXT ctx = exceptionInfo->ContextRecord; | 2278 PCONTEXT ctx = exceptionInfo->ContextRecord; |
2279 address pc = (address)ctx->Eip; | 2279 address pc = (address)ctx->Eip; |