Message ID | 20180529105011.1914-29-edgar.iglesias@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="F6NM1L+G"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40wBBX26wMz9s0W for <incoming@patchwork.ozlabs.org>; Tue, 29 May 2018 21:21:40 +1000 (AEST) Received: from localhost ([::1]:60265 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1fNch7-0007nL-UC for incoming@patchwork.ozlabs.org; Tue, 29 May 2018 07:21:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <edgar.iglesias@gmail.com>) id 1fNcDY-0001o2-RO for qemu-devel@nongnu.org; Tue, 29 May 2018 06:51:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <edgar.iglesias@gmail.com>) id 1fNcDV-0004Es-G8 for qemu-devel@nongnu.org; Tue, 29 May 2018 06:51:04 -0400 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]:38301) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <edgar.iglesias@gmail.com>) id 1fNcDV-0004EB-9S for qemu-devel@nongnu.org; Tue, 29 May 2018 06:51:01 -0400 Received: by mail-wr0-x22a.google.com with SMTP id 94-v6so24688382wrf.5 for <qemu-devel@nongnu.org>; Tue, 29 May 2018 03:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GRZeGHi0CRackZwvVvAMSL4+7UTu1CRrGMTnG6O9D4c=; b=F6NM1L+GqXAMArkRRw+idQV5IQbx+8e0Q5gpTNWpo6u7bJOBGgexzg5IHVW4XW+AFW 8JeRkmRYqz46/vxct2jyXanbmBMk+gvHqOEAkKbvNxgAJ0X6RRZYCFExwY0FYoz100JE QOeBgZ82moZFPPZRsFUlh15BFnn0hJNtBVjlua31W5CGP6Uv6NsJzFnX+HpT3NPLvxeR jd4wF8BKaL92wpzN/MdQznR+OzIK0u7QHReL+gqaExXMVoOtAwSjwk4U+mjlTLIgEjCI RcbByoMGgApC1NXYWiQq+NXSD23njhu29/m8jRTvMAyJafaAuemg19YDXjS+hJUrqRkz AQXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GRZeGHi0CRackZwvVvAMSL4+7UTu1CRrGMTnG6O9D4c=; b=bOIpXSSpKa3ATS9qDG0sZHdbl/hTJwGRTuOWXuXu4KuPfFZgkV8JFD0GXhYK/VN4CV JHLtpkZKHqArt1ZDTFngDF6Rmlj3ua7ZOCYWtejh2B3uadjZUWn0w7OUTS2mMX6VuNLB ENQVPUTgvYcbbl791nRA43JTqUJNt2CFCsfV9LAMuyhK4n1YrnXvoT0A5m32mqoJYweV H/eK2fvJrfD8qi7AVkBSSCwhkU0NDvyAvG2TM8Up6s0KtfOua6AhA8O5+V43dj4Sji4F eh3YumuQuSlcLSEUdLjyXJHnsDHnche4l5ioVpgpN2Qt2O6h3QlKFtVis+MVunylvv0X 1YOQ== X-Gm-Message-State: ALKqPwc+zrtpahwiqYDXagqYs1YQb7JarB08/HGnMKBkfCG/8vNhZhrE zw4tAKdwPK03G+TaC38cHGagwA== X-Google-Smtp-Source: ADUXVKIddtcnmGCxl1yi0EcSF/rABJVrWY+Bl35mvzLIjF/u9U3nj1XtM65seuKF66HN7TaHimA1RQ== X-Received: by 2002:a19:5004:: with SMTP id e4-v6mr9017010lfb.78.1527591059886; Tue, 29 May 2018 03:50:59 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id n3-v6sm6375578ljg.16.2018.05.29.03.50.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:50:58 -0700 (PDT) From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:50:01 +0200 Message-Id: <20180529105011.1914-29-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180529105011.1914-1-edgar.iglesias@gmail.com> References: <20180529105011.1914-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22a Subject: [Qemu-devel] [PULL v1 28/38] target-microblaze: dec_msr: Plug a temp leak X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
Xilinx queue
|
expand
|
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 7475003847..756d901eba 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -516,12 +516,17 @@ static void dec_msr(DisasContext *dc) #if !defined(CONFIG_USER_ONLY) /* Catch read/writes to the mmu block. */ if ((sr & ~0xff) == 0x1000) { + TCGv_i32 tmp_sr; + sr &= 7; + tmp_sr = tcg_const_i32(sr); LOG_DIS("m%ss sr%d r%d imm=%x\n", to ? "t" : "f", sr, dc->ra, dc->imm); - if (to) - gen_helper_mmu_write(cpu_env, tcg_const_i32(sr), cpu_R[dc->ra]); - else - gen_helper_mmu_read(cpu_R[dc->rd], cpu_env, tcg_const_i32(sr)); + if (to) { + gen_helper_mmu_write(cpu_env, tmp_sr, cpu_R[dc->ra]); + } else { + gen_helper_mmu_read(cpu_R[dc->rd], cpu_env, tmp_sr); + } + tcg_temp_free_i32(tmp_sr); return; } #endif