OSDN Git Service

* Bug Temporary Fix
authorKoine Yuusuke(koinec) <koinec@users.osdn.me>
Thu, 30 Jan 2020 23:12:45 +0000 (08:12 +0900)
committerKoine Yuusuke(koinec) <koinec@users.osdn.me>
Thu, 30 Jan 2020 23:12:45 +0000 (08:12 +0900)
libintel64asm/drd64_intel64_asm.c

index 8c54a75..bcce8fe 100644 (file)
@@ -1219,13 +1219,18 @@ int
        }
 
        /* [RIP + disp] Support Code */
-       if( ((Word)p_temp[0]->w_typeid) == OPTYPE_REG_RIP )     {
-               p_analyze->modrm.modrm.mod      = 0x00;
-               p_analyze->modrm.modrm.rm       = 0x05;
+       if( NULL != p_temp[0] ) {
+               if( ((Word)p_temp[0]->w_typeid) == OPTYPE_REG_RIP )     {
+                       p_analyze->modrm.modrm.mod      = 0x00;
+                       p_analyze->modrm.modrm.rm       = 0x05;
 
-               p_analyze->v_disp.i_bytes       = 4;
+                       p_analyze->v_disp.i_bytes       = 4;
+
+                       goto    goto_Drd64_Intel64_SetAnalyzePacket_OperandMemory_post;
+               }
        }
-       else    {
+       // 2020/01/31 - Temporary fix. VVVV
+       //else  {
                /* Support [?SP + disp?] => SiB = 1Bytes */
                if( NULL != p_base )    {
                        if( isRegType( p_base->w_typeid, OPTYPE_BASE_REG_GENERIC ))     {
@@ -1297,8 +1302,9 @@ int
                                p_analyze->rex.rex.b            = (w_temp & 0x0008) >> 3;
                        }
                }
-       }
+       //}
 
+goto_Drd64_Intel64_SetAnalyzePacket_OperandMemory_post:
        /* Debug Print */
        Drd64_Intel64_Debug_Asm_PrintMemoryOperand(
                                                p_index, p_scale, p_base, p_disp);