From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Untagging by subtraction instead of masking on USE_LSB_TAG Date: Mon, 28 Jan 2008 14:02:51 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <87ve5ezjwp.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1201496592 3574 80.91.229.12 (28 Jan 2008 05:03:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Jan 2008 05:03:12 +0000 (UTC) Cc: Thien-Thi Nguyen , emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 28 06:03:31 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JJM9a-0006ni-8q for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2008 06:03:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJM99-0006vP-LE for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2008 00:03:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJM96-0006v7-53 for emacs-devel@gnu.org; Mon, 28 Jan 2008 00:03:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJM94-0006uv-Jc for emacs-devel@gnu.org; Mon, 28 Jan 2008 00:02:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJM94-0006us-E5 for emacs-devel@gnu.org; Mon, 28 Jan 2008 00:02:58 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJM8z-0005ie-LI; Mon, 28 Jan 2008 00:02:54 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 6ADF02C49; Mon, 28 Jan 2008 14:02:51 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.1 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-kernel: by monty-python.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87684 Archived-At: >>>>> On Mon, 28 Jan 2008 13:25:30 +0900, Miles Bader said: > Miles Bader writes: >> Note that the important value here is the EA, not the offset. >> Typically in a LSB tag scheme, the tags are arranged so that after >> adding these "funny" offsets, the resulting EA is aligned properly. > BTW, such a method won't work on architectures where offsets are > inherently aligned -- for instance, doesn't the x86 implicitly scale > the offset by the size of the value being loaded? Does anybody know > what is usually done on such an architecture? I'm not sure, but there might be. At least, the result on intel Mac with gcc -Os was similar to that on PowerPC. _cons_to_long: _cons_to_long: pushl %ebp pushl %ebp movl %esp, %ebp movl %esp, %ebp movl 8(%ebp), %eax movl 8(%ebp), %eax testb $7, %al testb $7, %al jne L617 jne L617 sarl $3, %eax sarl $3, %eax jmp L619 jmp L619 L617: L617: andl $-8, %eax movl (%eax), %ecx movl -5(%eax), %ecx movl 4(%eax), %edx movl -1(%eax), %edx movl %edx, %eax movl %edx, %eax andl $7, %eax andl $7, %eax cmpl $5, %eax cmpl $5, %eax jne L620 jne L620 movl %edx, %eax andl $-8, %eax movl (%eax), %edx movl -5(%edx), %edx L620: L620: movl %ecx, %eax movl %ecx, %eax sarl $3, %eax sarl $3, %eax sall $16, %eax sall $16, %eax sarl $3, %edx sarl $3, %edx orl %edx, %eax orl %edx, %eax L619: L619: popl %ebp popl %ebp ret ret And Solaris/SPARC with gcc -Os: cons_to_long: cons_to_long: !#PROLOGUE# 0 !#PROLOGUE# 0 !#PROLOGUE# 1 !#PROLOGUE# 1 and %o0, -8, %o4 mov %o0, %o4 andcc %o0, 7, %g0 andcc %o0, 7, %g0 be .LL952 be .LL949 sra %o0, 3, %o0 sra %o0, 3, %o0 ld [%o4+4], %o5 ld [%o4-1], %o5 and %o5, 7, %g1 and %o5, 7, %g1 cmp %g1, 5 cmp %g1, 5 ld [%o4], %g1 ld [%o4-5], %g1 sra %g1, 3, %g1 sra %g1, 3, %g1 and %o5, -8, %o3 bne .LL954 bne .LL951 sll %g1, 16, %o0 sll %g1, 16, %o0 ld [%o3], %o5 ld [%o5-5], %o5 .LL954: .LL951: sra %o5, 3, %g1 sra %o5, 3, %g1 or %o0, %g1, %o0 or %o0, %g1, %o0 .LL952: .LL949: retl retl nop nop YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp