NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-arm/49337: __popcountsi2() triggers illegal instruction
The following reply was made to PR port-arm/49337; it has been noted by GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: port-arm/49337: __popcountsi2() triggers illegal instruction
Date: Sat, 1 Nov 2014 23:03:19 +0100
This is caused by the additional ld -x -r step during our build of libgcc
object files.
Not very helpfully objdump swaps them for display again, so the output
is confusing and you need to double check with hexdump.
How to reproduce:
create a pop.S file:
.global my__popcountsi2
.hidden my__popcountsi2
.text
my__popcountsi2:
ldr r1, [pc, #52]
mov r2, #0
ldr ip, [pc, #48]
mov r3, r2
and link it into a static binary, then use objdump -D to check:
000103e8 <my__popcountsi2>:
103e8: e59f1034 ldr r1, [pc, #52] ; 10424 <my__popcountsi2+0x3c>
103ec: e3a02000 mov r2, #0
103f0: e59fc030 ldr ip, [pc, #48] ; 10428 <my__popcountsi2+0x40>
103f4: e1a03002 mov r3, r2
Now create a ld -x -r variant of that .o file and link the result into a
static binary, objdump -D again:
000103e8 <my__popcountsi2>:
103e8: e59f1034 ldrcc r9, [r0], #-4069 ; 0xfe5
103ec: e3a02000 eoreq sl, r0, r3, ror #1
103f0: e59fc030 sbccc r9, r0, r5, ror #31
103f4: e1a03002 eorseq sl, r0, #225 ; 0xe1
Martin
Home |
Main Index |
Thread Index |
Old Index