From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 20 19:20:33 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1A501065679 for ; Mon, 20 Aug 2012 19:20:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id B87768FC1B for ; Mon, 20 Aug 2012 19:20:32 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so7809390pbb.13 for ; Mon, 20 Aug 2012 12:20:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=KCxyECDI8FnX8CSLsoeicy0Z5QcbV3tJPV8iRNrzmKs=; b=WDFiVxqdRHWmxL/Bt1QeC6eaDKWeIcfc8CEQL8ZZX7K1Hj842N8qBekLXXAyVrFbEp EpHlYwKwR02uY/JYW+s4VMX8Wnpn+IWp2m25BtdkTs850jAfS/vfXuf43SG+fcvGtQOf 0wu/oL3x0drtKbVm82Y1yD/r2ZHDqDaQ1Ans/Dl1QdmHkjVrcfnueUL0v/DqI09AR6zN 5mLAFbxFrOm3VKp9qiSbPX49IeyY5vaD0BshsvxLXouqH/pAOeXoR5+Vf0LSYOqcAB3I jHOlxq38tYA0sCfmULo6GXzAh3lFnhn8YN7wJUUi3Ipjz0uopQncTpUOytLiBtI5RtLs ItRw== Received: by 10.68.130.65 with SMTP id oc1mr36887796pbb.29.1345490432225; Mon, 20 Aug 2012 12:20:32 -0700 (PDT) Received: from monkey-bot.int.fusionio.com ([216.51.42.66]) by mx.google.com with ESMTPS id ty1sm8562932pbc.76.2012.08.20.12.20.31 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Aug 2012 12:20:31 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Mon, 20 Aug 2012 13:20:29 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <5452BF37-3658-4C1F-B965-CE3EA28B6EA5@bsdimp.com> References: <50324DB4.6080905@cabletv.dp.ua> To: Wojciech Puchar X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQn4h9J6iAF+1YY05Vhj0glCPMNHEj+qEPbLE4ooqGb+TVEQgY5o/ekNANcU6FJpL2F0+cjh Cc: freebsd-hackers@freebsd.org, Mitya , freebsd-net@freebsd.org Subject: Re: Replace bcopy() to update ether_addr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 19:20:33 -0000 On Aug 20, 2012, at 1:17 PM, Wojciech Puchar wrote: >>> or use ++. >>>=20 >>> i think it is always aligned to 2 bytes and this should produce = usable code on any CPU? should be 6 instructions on MIPS and PPC IMHO. >>=20 >> We should tag it as __aligned(2) then, no? If so, then the compiler = should generate the code you posted. > should is the most important word in Your post. what it actually do - = i don't know. If we are requiring this to be __aligned(2), we should tag it as such to = enforce this. Even without this tagging, the code to do a structure level copy of 6 = bytes is going to be tiny... Warner