Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6756116imu; Mon, 3 Dec 2018 02:12:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/XB3yYKehfYlgOtFDo5aEOQad0APaNRiVgvim5sZKk1Jm0T+LLGf08YiuV9YI3E4xVGBFHV X-Received: by 2002:a62:c683:: with SMTP id x3mr14962722pfk.10.1543831922595; Mon, 03 Dec 2018 02:12:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543831922; cv=none; d=google.com; s=arc-20160816; b=h4tUHeaBx0Xqemi2TLGRup7nqGzU4FIkVOh+lq5PJoBKfft3m5hLbTjPn/0QTmTp8G zqfGD/ypjuN0wecDcyliN5ifL8if+IeG8KKdeApytZt9X5Q/Fn9PK/Pp/4VHv8U+y+HC lmtqLxmqz5nBVX3EaoXJUr/+0LArQYvoEDjPlfMjyH0YmNm+WjzdPZM/L1lQmmTgIneB amsU9m+tTH/ZMMVdfvlMGS4hNB5Eac9mr3uZraDR2FSIS7/6tusgSgC5jMbBAZJ+DA4u BNMcbZ0Jh+NSaSSbT0e7HnY80Wxh0E3KXki1hl3y70fvZj/NXsmOroHNJzEOuXzgz7aL rAUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=yrQROtS4nOr6dqobZJ1ECoiCe+fXnRVU5On7qTithkc=; b=iTr3s3gXpZl7DF7b0uJzdpshlOMCBr15Bq70ozKbCvPhnoO5z5bnzYcTFCNF/56ltP l6vK8VaGQRYldvhxX5mChd4jrvtF7YhuQwZp0KEQQYalAU3tAwvGIlrj5vMNpYS594ID ZQftmf8mjXqcNo3KGN8VSgtJ94AKTTdlL/ayRW0GZPbWOcmE0RMKCLFhxzBlr3bB/Ak2 dmTLxDdhpLsho8bmoKvlsqS7W0oHZ5svYKSLQPixsIUEEtTqznJgLU7Hrslg9oQWDN5R SnTHmDwelRwi0LaEkF299/CNvrjDcsBm42CR/JeImu8trgngzfZoovTq22P8UgiDdDDL ezew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si12328816pgd.292.2018.12.03.02.11.47; Mon, 03 Dec 2018 02:12:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726116AbeLCKKX convert rfc822-to-8bit (ORCPT + 99 others); Mon, 3 Dec 2018 05:10:23 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:23247 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbeLCKKW (ORCPT ); Mon, 3 Dec 2018 05:10:22 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-32-M9eBV3i6N5mXzexFWVvs2A-1; Mon, 03 Dec 2018 10:09:56 +0000 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b::d117) by AcuMS.aculab.com (fd9f:af1c:a25b::d117) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 3 Dec 2018 10:10:05 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Mon, 3 Dec 2018 10:10:05 +0000 From: David Laight To: 'Vineet Gupta' , 'Arnd Bergmann' , "jose.abreu@synopsys.com" CC: "open list:SYNOPSYS ARC ARCHITECTURE" , Linux Kernel Mailing List , "alexey.brodkin@synopsys.com" , Joao Pinto , "Vitor Soares" Subject: RE: [PATCH v2] ARC: io.h: Implement reads{x}()/writes{x}() Thread-Topic: [PATCH v2] ARC: io.h: Implement reads{x}()/writes{x}() Thread-Index: AQHUh+/vHIi8Q+1XAUeZFbx1QKnaT6Vsz5DQ Date: Mon, 3 Dec 2018 10:10:05 +0000 Message-ID: References: <19fb2e394afcb073bbc109e432417fbbc03323f6.1543499759.git.joabreu@synopsys.com> <89122bd8-bca2-2ae1-0dd0-160abbebcace@synopsys.com> <57437493-31bb-eced-032c-1f54470b030e@synopsys.com> <3afe0e1bbf2d42d3bb178ec789553c28@AcuMS.aculab.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: M9eBV3i6N5mXzexFWVvs2A-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vineet Gupta ... > > It also seems to have used a different type of loop to the > > other example, probably less efficient. > > (Not that I'm an expert on ARC opcodes.) > > The difference is due to ISA and ensuing ARC gcc backends. ARCompact based cores > don't support unaligned access and the loop there was ZOL (Zero delay loop). In > ARCv2 based cores, the gcc backend has been tweaked to generate fewer ZOLs hence > you see the more canonical tst and branch style loop. Is this another case of the hardware implementing 'hardware' loop instructions that execute slower than ones made of simple instructions? The worst example has to be the x86 'loop' (dec cx and jump nz) instruction which is microcoded on intel cpus. That makes it very difficult to use the new addx instruction to get two dependency chains through a loop. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)