Mercurial > hg > truffle
comparison src/os/windows/vm/os_windows.cpp @ 3676:285d51520d4c
Relaxed div/rem code assertions, jtt passes with debug vm.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 21 Nov 2011 14:23:14 +0100 |
parents | 3a05d8465ff1 |
children | 04b9a2566eec |
comparison
equal
deleted
inserted
replaced
3675:3a05d8465ff1 | 3676:285d51520d4c |
---|---|
2072 assert(0, "Fix Handle_IDiv_Exception"); | 2072 assert(0, "Fix Handle_IDiv_Exception"); |
2073 #elif _M_AMD64 | 2073 #elif _M_AMD64 |
2074 PCONTEXT ctx = exceptionInfo->ContextRecord; | 2074 PCONTEXT ctx = exceptionInfo->ContextRecord; |
2075 address pc = (address)ctx->Rip; | 2075 address pc = (address)ctx->Rip; |
2076 NOT_PRODUCT(Events::log("idiv overflow exception at " INTPTR_FORMAT , pc)); | 2076 NOT_PRODUCT(Events::log("idiv overflow exception at " INTPTR_FORMAT , pc)); |
2077 assert(pc[0] == 0xF7 || (pc[1] == 0xF7 && pc[0] == 0x41), "not an idiv opcode"); | 2077 assert(pc[0] == 0xF7 || (pc[1] == 0xF7 && (pc[0] == 0x41 || pc[0] == 0x49)), "not an idiv opcode"); |
2078 //assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); | 2078 //assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); |
2079 assert((long)ctx->Rax == (long)min_jint, "unexpected idiv exception"); | 2079 assert((long)ctx->Rax == (long)min_jint || pc[0] == 0x49, "unexpected idiv exception"); |
2080 // set correct result values and continue after idiv instruction | 2080 // set correct result values and continue after idiv instruction |
2081 ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes | 2081 ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes |
2082 ctx->Rax = (DWORD)min_jint; // result | 2082 ctx->Rax = (DWORD)min_jint; // result |
2083 ctx->Rdx = (DWORD)0; // remainder | 2083 ctx->Rdx = (DWORD)0; // remainder |
2084 // Continue the execution | 2084 // Continue the execution |