OS/2, eCS & ArcaOS - Technical > Multimedia
AVX safe FFmpeg
Dave Yeo:
--- Quote from: OS4User on February 19, 2021, 07:45:28 pm ---
--- Quote from: Dave Yeo on February 19, 2021, 05:50:28 pm ---You might want to try linking with wl.exe (wlink) as it seems to me the linker handles larger alignment
--- End quote ---
Unfortunately, wlink/wl does not have an option/command to set "between parts alignment" within object.
--- End quote ---
Does it need it? The version I built previously used wl for linking and seemed to align stuff correctly, though I guess maybe a coincidence.
OS4User:
--- Quote from: Dave Yeo on February 19, 2021, 08:56:04 pm ---
--- Quote from: OS4User on February 19, 2021, 07:45:28 pm ---
--- Quote from: Dave Yeo on February 19, 2021, 05:50:28 pm ---You might want to try linking with wl.exe (wlink) as it seems to me the linker handles larger alignment
--- End quote ---
Unfortunately, wlink/wl does not have an option/command to set "between parts alignment" within object.
--- End quote ---
Does it need it? The version I built previously used wl for linking and seemed to align stuff correctly, though I guess maybe a coincidence.
--- End quote ---
Data for AVX instruction can be situated in many places, for .ex - stack, dynamically allocated memory, static vars, etc.
I am speaking about static variables now. Our last GCC is able generate proper .obj files with necessary alignments. But if final data object in LX module is linked from parts (from several files) we can meet and we indeed meet wrong alignment.
Compiler reflects in obj file a demand that it has to be linked with previous file with certain alignment in case current file contains data with specific alignment.
But not in our case. Historically, GCC for OS/2 uses a.out as object format. A.out is not able to carry info about requested alignment to linker that is why we meet wrong alignment in final binary.
The best solution is to use ELF format for objects files (it requested a lot of time for coding and fixing GCC for OS/2). One more way - could be just request from linker to link every data parts with 64 bytes align - but wlink does not have such option/command - so no way here.
Dave Yeo:
There's a new version uploaded to netlabs-exp. To quote,
--- Quote ---I've uploaded a new version 4.2.2-4 to netlabs-exp with -fno-common --disable-avx2 --disable-avx512. Note that I still use --disable-avx2 because of my current assumption that it is not safe to generate AVX2 code w/o a proper alignment support from GCC (see my comment above). I guess that it works for you now just by accident.
Closing this. Please feel free to reopen if the new RPMs don't work for you.
--- End quote ---
untested here.
Igor:
Hi, Dave
This version doesn't work for me...
Failing Instruction
_____________________________________________________________________
1261D064 >DB 0xc5 (c5)
1261D065 CLD (fc)
1261D066 SUB [0x1261cdf0], AH (2825 f0cd6112)
1261D06C DB 0xc5 (c5)
And yet my assemblies are working.
--- Quote from: Dave Yeo on February 27, 2021, 09:01:24 am ---There's a new version uploaded to netlabs-exp. To quote,
--- Quote ---I've uploaded a new version 4.2.2-4 to netlabs-exp with -fno-common --disable-avx2 --disable-avx512. Note that I still use --disable-avx2 because of my current assumption that it is not safe to generate AVX2 code w/o a proper alignment support from GCC (see my comment above). I guess that it works for you now just by accident.
Closing this. Please feel free to reopen if the new RPMs don't work for you.
--- End quote ---
untested here.
--- End quote ---
Igor:
I believe that a successful build with AVX is an accident and I suggest disabling the AVX code until the link is fixed.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version