From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17107 invoked by alias); 17 Apr 2012 10:49:52 -0000 Received: (qmail 17097 invoked by uid 22791); 17 Apr 2012 10:49:51 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Apr 2012 10:49:38 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SK5yb-0004Nv-Pd from Yao_Qi@mentor.com ; Tue, 17 Apr 2012 03:49:37 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 17 Apr 2012 03:49:00 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Tue, 17 Apr 2012 03:49:36 -0700 Message-ID: <4F8D4AC8.6010402@codesourcery.com> Date: Tue, 17 Apr 2012 11:35:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: "H.J. Lu" CC: "H.J. Lu" , GDB Subject: Re: PATCH: Also check for `movl %esp, %ebp' for x32 References: <20120410202953.GA23862@intel.com> In-Reply-To: <20120410202953.GA23862@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00455.txt.bz2 On 04/11/2012 04:29 AM, H.J. Lu wrote: > - && memcmp (buf, mov_rsp_rbp_2, 3) != 0) > + && memcmp (buf, mov_rsp_rbp_2, 3) != 0 > + && (gdbarch_ptr_bit (gdbarch) == 64 > + || (memcmp (buf, mov_rsp_rbp_1 + 1, 2) != 0 ^^ > + && memcmp (buf, mov_rsp_rbp_2 + 1, 2) != 0))) ^^ I don't understand these two constants "2" here. Does this mean the encoding of `movl %esp, %ebp' is { 0x48, 0x89 } and { 0x48, 0x8b }? If my understand is correct, why don't we define two new array "movl_esp_ebp_1" and "movl_esp_ebp_2"? which is easier to read/understand. -- Yao (齐尧)