From owner-svn-src-head@freebsd.org Fri Jan 19 18:42:34 2018 Return-Path: Delivered-To: svn-src-head@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 9E438EC1557 for ; Fri, 19 Jan 2018 18:42:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 2BA9E6E917 for ; Fri, 19 Jan 2018 18:42:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-wm0-x236.google.com with SMTP id t74so5250332wme.3 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=QKQWt3NfJ4lZdmUHzBApZjxkYjWyzFDdpufJJniE8O71UU0Z3WbBPVbal68TIu6/rH IoEfLFb4Wp9VytoYnUC2EYQcxduCTA4jKBg2mWUoDcIBFs/d4XkMdPiLI2vqY1rijp1O 7VF+db5jfGMyCUdsgL0wQ+FvUfxLpf5S3nx6FM1HXYgVTAP91BV8P74PQYeaqAGd1OJX z/HIUZHcETHOETpQ0jdTLvWFN2rW4UxZIsqhem+/RrefUYmY75gYh3KjI1oDG7Yjci4t h5n93hF+3NHARscaQjz1842ezqHcGi0rB+nMjjUGKFiVj9MjHnXzmQKwMUTcW6DK/FWG /MjA== X-Gm-Message-State: AKwxyte/BSKL7obI/Bgo+y+8bCCb+dMtOBmcW/Uh/cd/1id/KMdho9rg 3fnPf67S70rhvjTv+rzKZO2VYYGa1mCrUOrTbKBUiA== 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-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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