From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A917C433C1 for ; Mon, 22 Mar 2021 16:34:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 957EC6198D for ; Mon, 22 Mar 2021 16:34:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 957EC6198D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lONVC-0003za-Nj for qemu-devel@archiver.kernel.org; Mon, 22 Mar 2021 12:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lONOE-00070F-V4 for qemu-devel@nongnu.org; Mon, 22 Mar 2021 12:26:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lONO8-0005be-T9 for qemu-devel@nongnu.org; Mon, 22 Mar 2021 12:26:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616430402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZosqkRNGzh+a2kf+44LGFVj4VC6dALmVVWBFPynEob0=; b=HP1TX0f6EXqeROukj6JvvU3KMc+zj3YnBrlusjPHolC2gBY5m7DT3XDZ+EAcKKhHRRWLUO R9RmaAExI2JXP3TLYCBfsC/l6Od0TPpVjRVI324VjW+xrKsONTcVyB64wUl051Jl8P7f8y fBoTbIPUfsJJasJPe1CqFn4nf+CUG70= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-451-SX57OH6GOguI-wGyfiE75A-1; Mon, 22 Mar 2021 12:26:39 -0400 X-MC-Unique: SX57OH6GOguI-wGyfiE75A-1 Received: by mail-wr1-f72.google.com with SMTP id h5so26311254wrr.17 for ; Mon, 22 Mar 2021 09:26:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZosqkRNGzh+a2kf+44LGFVj4VC6dALmVVWBFPynEob0=; b=qJDOewgEDubs7a2/9CAPtz6zD1RDkiw7praIqI6sI3/66tWpxjlAK4gO1M9Lg4c+qh s2+nHiEA3e8JMLA412hG0OgQmaF4rOV1fEkhEwhnseChbnn7+Pv+Lb0padSnRjF3e9Px oitvDK3Nl5mZP51i8pA3JiN8WMNg1ObN4CIYamIAxhzpWaZxnfXnS/YUantcwO/cYPTA HmDJWruf3XAyb+EGVXI7ifOtpTwDmK4nFnyydXdo7XQaPFhpsrxNPgwzGNW7Pjh48df5 +xaHybXaAfaAdM1WojY7eUxMPYqWVTisnXMWbp3enslq8crYesg7IyXqXwDtxjqv3FaC VfHA== X-Gm-Message-State: AOAM531qCmNItslHIH/0KH/ti3iTwmWzupsyT0FhJlR1GX6r+t3mkWPf +RgoIywzXiZqoS3aAkxJSk4I45RW5Mot0LuHo9JXl7ho7/zU/RXnXAOGxMUviQHW3RyRfZikMug i1CB1JH1YCNcKSSqmW9oOhES4ckrhAaLp6hJvvI8dxqHyTq9rQibsDUmY4/8suvxunL0= X-Received: by 2002:a1c:bc82:: with SMTP id m124mr599095wmf.118.1616430397911; Mon, 22 Mar 2021 09:26:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEsBkk72yzhEdmqNIVFNMZ2VfzWeaxRL1HzGLuYF/FoiTEH4RA6BUdje+BR9XL9Aq6S59m4g== X-Received: by 2002:a1c:bc82:: with SMTP id m124mr599085wmf.118.1616430397696; Mon, 22 Mar 2021 09:26:37 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id t14sm20139394wru.64.2021.03.22.09.26.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Mar 2021 09:26:37 -0700 (PDT) Subject: Re: [Qemu-devel] [PULL 18/76] optionrom: add new PVH option rom To: Stefano Garzarella References: <1549390526-24246-1-git-send-email-pbonzini@redhat.com> <1549390526-24246-19-git-send-email-pbonzini@redhat.com> <20210319173524.rnrxslpmdjck6uxv@steredhat> <20210319182022.veha5gbcg3p4idgk@steredhat> <20210322135719.z34fei3aawcr4x7z@steredhat> From: Paolo Bonzini Message-ID: Date: Mon, 22 Mar 2021 17:26:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210322135719.z34fei3aawcr4x7z@steredhat> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 22/03/21 14:57, Stefano Garzarella wrote: > On Mon, Mar 22, 2021 at 12:52:37PM +0100, Paolo Bonzini wrote: >> On 22/03/21 11:59, Stefano Garzarella wrote: >>> >>> If I build with gcc 10.2.1 20210313 (Alpine 10.2.1_pre2) uint64_t and >>> UINT64_C(1) have a size of 4 bytes, while UINT64_C(0x2052545020445352) >>> has a size of 8 bytes: >>> >>>    warning: initialization of ‘char (*)[4]’ from ‘int’ makes pointer >>> from integer without a cast [-Wint-conversion] >>>    74 |     char (*__size1)[sizeof(uint64_t)] = 1; >>>       |                                         ^ >>>    warning: initialization of ‘char (*)[4]’ from ‘int’ makes pointer >>> from integer without a cast [-Wint-conversion] >>>    75 |     char (*__size2)[sizeof(UINT64_C(1))] = 1; >>>       |                                            ^ >>>    warning: initialization of ‘char (*)[8]’ from ‘int’ makes pointer >>> from integer without a cast [-Wint-conversion] >>>    76 |     char (*__size3)[sizeof(UINT64_C(0x2052545020445352))] = 1; >> >> Looks like long is 4 bytes long with -m16 and -m32, but 8 bytes with >> -m64.  The large constant is extended to long long because it's the >> only way to fit it. > > Yeah, but I expected uint64_t to always be on 8 bytes, regardless of the > architecture. It's somehow using the -m64 definition (long int) instead of the -m32 definition (long long int), even though -m16 is basically "same as -m32 but emitting 16-bit encoded instructions". Paolo