Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Aug 2006 15:29:52 -0400
From:      David Edelsohn <dje@watson.ibm.com>
To:        Peter Grehan <grehan@freebsd.org>
Cc:        Maxim Sobolev <sobomax@freebsd.org>, freebsd-ppc@freebsd.org
Subject:   Re: Unaligned 64-bits access on FreeBSD/powerpc 
Message-ID:  <200608031929.k73JTq834496@makai.watson.ibm.com>
In-Reply-To: Message from Peter Grehan <grehan@freebsd.org>  of "Thu, 03 Aug 2006 12:10:55 PDT." <44D24A3F.5080407@freebsd.org> 
References:  <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> <44D245E5.4070102@freebsd.org> <44D24772.7080109@FreeBSD.org> <44D24A3F.5080407@freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> Peter Grehan writes:

>> atype = "64";
>> for (i = 0; i < 256; i++) {
>> apoint = (uint8_t *)&(buf[i]);
>> v64 = *(uint64_t *)apoint;
>> }

Peter> Would you be able to do a disassembly on this ? I suspect gcc is using 
Peter> floating-point regs to do the 64-bit loads.

	That does not matter.  The OS is suppose to catch the misaligned
load and emulate the instruction in a handler.  If FreeBSD cannot handle
that, then it needs to configure GCC for PowerPC in strict-alignment
embedded mode, which is ABI incompatible.  If FreeBSD wants to use the
standard PPC SVR4 ABI or PPC32 Linux variant, it must support any
misaligned load.  That is the OS's responsibility, period.

David




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608031929.k73JTq834496>