]> git.tdb.fi Git - builder.git/commitdiff
Add support for SSE3 and SSE4.1 FPUs
authorMikko Rasa <tdb@tdb.fi>
Sat, 10 Dec 2022 23:18:26 +0000 (01:18 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 10 Dec 2022 23:18:26 +0000 (01:18 +0200)
source/architecture.cpp
source/gnucompiler.cpp

index 58f435d51ec10fd8d75cbe777ef0442c8b68c1c4..212f148027d00c5ab4f1465af16dc1bf226d87f5 100644 (file)
@@ -49,6 +49,8 @@ const char *fpus[] =
 {
        "387",   "x86",
        "sse",   "x86",
+       "sse3",  "x86",
+       "sse4.1", "x86",
        "vfpv3", "arm",
        "neon",  "arm",
        0
index a6e838d1e49ea160bf6d320d647fe44ed9be7381..2752ff4ed969db58745094d0d38249c752fa976b 100644 (file)
@@ -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")
                {