Compiling without SSE2 - possible?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
MonoksideC Offline
Junior Member
Posts: 16
Joined: Jun 2008
Reputation: 0
Question  Compiling without SSE2 - possible?
Post: #1
I have an Athlon XP 3000+ processor, which doesn't support SSE2 instructions. XBMC is compiled with SSE2 enabled, which causes the app to crash with "Illegal Instruction" on startup.

I have synced to the latest code, disabled SSE2 in all projects (under C/C++ -> Code Generation -> Enable Enhanced Instruction Set), and recompiled.. but no luck. If I choose SSE only (no SSE2), the app crashes at a different spot, but it is still on an SSE2 instruction. If I choose "not set", the app again crashes at a completely different offset but again - on an SSE2 instruction.

I couldn't find any inline assembly in the source that used any SSE2 instructions - is there something that I'm missing?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,229
Joined: Oct 2003
Reputation: 177
Post: #2
Possibly in one of the compiled libs or dll's ?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
DragonFly Offline
Senior Member
Posts: 212
Joined: Jun 2008
Reputation: 0
Location: The Netherlands
Post: #3
MonoksideC Wrote:I have an Athlon XP 3000+ processor, which doesn't support SSE2 instructions. XBMC is compiled with SSE2 enabled, which causes the app to crash with "Illegal Instruction" on startup.

I'll second that. I've XBMC running fine on several machines. However I'd like it to run on my HTPC's which all have "old" processors. These CPU's don't have the SSE2 intructionset but do have compatible video cards (> opengl 1.5)

XBMC doesn’t even crash on these machine’s it just doesn’t start at all.

XBMC doesn't need that much power to run smoothly (SD content), so please make a non SSE2 version available….
find quote
DragonFly Offline
Senior Member
Posts: 212
Joined: Jun 2008
Reputation: 0
Location: The Netherlands
Post: #4
This is what I get when I run it through Dependeny Walker

Code:
DllMain(0x62E40000, DLL_PROCESS_ATTACH, 0x0012FD30) in "SDL_IMAGE.DLL" called.
DllMain(0x62E40000, DLL_PROCESS_ATTACH, 0x0012FD30) in "SDL_IMAGE.DLL" returned 1 (0x1).
GetProcAddress(0x7C800000 [KERNEL32.DLL], "FlsAlloc") called from "XBMC.EXE" at address 0x007E3FF2 and returned NULL. Error: Kan opgegeven procedure niet vinden (127).
GetProcAddress(0x7C800000 [KERNEL32.DLL], "FlsGetValue") called from "XBMC.EXE" at address 0x007E3FFF and returned NULL. Error: Kan opgegeven procedure niet vinden (127).
GetProcAddress(0x7C800000 [KERNEL32.DLL], "FlsSetValue") called from "XBMC.EXE" at address 0x007E400C and returned NULL. Error: Kan opgegeven procedure niet vinden (127).
GetProcAddress(0x7C800000 [KERNEL32.DLL], "FlsFree") called from "XBMC.EXE" at address 0x007E4019 and returned NULL. Error: Kan opgegeven procedure niet vinden (127).
GetProcAddress(0x7C800000 [KERNEL32.DLL], "EncodePointer") called from "XBMC.EXE" at address 0x007E3B5E and returned 0x7C913917.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "EncodePointer") called from "XBMC.EXE" at address 0x007E3B5E and returned 0x7C913917.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "EncodePointer") called from "XBMC.EXE" at address 0x007E3B5E and returned 0x7C913917.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "EncodePointer") called from "XBMC.EXE" at address 0x007E3B5E and returned 0x7C913917.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "EncodePointer") called from "XBMC.EXE" at address 0x007E3B5E and returned 0x7C913917.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "EncodePointer") called from "XBMC.EXE" at address 0x007E3B5E and returned 0x7C913917.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "EncodePointer") called from "XBMC.EXE" at address 0x007E3B5E and returned 0x7C913917.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "DecodePointer") called from "XBMC.EXE" at address 0x007E3BD9 and returned 0x7C91393D.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "DecodePointer") called from "XBMC.EXE" at address 0x007E3BD9 and returned 0x7C91393D.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "EncodePointer") called from "XBMC.EXE" at address 0x007E3CEA and returned 0x7C913917.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "DecodePointer") called from "XBMC.EXE" at address 0x007E3CFA and returned 0x7C91393D.
GetProcAddress(0x7C800000 [KERNEL32.DLL], "IsProcessorFeaturePresent") called from "XBMC.EXE" at address 0x007E60F1 and returned 0x7C80ACB2.
Second chance exception 0xC000001D ([b]Illegal Instruction[/b]) occurred in "XBMC.EXE" at address 0x0054E8D9.
Exited "XBMC.EXE" (process 0x64C) with code -1073741795 (0xC000001D).
Entrypoint reached. All implicit modules have been loaded..
find quote
MonoksideC Offline
Junior Member
Posts: 16
Joined: Jun 2008
Reputation: 0
Post: #5
jmarshall Wrote:Possibly in one of the compiled libs or dll's ?

This is what I had thought, but I'm not exactly sure how to track down which one it could be.

The debugger shows that the offset is in XBMC.EXE, and I assumed that if it were in a DLL it would show the name in the call stack. I'm not that familiar with developing stuff with unmanaged languages though so I don't know if that's how it works.
find quote
marlboroman1 Offline
Fan
Posts: 315
Joined: Aug 2007
Reputation: 0
Post: #6
I have Athlon XP 3000+ processor I have not the encountered these problems ether compiling or running. Unless some 3000+ have support for SSE2 and some don't? other wise your gpu drivers are more likely to be the issue.
find quote
MonoksideC Offline
Junior Member
Posts: 16
Joined: Jun 2008
Reputation: 0
Post: #7
All the info I've come across says that the first amd to support SSE2 was the Athlon 64, whereas the first intel chip was the P4. I can't guarantee the accuracy of that though - you know how it is when it comes to info on the web. As far as GPU drivers, I have a Radeon x1650 512mb with the latest cats, so unless something went crazy during the install, it doesn't seem like it would be that.

I have had XBMC crash on CVTPS2PD, MOVSD, and MOVDQ2Q instructions, which are all in the SSE2 instruction set according to http://en.wikipedia.org/wiki/X86_instruction_listings. It is always during startup, after the XBMC splash screen has been displayed. (On my custom compiles anyway.. it crashes without even showing the splash with the official releases.)
find quote
marlboroman1 Offline
Fan
Posts: 315
Joined: Aug 2007
Reputation: 0
Post: #8
You have being doing your research mine is the amd 3000+ 64 bit version I thuort they were all 64 bit. So it look like bad ill informed, advice from me today Laugh

have you try the latest build as they have made some changes that helped for me at least. I don't suppose that trying a few different gpu drivers would do any harm.

As I think you already Identified the problem unless changes are made to the code it doesn't look good. If you do a good job of promoting this issue hopefully a fix can be found and sorry I couldn't be of more help.

As the team already support a low powered platform in the xbox they may feel that their is little advantage of using older pc over the xbox but for people without a HD TV I think there is.

With the increasing popularity of H264 Encoders means a lot of standard definition content is now being encoded using these codecs. Presumably for a better compression ratio were as HD content is yet to really take off. So were as the xbox can't decode these SD encodings a pc with 1.5 - 2.0 GhZ processor won't break a sweat. For me the big plus is having access to firefox, a torrent client, text editor and other pc tools.

Additionally XBMC is way cool so if you have an old pc there isn't a better media player and after using it you don't wont to use any thing else.
find quote
chadoe Offline
Team-XBMC Developer
Posts: 628
Joined: Nov 2003
Reputation: 0
Location: Home
Post: #9
libsqlite, cximage-6.0 (imagelib.dll) and libfaad2 (libfaad.dll) are also compiled with sse2, there are other libs/dlls compiled with mingw but i don't know what options have been used.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
WiSo Offline
Team-Kodi Developer
Posts: 2,742
Joined: Oct 2003
Reputation: 0
Location: Germany
Post: #10
The options for the mingw compiled libraries are in the build scripts and they use no special flags and taking the default values afaik. They might differ between the libs though.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
DragonFly Offline
Senior Member
Posts: 212
Joined: Jun 2008
Reputation: 0
Location: The Netherlands
Post: #11
Charly Wrote:libsqlite, cximage-6.0 (imagelib.dll) and libfaad2 (libfaad.dll) are also compiled with sse2.

The above mention libraries aren't even called yet from XBMC when the "illegal instruction" occurs. This is shown by Sysinternals' filemon.exe as well as Dependency Walker.

Only the "sdl.dll" and the "glew32.dll" are called from XBMC. It's either these two libraries or XBMC itself which causes the error.
find quote
chadoe Offline
Team-XBMC Developer
Posts: 628
Joined: Nov 2003
Reputation: 0
Location: Home
Post: #12
DragonFly Wrote:The above mention libraries aren't even called yet from XBMC when the "illegal instruction" occurs. This is shown by Sysinternals' filemon.exe as well as Dependency Walker.

Only the "sdl.dll" and the "glew32.dll" are called from XBMC. It's either these two libraries or XBMC itself which causes the error.
Well I said also. MonoksideC already compiled the main projects without sse2. I don't know if the sdl-people compile their dll's with sse2.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
DragonFly Offline
Senior Member
Posts: 212
Joined: Jun 2008
Reputation: 0
Location: The Netherlands
Post: #13
No flame intended. Only trying to narrow down the problem. So that the devs may come up with a solution.

Seem that on a SSE2 Cpu "IsProcessorFeaturePresent" is called from a different address

SSE2:
Code:
GetProcAddress(0x7C800000 [KERNEL32.DLL], "IsProcessorFeaturePresent") called from "XBMC.EXE" at address [b][i]0x007D5D11[/i][/b] and returned 0x7C80ACB2.
GetProcAddress(0x71A30000 [WS2_32.DLL], "accept") called from "WS2_32.DLL" at address 0x71A36F7E and returned 0x71A41028.
GetProcAddress(0x71A30000 [WS2_32.DLL], "bind") called from "WS2_32.DLL" at address 0x71A36F7E and returned 0x71A33E00.

SSE:
Code:
GetProcAddress(0x7C800000 [KERNEL32.DLL], "IsProcessorFeaturePresent") called from "XBMC.EXE" at address [b][i]0x007E60F1[/i][/b] and returned 0x7C80ACB2.
Second chance exception 0xC000001D (Illegal Instruction) occurred in "XBMC.EXE" at address 0x0054E8D9.
Exited "XBMC.EXE" (process 0x64C) with code -1073741795 (0xC000001D).


On the SSE2 "WS2_32.dll" is subsequently loaded, as on the SSE XBMC crashes.
find quote