From patchwork Tue Nov 5 16:38:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 21335 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DA63525B39 for ; Tue, 5 Nov 2013 16:38:42 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id cm18sf3318192qab.0 for ; Tue, 05 Nov 2013 08:38:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=8ueLX8LcfI8rJn4aYWwHcRm5rbjwNVa5W75F/zjY69s=; b=VVvyqyArGBn1ICeHjm1A6N8baHnr8X4cu0TZ9S1p31LPTTx3PLi5+AKzv7Bgnb7liE btC55SdGiIihy52VAjHuXq3AJLZcfkhFIeLbvb5JUzWSzWTWtXrZYFUkdaTd5YnvT7nG cvQ06eCFk6+hoGoymqifXILB3pYltav6vuC1dErVrc1fMbkYHHzzG27zp/xje7id1FkK BpfLiU1kQXuK09fzfdik215tIEphOv+Hmr6ZpolAZddaaZU75aiU8kk5Ux/iKi5j4u7Q 6J+Xt0HFTMShQg+aexmhjKnh6w+BQvj+XjrHcpRRTtMtxryYWbdarTGUgttlxWyhAPmL q3nA== X-Gm-Message-State: ALoCoQmgxlt7+w6Hnoge/Q4VMEDN6Sb7b/3Ha/qNqvLRkGUjqVN74dizXdZRliVDIrWpeKmjaPoP X-Received: by 10.58.37.3 with SMTP id u3mr4092006vej.6.1383669522393; Tue, 05 Nov 2013 08:38:42 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.3.106 with SMTP id b10ls255018qeb.40.gmail; Tue, 05 Nov 2013 08:38:42 -0800 (PST) X-Received: by 10.58.107.204 with SMTP id he12mr1858926veb.26.1383669522253; Tue, 05 Nov 2013 08:38:42 -0800 (PST) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id f20si6732585vcs.142.2013.11.05.08.38.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:38:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so1888800vbg.39 for ; Tue, 05 Nov 2013 08:38:42 -0800 (PST) X-Received: by 10.220.78.18 with SMTP id i18mr16333744vck.3.1383669522130; Tue, 05 Nov 2013 08:38:42 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp219993vcz; Tue, 5 Nov 2013 08:38:41 -0800 (PST) X-Received: by 10.194.201.225 with SMTP id kd1mr10509933wjc.35.1383669520460; Tue, 05 Nov 2013 08:38:40 -0800 (PST) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id d1si2635689wie.5.2013.11.05.08.38.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:38:40 -0800 (PST) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1VdjeH-0006fv-NJ; Tue, 05 Nov 2013 16:38:37 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: Anthony Liguori , patches@linaro.org, Kevin Wolf , Stefan Hajnoczi , "Michael S. Tsirkin" , Richard Henderson Subject: [PATCH v2 9/9] bswap.h: Remove cpu_to_32wu() Date: Tue, 5 Nov 2013 16:38:37 +0000 Message-Id: <1383669517-25598-10-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1383669517-25598-1-git-send-email-peter.maydell@linaro.org> References: <1383669517-25598-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Replace the legacy cpu_to_32wu() with stl_p(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Michael S. Tsirkin --- hw/display/vga_template.h | 14 ++++++++------ include/qemu/bswap.h | 7 ------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/display/vga_template.h b/hw/display/vga_template.h index f6f6a01..6cfae56 100644 --- a/hw/display/vga_template.h +++ b/hw/display/vga_template.h @@ -113,20 +113,22 @@ static void glue(vga_draw_glyph9_, DEPTH)(uint8_t *d, int linesize, do { font_data = font_ptr[0]; #if BPP == 1 - cpu_to_32wu((uint32_t *)d, (dmask16[(font_data >> 4)] & xorcol) ^ bgcol); + stl_p((uint32_t *)d, (dmask16[(font_data >> 4)] & xorcol) ^ bgcol); v = (dmask16[(font_data >> 0) & 0xf] & xorcol) ^ bgcol; - cpu_to_32wu(((uint32_t *)d)+1, v); + stl_p(((uint32_t *)d)+1, v); if (dup9) ((uint8_t *)d)[8] = v >> (24 * (1 - BIG)); else ((uint8_t *)d)[8] = bgcol; #elif BPP == 2 - cpu_to_32wu(((uint32_t *)d)+0, (dmask4[(font_data >> 6)] & xorcol) ^ bgcol); - cpu_to_32wu(((uint32_t *)d)+1, (dmask4[(font_data >> 4) & 3] & xorcol) ^ bgcol); - cpu_to_32wu(((uint32_t *)d)+2, (dmask4[(font_data >> 2) & 3] & xorcol) ^ bgcol); + stl_p(((uint32_t *)d)+0, (dmask4[(font_data >> 6)] & xorcol) ^ bgcol); + stl_p(((uint32_t *)d)+1, + (dmask4[(font_data >> 4) & 3] & xorcol) ^ bgcol); + stl_p(((uint32_t *)d)+2, + (dmask4[(font_data >> 2) & 3] & xorcol) ^ bgcol); v = (dmask4[(font_data >> 0) & 3] & xorcol) ^ bgcol; - cpu_to_32wu(((uint32_t *)d)+3, v); + stl_p(((uint32_t *)d)+3, v); if (dup9) ((uint16_t *)d)[8] = v >> (16 * (1 - BIG)); else diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index 4cbd6e7..437b8e0 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -410,13 +410,6 @@ static inline void stfq_be_p(void *ptr, float64 v) stq_be_p(ptr, u.ll); } -/* Legacy unaligned versions. Note that we never had a complete set. */ - -static inline void cpu_to_32wu(uint32_t *p, uint32_t v) -{ - stl_p(p, v); -} - static inline unsigned long leul_to_cpu(unsigned long v) { /* In order to break an include loop between here and