From: Mikko Rasa Date: Sat, 10 Dec 2022 23:18:26 +0000 (+0200) Subject: Add support for SSE3 and SSE4.1 FPUs X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e87f8e48e17754a8413bda66e6da67daf933cee2;p=builder.git Add support for SSE3 and SSE4.1 FPUs --- diff --git a/source/architecture.cpp b/source/architecture.cpp index 58f435d..212f148 100644 --- a/source/architecture.cpp +++ b/source/architecture.cpp @@ -49,6 +49,8 @@ const char *fpus[] = { "387", "x86", "sse", "x86", + "sse3", "x86", + "sse4.1", "x86", "vfpv3", "arm", "neon", "arm", 0 diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index a6e838d..2752ff4 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -305,9 +305,17 @@ Task *GnuCompiler::run(const Target &target) const { if(architecture->get_type()=="x86") { - argv.push_back("-mfpmath="+architecture->get_fpu()); + if(architecture->get_fpu()=="387") + argv.push_back("-mfpmath=387"); + else if(!architecture->get_fpu().compare(0, 3, "sse")) + argv.push_back("-mfpmath=sse"); + if(architecture->get_fpu()=="sse") argv.push_back("-msse2"); + else if(architecture->get_fpu()=="sse3") + argv.push_back("-msse3"); + else if(architecture->get_fpu()=="sse4.1") + argv.push_back("-msse4.1"); } else if(architecture->get_type()=="arm") {