Re: COPY_TWO_BYTES and C strict aliasing
From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 01 Jun 2012 14:09:50 +0100
Branko Čibej <brane_at_apache.org> writes:
> On 01.06.2012 14:22, Philip Martin wrote:
With Linux/gcc using memcpy causes the generated assembler to be ordered
10,19c10,19
--- > ja .L271 > .loc 1 965 0 > addl $48, %esi > .loc 1 966 0 > movb $0, 1(%rdi) > .loc 1 967 0 > movl $1, %eax > .loc 1 965 0 > movb %sil, (%rdi) > .loc 1 1019 0 183,192c183,192 < .L281: < .loc 1 965 0 < addl $48, %esi < .loc 1 966 0 < movb $0, 1(%rdi) < .loc 1 967 0 < movl $1, %eax < .loc 1 965 0 < movb %sil, (%rdi) < .loc 1 1019 0 --- > .L271: > .loc 1 971 0 > leaq decimal_table(%rip), %rax > .loc 1 972 0 > movb $0, 2(%rdi) > .loc 1 971 0 > movzwl (%rax,%rsi,4), %eax > movw %ax, (%rdi) > .loc 1 973 0 > movl $2, %eax That's replacing *(apr_uint16_t*)(dest) = *(apr_uint16_t*)(source) with memcpy((dest), (source), 2) -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.comReceived on 2012-06-01 15:11:24 CEST |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.