Index: vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp =================================================================== --- vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp (revision 588653) +++ vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp (working copy) @@ -137,7 +137,7 @@ return addr; } - const int stub_size = 160; + const int stub_size = 192; char *stub = (char *)malloc_fixed_code_for_jit(stub_size, DEFAULT_CODE_ALIGNMENT, CODE_BLOCK_HEAT_MAX/2, CAA_Allocate); #ifdef _DEBUG memset(stub, 0xcc /*int 3*/, stub_size); @@ -170,7 +170,7 @@ return addr; } - const int stub_size = 176; + const int stub_size = 208; char *stub = (char *)malloc_fixed_code_for_jit(stub_size, DEFAULT_CODE_ALIGNMENT, CODE_BLOCK_HEAT_MAX/2, CAA_Allocate); #ifdef _DEBUG memset(stub, 0xcc /*int 3*/, stub_size); @@ -248,7 +248,7 @@ return addr; } - const int stub_size = 112; + const int stub_size = 144; char *stub = (char *)malloc_fixed_code_for_jit(stub_size, DEFAULT_CODE_ALIGNMENT, CODE_BLOCK_HEAT_MAX/2, CAA_Allocate); char *ss = stub; @@ -281,7 +281,7 @@ return addr; } - const int stub_size = 112; + const int stub_size = 144; char *stub = (char *)malloc_fixed_code_for_jit(stub_size, DEFAULT_CODE_ALIGNMENT, CODE_BLOCK_HEAT_MAX/2, CAA_Allocate); char *ss = stub; Index: vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp =================================================================== --- vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp (revision 588653) +++ vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp (working copy) @@ -142,7 +142,7 @@ char *stub = (char *)code_addr; #ifdef _DEBUG - const int stub_size = 86; + const int stub_size = 118; memset(stub, 0xcc, stub_size); #endif char *ss = stub; @@ -162,7 +162,7 @@ char *stub = (char *)code_addr; #ifdef _DEBUG - const int stub_size = 107; + const int stub_size = 144; memset(stub, 0xcc, stub_size); #endif char *ss = stub; @@ -235,7 +235,7 @@ char *stub = (char *)code_addr; #ifdef _DEBUG - const int stub_size = /*106*/210; + const int stub_size = 256; memset(stub, 0xcc, stub_size); #endif char *ss = stub; @@ -255,7 +255,7 @@ char *stub = (char *)code_addr; #ifdef _DEBUG - const int stub_size = /*106*/210; + const int stub_size = 256; memset(stub, 0xcc, stub_size); #endif char *ss = stub; @@ -279,7 +279,7 @@ return addr; } - const int stub_size = 226; + const int stub_size = 272; char *stub = (char *)malloc_fixed_code_for_jit(stub_size, DEFAULT_CODE_ALIGNMENT, CODE_BLOCK_HEAT_MAX/2, CAA_Allocate); #ifdef _DEBUG memset(stub, 0xcc /*int 3*/, stub_size); @@ -314,7 +314,7 @@ return addr; } - const int stub_size = 250; + const int stub_size = 288; char *stub = (char *)malloc_fixed_code_for_jit(stub_size, DEFAULT_CODE_ALIGNMENT, CODE_BLOCK_HEAT_MAX/2, CAA_Allocate); #ifdef _DEBUG memset(stub, 0xcc /*int 3*/, stub_size); @@ -353,7 +353,7 @@ return addr; } - const int stub_size = /*126*/210; + const int stub_size = 256; char *stub = (char *)malloc_fixed_code_for_jit(stub_size, DEFAULT_CODE_ALIGNMENT, CODE_BLOCK_HEAT_MAX/2, CAA_Allocate); char *ss = stub; @@ -386,7 +386,7 @@ return addr; } - const int stub_size = /*126*/210; + const int stub_size = 256; char *stub = (char *)malloc_fixed_code_for_jit(stub_size, DEFAULT_CODE_ALIGNMENT, CODE_BLOCK_HEAT_MAX/2, CAA_Allocate); char *ss = stub; Index: vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp =================================================================== --- vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp (revision 588653) +++ vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp (working copy) @@ -512,12 +512,22 @@ ip = nopInst->emit(ip); // the last two ip = (uint8*)EncoderBase::nops((char*)ip,2); - } #ifdef _EM64T_ // these nops are required for call transformation from immediate into register form // nops for MOV r11, callTarget (when !fit32(call_offset) ) ip = (uint8*)EncoderBase::nops((char*)ip, 10); #endif + } else { +#ifdef _EM64T_ + Inst* nopInst = irManager->newInst(Mnemonic_NOP); + bb->prependInst(nopInst,inst); + nopInst->setCodeOffset( (uint32)(ip-blockStartIp) ); + ip = nopInst->emit(ip); + // these nops are required for call transformation from immediate into register form + // nops for MOV r11, callTarget (when !fit32(call_offset) ) + ip = (uint8*)EncoderBase::nops((char*)ip, 9); + } +#endif } uint8 * instStartIp = ip;