From owner-svn-src-all@freebsd.org Fri Jan 19 18:42:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E3EDEC1556 for ; Fri, 19 Jan 2018 18:42:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C1146E918 for ; Fri, 19 Jan 2018 18:42:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-wm0-x235.google.com with SMTP id i186so5207352wmi.4 for ; Fri, 19 Jan 2018 10:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=dfDsGlS26rXDEUjSkSKvrHiA+1ye5HR6e1+bS7sMKzY=; b=USsID5YjDv7cQX6Psr7MamNKxbgva0otPYB/CbbVDiZSg6/h9a9wgXCNkf/XrXXjfh WvrNMsq4ZFxFEErlp8Ont+FArGJIDnyRl4RUE49STn0dpJjsJCWkYTWiWEYCSIMwwXH8 A6jLwisL0liAW3zGZ9/zYR45BVmAcETbo4CxDSciwr62mj5+80v0ZZKMKt/UuT4Bp/Mw vXPcwOf2EpZQpCqOcQ65cRu/vEF1W4vTjMRNCVi7vT+5XUMRFaafaZ9h89uAqwgNc7b5 c2/Az41161kx1iVtv0iLgwf3QNcbS6hVHDdGP5J+GD0KOeo8jDEinE345Ih3B0pmOlOq 7cVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=dfDsGlS26rXDEUjSkSKvrHiA+1ye5HR6e1+bS7sMKzY=; b=NOd1DJPLh355AJrfuSrLx8MfcxQ3VdCDo7sIEtnnmhb4Ad1A3uLLXgCkw/MigflWIC K0GZvlqqVils61dQw6p8nAGeNrbVfcXo4ME4M/8rYezmSnK7uYGunYdwYyAVkaNe2N95 2Vwl7pd1ptpeEDlx/ynFO4AgTenBKesSeg/SnsNx3yd/SEKQaGXM6Os+IEh0KSGkTsQ4 l5J+uGOGp0lQt8UWUWY1w/qaSf6U2cwqCax30A8g+YLWCnX1XaUpqFGSrcSOsshCQ4bB vUPwYXFWsDoIUVW5Vj25cedAVVEEHRI8g9+5HATOLECHekvEy4m/dRtKFs5EW7doP6Oy zNAg== X-Gm-Message-State: AKwxytf5PiEE+TT04gI6cG3mbt1sDyT/Zl35YgT3aNIMSkSKztwd+gQS j0OFFDrOWzlZI9lswHxz+93vU1lWCBWO6MTurWOomw== X-Google-Smtp-Source: ACJfBosDs7MWV+FZFrGrlLVQto8vDFSPjRtWkEShUNp4aSMYvjmSsOCRAG6WHuR5LxmCWYKcvIBTH5AuqLK4f8P8TFI= X-Received: by 10.80.151.22 with SMTP id c22mr14312091edb.225.1516387352023; Fri, 19 Jan 2018 10:42:32 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.80.133.195 with HTTP; Fri, 19 Jan 2018 10:42:31 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201801190434.w0J4Y6i7086677@repo.freebsd.org> <2915608.v56yfz43Ej@ralph.baldwin.cx> From: Warner Losh Date: Fri, 19 Jan 2018 11:42:31 -0700 X-Google-Sender-Auth: cu0m2CVAzDv32vf0yxMjGTUHI6U Message-ID: Subject: Re: svn commit: r328159 - head/sys/modules To: "Conrad E. Meyer" Cc: John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2018 18:42:34 -0000 On Fri, Jan 19, 2018 at 11:31 AM, Conrad Meyer wrote: > On Fri, Jan 19, 2018 at 9:51 AM, John Baldwin wrote: > > On Friday, January 19, 2018 04:34:06 AM Conrad Meyer wrote: > >> The logical result of a right shift >=3D the width of a type is zero= , > but our > >> compiler decides this is a warning (and thus, error). Just remove > ccp(4) > >> from i386. > > > > You would think that. The shift instructions on x86 effectively ignore > the > > upper bits of the count, so a 33-bit shift on i386 ends up being a 1-bi= t > shift, > > etc. IIRC. > > This never becomes a shift instruction on x86 or any other arch =E2=80=94= it's > a constant before it reaches machine code > I think what John is getting at is that one's notions of what a logical shift left should do should be tempered with real world experience which says they don't behave that way always... I do hope we're all in violent agreement that, no matter how crazy we think it might be, avoiding the UB zone as much as possible is generally desirable. It certainly is in this case. Warner