comparison src/os/windows/vm/os_windows.cpp @ 4979:18a5539bf19b

More diff vs hsx24 optimizations.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 27 Feb 2012 21:43:51 +0100
parents 33df1aeaebbf
children 957c266d8bc5
comparison
equal deleted inserted replaced
4978:99d3d8a72252 4979:18a5539bf19b
405 if (lgrp_id != -1) { 405 if (lgrp_id != -1) {
406 thread->set_lgrp_id(lgrp_id); 406 thread->set_lgrp_id(lgrp_id);
407 } 407 }
408 } 408 }
409 409
410
410 if (UseVectoredExceptions) { 411 if (UseVectoredExceptions) {
411 // If we are using vectored exception we don't need to set a SEH 412 // If we are using vectored exception we don't need to set a SEH
412 thread->run(); 413 thread->run();
413 } 414 }
414 else { 415 else {
2085 #ifdef _M_IA64 2086 #ifdef _M_IA64
2086 assert(0, "Fix Handle_IDiv_Exception"); 2087 assert(0, "Fix Handle_IDiv_Exception");
2087 #elif _M_AMD64 2088 #elif _M_AMD64
2088 PCONTEXT ctx = exceptionInfo->ContextRecord; 2089 PCONTEXT ctx = exceptionInfo->ContextRecord;
2089 address pc = (address)ctx->Rip; 2090 address pc = (address)ctx->Rip;
2090 //assert(pc[0] == 0xF7 || (pc[1] == 0xF7 && (pc[0] == 0x41 || pc[0] == 0x49)), "not an idiv opcode"); 2091 #ifndef GRAAL
2091 //assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); 2092 assert(pc[0] == 0xF7, "not an idiv opcode");
2092 //assert((long)ctx->Rax == (long)min_jint || pc[0] == 0x49, "unexpected idiv exception"); 2093 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands");
2094 assert(ctx->Rax == min_jint, "unexpected idiv exception");
2095 #endif
2093 // set correct result values and continue after idiv instruction 2096 // set correct result values and continue after idiv instruction
2094 ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes 2097 ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes
2095 ctx->Rax = (DWORD)min_jint; // result 2098 ctx->Rax = (DWORD)min_jint; // result
2096 ctx->Rdx = (DWORD)0; // remainder 2099 ctx->Rdx = (DWORD)0; // remainder
2097 // Continue the execution 2100 // Continue the execution