From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysxza-0001QB-HQ for qemu-devel@nongnu.org; Thu, 14 May 2015 14:36:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsxzW-0003kn-AI for qemu-devel@nongnu.org; Thu, 14 May 2015 14:36:22 -0400 Received: from mail-qc0-x22c.google.com ([2607:f8b0:400d:c01::22c]:36120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsxzW-0003kb-5J for qemu-devel@nongnu.org; Thu, 14 May 2015 14:36:18 -0400 Received: by qcbgy10 with SMTP id gy10so44368351qcb.3 for ; Thu, 14 May 2015 11:36:17 -0700 (PDT) Sender: Richard Henderson Message-ID: <5554EB1D.9000806@twiddle.net> Date: Thu, 14 May 2015 11:36:13 -0700 From: Richard Henderson MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v1 2/3] target-microblaze: Allow the stack protection to be disabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis , edgar.iglesias@xilinx.com, qemu-devel@nongnu.org Cc: peter.crosthwaite@xilinx.com On 05/13/2015 11:08 PM, Alistair Francis wrote: > void helper_stackprot(CPUMBState *env, uint32_t addr) > { > - if (addr < env->slr || addr > env->shr) { > + MicroBlazeCPU *cpu = mb_env_get_cpu(env); > + > + if (cpu->cfg.stackproc && (addr < env->slr || addr > env->shr)) { This check should be done in translate.c to avoid calling this function in the first place. r~