@@ -897,14 +897,14 @@ int Run(x64emu_t *emu, int step)
897897 break ;
898898 case 0x9A : /* CALL FAR seg:off*/
899899 if (is32bits ) {
900+ uint32_t new_addr = (rex .is32bits && rex .is66 )?(F16 ):(F32 );
900901 uint16_t new_cs = F16 ;
901- uint32_t new_addr = F32 ;
902902 Push32 (emu , emu -> segs [_CS ]);
903903 Push32 (emu , addr );
904904 #ifndef TEST_INTERPRETER
905905 if ((new_cs & 3 )!= 3 ) {
906906 // R_RIP doesn't advance
907- printf_log (LOG_INFO , "Warning, unexpected new_cs=0x%x\n" , new_cs );
907+ printf_log (LOG_INFO , "Warning, unexpected new_cs=0x%x at %p \n" , new_cs , ( void * ) R_RIP );
908908 R_RSP -= (rex .w ?4 :8 )* 2 ;
909909 EmitSignal (emu , X64_SIGSEGV , (void * )R_RIP , 0xbad0 ); // GP if trying to change priv level
910910 goto fini ;
@@ -1671,7 +1671,7 @@ int Run(x64emu_t *emu, int step)
16711671 #ifndef TEST_INTERPRETER
16721672 if ((new_cs & 3 )!= 3 ) {
16731673 // R_RIP doesn't advance
1674- printf_log (LOG_INFO , "Warning, unexpected new_cs=0x%x\n" , new_cs );
1674+ printf_log (LOG_INFO , "Warning, unexpected new_cs=0x%x at %p \n" , new_cs , ( void * ) R_RIP );
16751675 R_RSP -= (rex .w ?4 :8 )* 2 ;
16761676 EmitSignal (emu , X64_SIGSEGV , (void * )R_RIP , 0xbad0 ); // GP if trying to change priv level
16771677 goto fini ;
@@ -1684,7 +1684,7 @@ int Run(x64emu_t *emu, int step)
16841684 uint32_t new_ss = ((!rex .w )?Pop32 (emu ):Pop64 (emu ))& 0xffff ;
16851685 if (!new_ss ) {
16861686 // R_RIP doesn't advance
1687- printf_log (LOG_INFO , "Warning, unexpected new_cs=0x%x\n" , new_cs );
1687+ printf_log (LOG_INFO , "Warning, unexpected new_cs=0x%x at %p \n" , new_cs , ( void * ) R_RIP );
16881688 R_RSP -= (rex .w ?4 :8 )* 5 ;
16891689 EmitSignal (emu , X64_SIGSEGV , (void * )R_RIP , 0xbad0 ); // GPF
16901690 goto fini ;
@@ -2031,12 +2031,12 @@ int Run(x64emu_t *emu, int step)
20312031 break ;
20322032 case 0xEA : /* JMP FAR seg:off*/
20332033 if (is32bits ) {
2034- uint16_t new_cs = F16 ;
20352034 uint32_t new_addr = (rex .is32bits && rex .is66 )?(F16 ):(F32 );
2035+ uint16_t new_cs = F16 ;
20362036 #ifndef TEST_INTERPRETER
20372037 if ((new_cs & 3 )!= 3 ) {
20382038 // R_RIP doesn't advance
2039- printf_log (LOG_INFO , "Warning, unexpected new_cs=0x%x\n" , new_cs );
2039+ printf_log (LOG_INFO , "Warning, unexpected new_cs=0x%x at %p \n" , new_cs , ( void * ) R_RIP );
20402040 R_RSP -= (rex .w ?4 :8 )* 2 ;
20412041 EmitSignal (emu , X64_SIGSEGV , (void * )R_RIP , 0xbad0 ); // GP if trying to change priv level
20422042 goto fini ;
0 commit comments