Message ID | 1398713302-29657-3-git-send-email-rth@twiddle.net |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBDH3N3F43IGRBS6Y7KNAKGQEYPV6R4Y@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8A77F202FE for <linaro@patches.linaro.org>; Mon, 28 Apr 2014 19:30:19 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id jy13sf28981497veb.2 for <linaro@patches.linaro.org>; Mon, 28 Apr 2014 12:30:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=JvB5cO2ZWTj13YEZaRWeeaUeCzBjek2s1vnJYaUmpoQ=; b=OcKVZpsq6yiMs9W09c8YQOju6PWtCPUm+trE+83NEKyNNqnW9CTaYsBWik4v/s9X89 PTQWv/09i9GsPliiPudB4Usyj8oWGQpJcMavP/4vtt5JIK7nfQTtCSddWSEk4nhZ6R4e 2Nsa44iGERu+cE3MB01kY1RwcgCgRul2vg7xoagWYhxdu/catz8DW7CP2rY9pZEjIPoi tRV/K8HNwQssBLLzEHBs+Dn77fn0icReq1xT0lyRU6diV54aONh+QDIqlB1sKSvErUJ4 nShyhZK0WO6CUeDb5RhHfnUNqr1rZzKvJR76cFcfXOs5JACrseZwfD055a69rQG1f6yY A6Hg== X-Gm-Message-State: ALoCoQn+yEq66wpcqCFWWGN95w3/UMPMBtcP/trUsSoixMmuBTOkesPXjP53QX9k6WZBSBvJ6rbU X-Received: by 10.58.188.4 with SMTP id fw4mr980694vec.9.1398713419279; Mon, 28 Apr 2014 12:30:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.248 with SMTP id i111ls2729552qge.7.gmail; Mon, 28 Apr 2014 12:30:19 -0700 (PDT) X-Received: by 10.58.146.5 with SMTP id sy5mr1703409veb.43.1398713419086; Mon, 28 Apr 2014 12:30:19 -0700 (PDT) Received: from mail-vc0-x229.google.com (mail-vc0-x229.google.com [2607:f8b0:400c:c03::229]) by mx.google.com with ESMTPS id w10si3890679vei.70.2014.04.28.12.30.19 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 12:30:19 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=2607:f8b0:400c:c03::229; Received: by mail-vc0-f169.google.com with SMTP id im17so8669333vcb.14 for <patchwork-forward@linaro.org>; Mon, 28 Apr 2014 12:30:19 -0700 (PDT) X-Received: by 10.220.191.134 with SMTP id dm6mr25491865vcb.16.1398713419003; Mon, 28 Apr 2014 12:30:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp141362vcb; Mon, 28 Apr 2014 12:30:18 -0700 (PDT) X-Received: by 10.224.121.133 with SMTP id h5mr31337028qar.79.1398713418275; Mon, 28 Apr 2014 12:30:18 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p8si8362693qag.30.2014.04.28.12.30.18 for <patch@linaro.org> (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 12:30:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:45601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1WerFp-0006Yc-SO for patch@linaro.org; Mon, 28 Apr 2014 15:30:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <rth7680@gmail.com>) id 1WerEe-0005Sd-Vk for qemu-devel@nongnu.org; Mon, 28 Apr 2014 15:29:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <rth7680@gmail.com>) id 1WerEX-0008N3-Vm for qemu-devel@nongnu.org; Mon, 28 Apr 2014 15:29:04 -0400 Received: from mail-qc0-x22a.google.com ([2607:f8b0:400d:c01::22a]:56139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rth7680@gmail.com>) id 1WerEX-0008My-R6 for qemu-devel@nongnu.org; Mon, 28 Apr 2014 15:28:57 -0400 Received: by mail-qc0-f170.google.com with SMTP id x13so7595880qcv.1 for <qemu-devel@nongnu.org>; Mon, 28 Apr 2014 12:28:57 -0700 (PDT) X-Received: by 10.224.61.200 with SMTP id u8mr36542642qah.18.1398713337486; Mon, 28 Apr 2014 12:28:57 -0700 (PDT) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id v9sm34841261qav.28.2014.04.28.12.28.55 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Apr 2014 12:28:56 -0700 (PDT) From: Richard Henderson <rth@twiddle.net> To: qemu-devel@nongnu.org Date: Mon, 28 Apr 2014 12:28:08 -0700 Message-Id: <1398713302-29657-3-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1398713302-29657-1-git-send-email-rth@twiddle.net> References: <1398713302-29657-1-git-send-email-rth@twiddle.net> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::22a Cc: Peter Maydell <peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH v3 02/16] tcg: Avoid stores to unaligned addresses X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Original-Sender: rth@twiddle.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=fail header.i=@gmail.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit |
diff --git a/tcg/tcg.c b/tcg/tcg.c index e71f7a0..293f00b 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -125,21 +125,21 @@ static inline void tcg_out8(TCGContext *s, uint8_t v) static inline void tcg_out16(TCGContext *s, uint16_t v) { uint8_t *p = s->code_ptr; - *(uint16_t *)p = v; + memcpy(p, &v, sizeof(v)); s->code_ptr = p + 2; } static inline void tcg_out32(TCGContext *s, uint32_t v) { uint8_t *p = s->code_ptr; - *(uint32_t *)p = v; + memcpy(p, &v, sizeof(v)); s->code_ptr = p + 4; } static inline void tcg_out64(TCGContext *s, uint64_t v) { uint8_t *p = s->code_ptr; - *(uint64_t *)p = v; + memcpy(p, &v, sizeof(v)); s->code_ptr = p + 8; }