From owner-svn-src-all@freebsd.org Fri Jan 19 17:24:59 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 D9D59EBDE01; Fri, 19 Jan 2018 17:24:59 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com [209.85.223.170]) (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 A80BB6AB8B; Fri, 19 Jan 2018 17:24:59 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f170.google.com with SMTP id c17so2927430iod.1; Fri, 19 Jan 2018 09:24:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=n4n0bPVhfn9vmotAEAtRVe1/6pjap7l783ccIdWt72o=; b=b22zdDqoGJD75lQ9bFyebsCefXk2L5tPBiZt0jbk5frtls7vwyDJRMl9GJj5oXhy1S csQEMOXQFMHwOWKynY90GZlwOExzBrgHlQ5x2bK60Vl3+L0t1dXlzBn895xuUskLyo6i fEDwFrJFm6UA0PP9up6HynzIk2dnQMMpsATtVuHb5/J/qBAHX8iyj3UM3O+USDow+Hfp XE/b9P6FpB9iKxoJZpeGqgSCV+5HywG33KUtEFgzI58nlTaa0p9+ZahyamFwyoLmFhQ2 mQUwFi+nwkRUxGq+w3zBngwSrBidUTu3nlXHfY6RkHAX707yMWm/wOHw5Gj9ROxrV+At qS6A== X-Gm-Message-State: AKwxytelf7u+PBsx9wOSqznkWX0cFxXIGkIaDswJ6T2XRvvYT6P4vqxT +wPNOtXR49SE8tFrizh3XGZIPen2 X-Google-Smtp-Source: ACJfBotLrByiEkk2ojyGiHLra/4zz+gTrEj+X8kWwuK+3gLIIfnxme/yfQiPxa/QrHsL8SRvXPT7Jg== X-Received: by 10.107.69.8 with SMTP id s8mr17443417ioa.156.1516381218420; Fri, 19 Jan 2018 09:00:18 -0800 (PST) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com. [209.85.223.181]) by smtp.gmail.com with ESMTPSA id 202sm5229128ioz.84.2018.01.19.09.00.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jan 2018 09:00:18 -0800 (PST) Received: by mail-io0-f181.google.com with SMTP id t22so2835380ioa.7; Fri, 19 Jan 2018 09:00:18 -0800 (PST) X-Received: by 10.107.131.210 with SMTP id n79mr27074455ioi.215.1516381217914; Fri, 19 Jan 2018 09:00:17 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.95.152 with HTTP; Fri, 19 Jan 2018 09:00:17 -0800 (PST) In-Reply-To: <244014BB-C492-48A9-9F28-0A5E713DE5EB@FreeBSD.org> References: <201801190434.w0J4Y6i7086677@repo.freebsd.org> <244014BB-C492-48A9-9F28-0A5E713DE5EB@FreeBSD.org> From: Conrad Meyer Date: Fri, 19 Jan 2018 09:00:17 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r328159 - head/sys/modules To: David Chisnall Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" 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 17:25:00 -0000 On Fri, Jan 19, 2018 at 6:56 AM, David Chisnall wrote: > In C, a right-shift of a signed type propagates the sign bit. Right shifting a negative 32-bit int by 16 and then again by 16 is not undefined behaviour (though doing the shift as a single operation is) and will give you a value of -1. The left hand operand under discussion is unsigned. In LLVM/assembler terms, this is a logical right shift, not an arithmetic right shift. It is by definition zero filled from the left.