Ticket #790 (closed defect: fixed)

Opened 2 years ago

Last modified 14 months ago

pulsecore/svolume_arm.c fails to compile for armv5te

Reported by: ao2 Owned by: wtay
Milestone: 0.9.22 Component: core
Keywords: Cc: wim.taymans@…, flokli@…, alexandre.relange@…, arun@…

Description

Hi, I am getting this error when building for armv5te (pxa27x):

 pulsecore/svolume_arm.c: In function 'pa_volume_s16ne_arm':
 pulsecore/svolume_arm.c:53: error: can't find a register in class 'LO_REGS' while reloading 'asm'
 pulsecore/svolume_arm.c:53: error: 'asm' operand has impossible constraints
 make[3]: *** [libpulsecore_0.9.21_la-svolume_arm.lo] Error 1

I am building with -Os but other optimization levels give an error message as well, even if a different one.

It looks like the #if defined(__arm__) used there might not be enough to cover older arm processors which don't support the instructions used in the code.

Here's the complete build log: http://tinderbox.openembedded.net/public/logs/task/5051925.txt

I can supply the needed toolchain to reproduce the error, just let me know.

Thanks,
Antonio Ospite
http://ao2.it

Attachments

Change History

Changed 2 years ago by coling

  • owner changed from lennart to wtay

Changed 16 months ago by flokli

  • cc flokli@… added

I also see build failure on armv5tel-softfloat-linux-gnueabi gcc-4.4.4, glibc-2.11.2-r0, 2.6.36-rc7-00125-gd2a63db armv5tel

in file pulsecore/svolume_arm.c with pulseaudio pulseaudio-0.9.21.2-r2.

  CC     libpulsecore_0.9.21_la-svolume_arm.lo
{standard input}: Assembler messages:
{standard input}:34: Error: selected processor does not support `ssat r0,#16,r0'
{standard input}:48: Error: selected processor does not support `ssat r2,#16,r2'
{standard input}:49: Error: selected processor does not support `ssat r3,#16,r3'
{standard input}:50: Error: selected processor does not support `pkhbt r0,r3,r2,LSL#16'
{standard input}:66: Error: selected processor does not support `ssat r2,#16,r2'
{standard input}:67: Error: selected processor does not support `ssat r3,#16,r3'
{standard input}:68: Error: selected processor does not support `ssat r4,#16,r4'
{standard input}:69: Error: selected processor does not support `ssat r5,#16,r5'
{standard input}:70: Error: selected processor does not support `pkhbt r0,r3,r2,LSL#16'
{standard input}:71: Error: selected processor does not support `pkhbt r1,r5,r4,LSL#16'
make[3]: *** [libpulsecore_0.9.21_la-svolume_arm.lo] Error 1

pasted build logs (link from ao2 doesn't work anymore) for -O2 http://pastebin.com/PTs1we1s

and -Os http://pastebin.com/zSau03SJ

Having pulseaudio running on this device would be very nice (I want to use it as a "music jukebox" with network sound)

Will test patches and stuff if needed :-)

Changed 16 months ago by dromi

  • cc alexandre.relange@… added

You should be able to compile for a "generic" ARM architecture. It will compile this ARMv6 assembly code but it should not be called on an ARMv5 processor. But since you want to test some patches, here are they ;) The two patches do the same, ie they remove this ARMv6 code if you compile for an ARMv5 specific architecture. In the first one, I use a macro that was created elsewhere but whose name is not explicit at all. The second one is a bit cleaner since the macro is renamed. I have tested the first one, not the second one. Any kind of feedback is welcome !

Changed 16 months ago by flokli

Thanks for your patches! I applied the second one to the source code, and it compiled well on this device (see http://pastebin.com/aj7VrDDm). However, there are some ugly autoconf warnings...

Will now test a build of pulseaudio with network/avahi support and post results...

Changed 16 months ago by flokli

Ok I tested it, it works! I will need to experiment a bit with resampling methods and such because sound sometimes is stuttering (cpu a bit weak), but all in all everything works like it should :-)

Can you commit this patch so that it will be in the next release?

Changed 14 months ago by Ford_Prefect

Changed 14 months ago by Ford_Prefect

Changed 14 months ago by Ford_Prefect

  • cc arun@… added

Erf, attached the same patch twice by mistake. Sorry about the spam.

Anyway, I think overloading the atomic instructions check for this purpose is bad. Attaching a patch that checks for the specific instructions that we are interested in (ssay, pkhbt).

Unfortunately, I don't have a root I can test a full build in, so would appreciate feedback from someone who can test this.

Changed 14 months ago by Ford_Prefect

Patch has been tested on v5 and v6 targets (https://bugs.gentoo.org/show_bug.cgi?id=294599), so should be good to push to master and stable-queue.

Changed 14 months ago by coling

  • status changed from new to closed
  • resolution set to fixed

OK, applied in my tree. Will go in next time I push (which will be a few days due to version discussion)

Note: See TracTickets for help on using tickets.