[PATCH 02/12] testsuite: add support for mips64 build flags

Marcin Nowakowski marcin.nowakowski@imgtec.com
Tue Oct 11 08:15:00 GMT 2016


Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
---
 testsuite/lib/compile_flags.exp          | 3 ++-
 testsuite/lib/systemtap.exp              | 1 +
 testsuite/systemtap.context/num_args.stp | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/testsuite/lib/compile_flags.exp b/testsuite/lib/compile_flags.exp
index 431d646..dd8d584 100644
--- a/testsuite/lib/compile_flags.exp
+++ b/testsuite/lib/compile_flags.exp
@@ -35,6 +35,7 @@ proc arch_compile_flag_name { INDEX } {
     switch -regexp $::tcl_platform(machine) {
       {^(ia64|aarch64|ppc64le)$} { return "m64" }
       {^s390$} { return "m31" }
+      {^mips64$} { return "64" }
       default { return "m32" }
     }
   }
@@ -61,7 +62,7 @@ proc arch_compile_flag_bits { INDEX } {
   # Notice that even though s390/s390x is 31 bits, we'll call it 32.
   if { [arch_compile_flags] == 1 } {
     switch -regexp $::tcl_platform(machine) {
-      {^(ia64|aarch64|ppc64le)$} { return 64 }
+      {^(ia64|aarch64|ppc64le|mips64)$} { return 64 }
       default { return 32 }
     }
   }
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index 99c150f..358d61b 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -458,6 +458,7 @@ proc normalize_arch { arch } {
     if {$arch == "armv7lh"} then {return "arm"}
     if {$arch == "aarch64"} then {return "arm64"}
     if {$arch == "ppc64le"} then {return "powerpc"}
+    if {$arch == "mips64"} then {return "mips"}
     return $arch
 }
 
diff --git a/testsuite/systemtap.context/num_args.stp b/testsuite/systemtap.context/num_args.stp
index e261004..bc6eca2 100644
--- a/testsuite/systemtap.context/num_args.stp
+++ b/testsuite/systemtap.context/num_args.stp
@@ -4,6 +4,7 @@
 %( arch == "s390" %? global ir = "r2", lr = "r2" %)
 %( arch == "arm" %? global ir = "r0", lr = "r0" %)
 %( arch == "arm64" %? global ir = "x0", lr = "x0" %)
+%( arch == "mips" %? global ir = "v0", lr = "v0" %)
 
 # On s390/s390x, when in a syscall, the 1st argument is in the
 # orig_gpr2 register. If you aren't in a syscall, the 1st argument is
-- 
2.7.4



More information about the Systemtap mailing list