Ticket #229 (new enhancement)

Opened 19 months ago

Last modified 19 months ago

x32 ABI support

Reported by: camper Owned by:
Priority: normal Milestone:
Component: General Version: devel
Severity: minor Keywords: x32
Cc: nikoli@… Platform: Linux

Description

mplayer2 does not support this ABI yet.
Porting is a relatively minor effort in this case

Attachments

0001-x32-add-abi-detection-and-fix-inline-assembly.patch Download (5.2 KB) - added by camper 19 months ago.

Change History

comment:1 follow-up: ↓ 2 Changed 19 months ago by uau

I don't like having MPG123 specific defines in global compiler flags. Why is that needed anyway? If it is needed, it should probably be set in the file including mpg123.h only.

I didn't check the individual asm changes. The defines have some unused stuff. I assume that's because you copied them from Libav patches?

comment:2 in reply to: ↑ 1 Changed 19 months ago by camper

Replying to uau:

I don't like having MPG123 specific defines in global compiler flags. Why is that needed anyway? If it is needed, it should probably be set in the file including mpg123.h only.

Without it I get a linker error
libmpcodecs/ad_mpg123.o: In function `decode_a_bit':
ad_mpg123.c:(.text+0x14d): undefined reference to `mpg123_decode_frame_64'

readelf -s /usr/libx32/libmpg123.so | grep mpg123_decode_frame gives

43: 00020a50 5 FUNC GLOBAL DEFAULT 11 mpg123_decode_frame_32
64: 0000f030 304 FUNC GLOBAL DEFAULT 11 mpg123_decode_frame

From my understanding that means that mpg123 builds without "native" large file support an that platform.

I didn't check the individual asm changes. The defines have some unused stuff. I assume that's because you copied them from Libav patches?

yes. It seems to me to make sense to keep related files somewhat synchronized between related projects.
If thats not your policy, I'll shorten it. Chnages to asm are only necessary in those few places, where the named registers actually have to be 64 bit; in cpudetect.c because the whole of rbx must be saved, and in vf_ilpack.c because push/pop always use 64bit.

comment:3 follow-up: ↓ 4 Changed 19 months ago by uau

That sounds like either mpg123 is buggy or the library you tested against was built wrong. It makes little sense to build anything without largefile support. Is x32 even supposed to have a non-largefile mode (why would it)?

Having the same defines as Libav, even if all are not used, should be OK.

comment:4 in reply to: ↑ 3 Changed 19 months ago by camper

this seems indeed to be a bug in mpg123, I've reported it here
 https://sourceforge.net/p/mpg123/feature-requests/37/
The - DMPG123_NO_LARGENAME-hack is not needed then.

comment:5 Changed 19 months ago by Nikoli

  • Cc nikoli@… added
Note: See TracTickets for help on using tickets.