Skip to contentSkip to conversation

package/sdl2: enable SSE only if it's supported by the target

PATCH New Nicolas Robin 3 participants 10 messages May 15, 2020 – Jul 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/sdl2: enable SSE only if it's supported by the target

---
 package/sdl2/sdl2.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/sdl2/sdl2.mk +6 -0
index 501bb4699d..4a287b66a3 100644
@@ -30,6 +30,12 @@ else
 SDL2_CONF_OPTS += --disable-libudev
 endif
 
+ifeq ($(BR2_X86_CPU_HAS_SSE),y)
+SDL2_CONF_OPTS += --enable-sse
+else
+SDL2_CONF_OPTS += --disable-sse
+endif
+
 ifeq ($(BR2_PACKAGE_SDL2_DIRECTFB),y)
 SDL2_DEPENDENCIES += directfb
 SDL2_CONF_OPTS += --enable-video-directfb
Signature · 1 line
2.24.0
#1 lore raw

PATCH 2/3 arch/x86: adds BR2_X86_CPU_HAS_3DNOW flag

---
 arch/Config.in.x86 | 6 ++++++
 1 file changed, 6 insertions(+)
arch/Config.in.x86 +6 -0
index eb655adbca..7aae3cafb7 100644
@@ -1,6 +1,8 @@
 # i386/x86_64 cpu features
 config BR2_X86_CPU_HAS_MMX
 	bool
+config BR2_X86_CPU_HAS_3DNOW
+	bool
 config BR2_X86_CPU_HAS_SSE
 	bool
 config BR2_X86_CPU_HAS_SSE2
@@ -155,15 +157,18 @@ config BR2_x86_k6_2
 	bool "k6-2"
 	depends on !BR2_x86_64
 	select BR2_X86_CPU_HAS_MMX
+	select BR2_X86_CPU_HAS_3DNOW
 config BR2_x86_athlon
 	bool "athlon"
 	depends on !BR2_x86_64
 	select BR2_X86_CPU_HAS_MMX
+	select BR2_X86_CPU_HAS_3DNOW
 config BR2_x86_athlon_4
 	bool "athlon-4"
 	depends on !BR2_x86_64
 	select BR2_X86_CPU_HAS_MMX
 	select BR2_X86_CPU_HAS_SSE
+	select BR2_X86_CPU_HAS_3DNOW
 config BR2_x86_opteron
 	bool "opteron"
 	select BR2_X86_CPU_HAS_MMX
@@ -209,6 +214,7 @@ config BR2_x86_c3
 	bool "Via/Cyrix C3 (Samuel/Ezra cores)"
 	depends on !BR2_x86_64
 	select BR2_X86_CPU_HAS_MMX
+	select BR2_X86_CPU_HAS_3DNOW
 config BR2_x86_c32
 	bool "Via C3-2 (Nehemiah cores)"
 	depends on !BR2_x86_64
Signature · 1 line
2.24.0
#3 lore raw

PATCH 3/3 package/sdl2: enable 3DNOW only if it's supported by the target

In reply to Nicolas Robin
---
 package/sdl2/sdl2.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/sdl2/sdl2.mk +6 -0
index 4a287b66a3..830873c9e4 100644
@@ -36,6 +36,12 @@ else
 SDL2_CONF_OPTS += --disable-sse
 endif
 
+ifeq ($(BR2_X86_CPU_HAS_3DNOW),y)
+SDL2_CONF_OPTS += --enable-3dnow
+else
+SDL2_CONF_OPTS += --disable-3dnow
+endif
+
 ifeq ($(BR2_PACKAGE_SDL2_DIRECTFB),y)
 SDL2_DEPENDENCIES += directfb
 SDL2_CONF_OPTS += --enable-video-directfb
Signature · 1 line
2.24.0
#5 lore raw

PATCH 1/3 package/sdl2: enable SSE only if it's supported by the target

In reply to Nicolas Robin
Quoted 4 lines · On Fri, 15 May 2020 19:53:55 +0200 Nicolas Robin <[email protected]> wrote:
---
 package/sdl2/sdl2.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Thanks, series applied to next. I'm curious: you're really using SDL2 on some old platform that has 3DNow support ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/3 package/sdl2: enable SSE only if it's supported by the target

I do! Pentium MMX 233MHz, a beast!

Regards,
Nicolas

Quoted 20 lines

Le 15 mai 2020 ? 21:48, Thomas Petazzoni <[email protected]> a ?crit :

Quoted 4 lines · On Fri, 15 May 2020 19:53:55 +0200 Nicolas Robin <[email protected]> wrote:

---
package/sdl2/sdl2.mk | 6 ++++++

1 file changed, 6 insertions(+)

Thanks, series applied to next. I'm curious: you're really using SDL2 on some old platform that has 3DNow support ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 1/3 package/sdl2: enable SSE only if it's supported by the target

Quoted 1 line · On Fri, 15 May 2020 21:55:38 +0200 Nicolas Robin <[email protected]> wrote:

I do! Pentium MMX 233MHz, a beast!

But a Pentium MMX does not have 3DNow.

And anyway, you're using Buildroot to build a system for a Pentium MMX at 233 Mhz ? These machines are still running and alive ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

PATCH 1/3 package/sdl2: enable SSE only if it's supported by the target

SDL2 does have SSE and 3DNOW enabled by default, I have to disable these to avoid illegal instruction on the little Pentium. Buildroot works fine on it, and with the latest kernel :-) I don't know why I do that, I just do it.

Quoted 17 lines

Le 15 mai 2020 ? 22:44, Thomas Petazzoni <[email protected]> a ?crit :

Quoted 1 line · On Fri, 15 May 2020 21:55:38 +0200 Nicolas Robin <[email protected]> wrote:

I do! Pentium MMX 233MHz, a beast!

But a Pentium MMX does not have 3DNow.

And anyway, you're using Buildroot to build a system for a Pentium MMX at 233 Mhz ? These machines are still running and alive ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com