[PATCH] D29031: [mips] Add support for static model on N64
This revision was automatically updated to reflect the committed changes. Closed by commit rL293285: [mips] Add support for static model on N64 (authored by sdardis). Changed prior to commit: https://reviews.llvm.org/D29031?vs=85388&id=86047#toc Repository: rL LLVM https://reviews.llvm.org/D29031 Files: cfe/trunk/lib/Driver/ToolChains.cpp cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/mips-as.c Index: cfe/trunk/test/Driver/mips-as.c === --- cfe/trunk/test/Driver/mips-as.c +++ cfe/trunk/test/Driver/mips-as.c @@ -21,17 +21,32 @@ // MIPS32R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EL" // // RUN: %clang -target mips64-linux-gnu -### \ -// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: -no-integrated-as -fno-pic -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS64R2-EB-AS %s -// MIPS64R2-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EB" +// MIPS64R2-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-EB" // -// RUN: %clang -target mips64el-linux-gnu -### \ +// RUN: %clang -target mips64-linux-gnu -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS64R2-EB-AS-PIC %s +// MIPS64R2-EB-AS-PIC: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB" "-KPIC" +// +// RUN: %clang -target mips64el-linux-gnu -### \ +// RUN: -no-integrated-as -c -fno-pic %s 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS64R2-DEF-EL-AS %s -// MIPS64R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL" +// MIPS64R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-EL" +// +// RUN: %clang -target mips64el-linux-gnu -### \ +// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS64R2-DEF-EL-AS-PIC %s +// MIPS64R2-DEF-EL-AS-PIC: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL" "-KPIC" // // RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS-N32-PIC %s +// MIPS-N32-PIC: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-call_nonpic" "-EB" "-KPIC" +// +// RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \ +// RUN: -no-integrated-as -c %s -fno-pic 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-N32 %s // MIPS-N32: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-mno-shared" "-call_nonpic" "-EB" // @@ -45,8 +60,13 @@ // // RUN: %clang -target mips64el-linux-gnu -mabi=64 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS64R2-EL-AS-PIC %s +// MIPS64R2-EL-AS-PIC: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL" "-KPIC" +// +// RUN: %clang -target mips64el-linux-gnu -mabi=64 -### \ +// RUN: -no-integrated-as -c %s -fno-pic 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS64R2-EL-AS %s -// MIPS64R2-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL" +// MIPS64R2-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-EL" // // RUN: %clang -target mips-linux-gnu -march=mips32r2 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ @@ -60,8 +80,13 @@ // // RUN: %clang -target mips64-linux-gnu -march=octeon -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS-OCTEON-PIC %s +// MIPS-OCTEON-PIC: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-EB" "-KPIC" +// +// RUN: %clang -target mips64-linux-gnu -march=octeon -### \ +// RUN: -no-integrated-as -c %s -fno-pic 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-OCTEON %s -// MIPS-OCTEON: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-mno-shared" "-KPIC" "-EB" +// MIPS-OCTEON: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-mno-shared" "-EB" // // RUN: %clang -target mips-linux-gnu -mips1 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ @@ -115,28 +140,48 @@ // // RUN: %clang -target mips64-linux-gnu -mips64 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64-PIC %s +// MIPS-ALIAS-64-PIC: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB" "-KPIC" +// +// RUN: %clang -target mips64-linux-gnu -mips64 -### \ +// RUN: -no-integrated-as -c -fno-pic %s 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-ALIAS-64 %s -// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-KPIC" "-EB" +// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-EB" // // RUN: %clang -target mips64-linux-gnu -mips64r2 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s -// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EB" +// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R2-PIC %s +// MIPS-ALIAS-64R2-PIC: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB" "-KPIC" // // RUN: %clang -target
[PATCH] D29031: [mips] Add support for static model on N64
slthakur accepted this revision. slthakur added a comment. LGTM Repository: rL LLVM https://reviews.llvm.org/D29031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D29031: [mips] Add support for static model on N64
sdardis added a comment. @slthakur can you take a look at this too? Thanks, Simon Repository: rL LLVM https://reviews.llvm.org/D29031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D29031: [mips] Add support for static model on N64
seanbruno accepted this revision. seanbruno added a comment. This revision is now accepted and ready to land. From a "does this work" perspective, FreeBSD compiles are better now with this in place. Repository: rL LLVM https://reviews.llvm.org/D29031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D29031: [mips] Add support for static model on N64
sdardis created this revision. The patch teaches the Clang driver how to handle the N64 static relocation model properly. It enforces the correct target feature (+noabicalls) when -fno-pic is used. This is required as non-pic N64 code as the abi extension to call PIC code (CPIC) is unsupported. Make PIC the default for mips64 and mips64el, this affects both N32 & N64 ABIs, to better match GCC. As part of this effort, clean up the assembler invocation command builder, so the correct flags are used. Repository: rL LLVM https://reviews.llvm.org/D29031 Files: lib/Driver/ToolChains.cpp lib/Driver/Tools.cpp test/Driver/mips-as.c Index: test/Driver/mips-as.c === --- test/Driver/mips-as.c +++ test/Driver/mips-as.c @@ -21,17 +21,32 @@ // MIPS32R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EL" // // RUN: %clang -target mips64-linux-gnu -### \ -// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: -no-integrated-as -fno-pic -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS64R2-EB-AS %s -// MIPS64R2-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EB" +// MIPS64R2-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-EB" // -// RUN: %clang -target mips64el-linux-gnu -### \ +// RUN: %clang -target mips64-linux-gnu -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS64R2-EB-AS-PIC %s +// MIPS64R2-EB-AS-PIC: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB" "-KPIC" +// +// RUN: %clang -target mips64el-linux-gnu -### \ +// RUN: -no-integrated-as -c -fno-pic %s 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS64R2-DEF-EL-AS %s -// MIPS64R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL" +// MIPS64R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-EL" +// +// RUN: %clang -target mips64el-linux-gnu -### \ +// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS64R2-DEF-EL-AS-PIC %s +// MIPS64R2-DEF-EL-AS-PIC: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL" "-KPIC" // // RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS-N32-PIC %s +// MIPS-N32-PIC: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-call_nonpic" "-EB" "-KPIC" +// +// RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \ +// RUN: -no-integrated-as -c %s -fno-pic 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-N32 %s // MIPS-N32: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-mno-shared" "-call_nonpic" "-EB" // @@ -45,8 +60,13 @@ // // RUN: %clang -target mips64el-linux-gnu -mabi=64 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS64R2-EL-AS-PIC %s +// MIPS64R2-EL-AS-PIC: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL" "-KPIC" +// +// RUN: %clang -target mips64el-linux-gnu -mabi=64 -### \ +// RUN: -no-integrated-as -c %s -fno-pic 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS64R2-EL-AS %s -// MIPS64R2-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL" +// MIPS64R2-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-EL" // // RUN: %clang -target mips-linux-gnu -march=mips32r2 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ @@ -60,8 +80,13 @@ // // RUN: %clang -target mips64-linux-gnu -march=octeon -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS-OCTEON-PIC %s +// MIPS-OCTEON-PIC: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-EB" "-KPIC" +// +// RUN: %clang -target mips64-linux-gnu -march=octeon -### \ +// RUN: -no-integrated-as -c %s -fno-pic 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-OCTEON %s -// MIPS-OCTEON: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-mno-shared" "-KPIC" "-EB" +// MIPS-OCTEON: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-mno-shared" "-EB" // // RUN: %clang -target mips-linux-gnu -mips1 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ @@ -115,28 +140,48 @@ // // RUN: %clang -target mips64-linux-gnu -mips64 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64-PIC %s +// MIPS-ALIAS-64-PIC: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB" "-KPIC" +// +// RUN: %clang -target mips64-linux-gnu -mips64 -### \ +// RUN: -no-integrated-as -c -fno-pic %s 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-ALIAS-64 %s -// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-KPIC" "-EB" +// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-EB" // // RUN: %clang -target mips64-linux-gnu -mips64r2 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s -// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno