Old CPU Regression

Hmm I just rechecked all the methods on https://software.intel.com/sites/landingpage/IntrinsicsGuide/#
and it seems that there are all supported.
So maybe there’s an error on const int pos0 = _mm_cvtsi128_si32(_mm_shuffle_epi32(pos4, _MM_SHUFFLE(0, 0, 0, 0))); ?

So I tried to find an equivalent of _mm_extract_epi32(pos4, 0);

I found this post on https://stackoverflow.com/questions/4360920/whats-the-most-efficient-way-to-load-and-extract-32-bit-integer-values-from-a-1

Going all the way back to SSE2 you have _mm_extract_epi16 (PEXTRW) which can be used to extract any 16 bit element from a 128 bit vector. You would need to call this twice to get the two halves of a 32 bit element.

Maybe it could help ?

Or if we can’t use mixer_sse2.c mayve we can use mixer_sse.c ?

Sorry I don’t know anything about cpu instructions, just trying to see if there are any “obvious” solutions.

If you’re able, add printf ("1\n");, printf (2\n");, etc to the method, to see where it is actually crashing. I wonder if this is a bug in logic, or if it’s hitting a null value or overflowing the data length somehow. If we have to, we could disable SSE optimizations, but I have a feeling this is going to help our performance, especially on CPU-bound platforms (like mobile)

What do I need to do ? Do I just need to rebuild lime or is it more complex ? (seems more complex)
If it’s overly complex, maybe you could send me the lime.dll.

If you don’t think it would be too much trouble, follow the instructions here, it shouldn’t be too bad to set up:

This would be really helpful, because I don’t think I have a system here I could use to reproduce your crash, and I do want to have support for older systems as much as possible :slight_smile:

Thanks ! It was really easy to rebuild lime.

Interesting thing.
With my usual computer, I actually see all the prints in mixer_sse2. So it shouldn’t be a bug in logic.

As you can see, my usual computer supports sse4_1, so shouldn’t it use mixer_sse41.c ?

flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d

Hmm, we compile all four of the SSE source files, but in our header, it looks like we are trying to request SSE, SSE2 and SSE3 only:

EDIT: Are you running Windows?

It looks like we do define it for macOS and Linux:

…actually, I’m confused what will happen on Linux:


Thanks again for your help

Both computers are on Linux.

Do you know if there’s way to “virtualize” my cpu flags ? If we could desactivate flags one by one maybe we could see what causes the problem.

flags that my old computer has that my new computer hasn’t:
lahf_lm kaiser

flags that my new computer has but my old computer hasn’t:

pdpe1gb rdtscp  xtopology nonstop_tsc cpuid  tsc_known_freq  pclmulqdq   smx   sdbg fma  pcid sse4_1
 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single 
 pti ssbd ibrs ibpb stibp    ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed 
 adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves  arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d

I think that it would make sense to take the Linux configuration, and make it consistent. We should update the config-android.h file to enable SSE of some form (SSE2? SSE3?) and fix the -msse flag to match, or we should remove the -msse flag entirely and have SSE disabled. Enabling SSE would be good for performance, but I don’t know what should be the cut-off

What do I need to do to have it work on old computers ? Just remove the -mssse4.1 flag ?

I have installed an ubuntu on qemu , emulated the the intel2duo cpu core and it works on it . n But qemu is seems only to be able to hide cpu flags not disable them.
( you have to install qemu system , quemu user doesn’t work for some other reasons)

PS: Do you still need the printfs for the for intel Core Duo ?

Is there a way to activate sse only for cpu thats use sse ? ( Wasn’t it the objective of having of mixer_ss2c, a mixer _sse41c , etc ?)

For the value of sse, I did a grep on lime
and saw
that open al uses -msse4.1
pixman uses -msse3 and -mssse3
sdl uses -msse2

I think that they should use the same.
And maybe we could have lime flag to choose. My program don’t need to be super optimised, just need to be compatible with older computers. But for some persons it could be different.
Or see if it does really make a difference to activate sse ? are they any benchmarks ?

Thanks for your help, I have just revisited the configuration for SDL, Pixman and OpenAL, and should have them consistently using SSSE3 and lower, but not SSE4.

If you’re using Lime dev, do a git pull and git submodule update before rebuilding. I think this should fix support for you

on the

Intel(R) Core(TM)2 Duo CPU     T7250  @ 2.00GHz

now on lime 7.1.2

it doesn’t open the program anymore , it just says

could not load module lime @ lime_application_create_prime

On 7.1.1 the program could open, and if you played a sound it said.

Thread 4 "F1H5" received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7ffff0ca4700 (LWP 2237)]
0x00007ffff60d695f in Resample_lerp_SSE2 () from ./lime.ndll

On 7.1.1 with only the openal commit it acts like 7.1.2

it doesn’t open the program anymore , it just says

could not load module lime @ lime_application_create_prime

I’ve tried removing


           <compilerflag value="-msse3" unless="rpi" />
            <compilerflag value="-mssse3" unless="rpi" />

but it still the same.

Does someone on the forum have the same cpu or some other older cpu and could help ?

PS: between 7.1.1 and 7.12 I also had to update openfl. I didn’t try old 7.1.1 with old openfl with new openal.
So maybe it’s not openal anymore but openfl the problem?

Hmm , tried with qemu with intel2duo core “emulation” ( it only disables compile flags)
and it seems to work …

Will I have still these problems if I compile for 32 bits instead ?

Have you tried lime test linux -32 yet?

Weren’t able to test it yet. I’ll post the results when I’ll have access to the computer :slight_smile:

I was thinking of buying a computer with the same core and try to see what’s wrong and give you access by teamviewer if ever I don’t find a solution … but then I thought I could maybe buy you/openfl a computer with the same core so that you can see what’s wrong. What do you think ? :slight_smile:

If we had a system locally we could test, then certainly we could help improve this. I am so sorry about the trouble in this! If you wanted to do this, a small system (like a NUC) would be much easier than a large system, but please know that I am not saying you have to do this.

I was thinking about a laptop like this one. But there are other websites than amazon , in which country are you? ( and do you know other websites where we can buy refurbished/old computers ?)

I’m in the US, but I’m trying to think which CPU features we’re looking (or not looking) for. Do you think it is a CPU that does not support SSE4? It looks like the T7250 is supposed to support SSE3?

If we got something, a ThinkPad (maybe there’s another) might be better, but I’m also asking locally if there is a system that might have similar specs