From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51168 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwPD1-0000ZW-VG for qemu-devel@nongnu.org; Sun, 06 Mar 2011 20:26:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwPCr-0000kL-FX for qemu-devel@nongnu.org; Sun, 06 Mar 2011 20:26:03 -0500 Received: from mta-2.ms.rz.rwth-aachen.de ([134.130.7.73]:44714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwPCr-0000jM-7W for qemu-devel@nongnu.org; Sun, 06 Mar 2011 20:25:53 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1 Received: from ironport-out-1.rz.rwth-aachen.de ([134.130.5.40]) by mta-2.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <0LHN00HFYYN2BT30@mta-2.ms.rz.RWTH-Aachen.de> for qemu-devel@nongnu.org; Mon, 07 Mar 2011 02:25:50 +0100 (CET) Received: from [192.168.2.9] ([unknown] [84.44.133.182]) by relay-auth-1.ms.rz.rwth-aachen.de (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 9 2008)) with ESMTPA id <0LHN006APYN29C00@relay-auth-1.ms.rz.rwth-aachen.de> for qemu-devel@nongnu.org; Mon, 07 Mar 2011 02:25:50 +0100 (CET) Message-id: <4D74341D.6040404@rwth-aachen.de> Date: Mon, 07 Mar 2011 02:25:49 +0100 From: "felix.matenaar@rwth-aachen" Subject: [Qemu-devel] limitations of DEF_HELPER List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello *, modifying target-i386/translate.c for calling helper functions when specific arithmetic operations are executed. Example: static void gen_shift(DisasContext *s1, int op, int ot, int d, int s, target_ulong pc_start) { if (s != OR_TMP1) gen_op_mov_TN_reg(ot, 1, s); if(optrace_enabled && userspace(pc_start)) gen_helper_opcode_event(); // custom helper function switch(op) { ... ... } What I noticed is that Qemu segfaults after some calls to these helper functions but as far as I figured out not in my analysis code. So my question is if there are any limitations on how helper functions can be used because I have already hooks in disas_insn which work without any problems. Regards, Felix