]> sourceware.org Git - systemtap.git/commitdiff
PR13838:
authorAlice Zhang <alizhang@redhat.com>
Thu, 7 Jan 2021 21:55:05 +0000 (16:55 -0500)
committerAlice Zhang <alizhang@redhat.com>
Wed, 10 Mar 2021 16:46:36 +0000 (11:46 -0500)
- modified dwflpp.cxx so that $fp syntax will be supported
- runtme/loc2c-runtime.h: extended x64_64 register to 24 to allow access of xmm0-xmm7 register.
- testsuite/systemtap.examples/general: update examples, using $fp instead of user_long($fpointer)

dwflpp.cxx
main.cxx
runtime/loc2c-runtime.h
testsuite/buildok/floatingpoint.stp
testsuite/systemtap.examples/general/floatingpoint.stp

index c0107bff75ada3fdc645303ef163eda2585163ca..dcd2275235e428408bbb0cf62a1f3ff54adfff04 100644 (file)
@@ -3969,16 +3969,6 @@ dwflpp::translate_final_fetch_or_store (location_context &ctx,
                            dwarf_type_name(typedie).c_str()), e->tok));
              }
 
-           if (encoding == DW_ATE_float
-               || encoding == DW_ATE_complex_float
-               /* XXX || many others? */)
-             {
-               throw (SEMANTIC_ERROR
-                      (_F("unsupported type (encoding %s) for %s",
-                          lex_cast(encoding).c_str(),
-                          dwarf_type_name(typedie).c_str()), e->tok));
-             }
-
            signed_p = (encoding == DW_ATE_signed
                        || encoding == DW_ATE_signed_char);
          }
index f3a0d983086ce1f3f647446e503e77b91dcbb14c..d8c91f912a2d68c083321709082f9483acaf4712 100644 (file)
--- a/main.cxx
+++ b/main.cxx
@@ -375,11 +375,11 @@ setup_signals (sighandler_t handler)
 
 
 static void
-sdt_benchmark_thread(unsigned long i, double *fpointer, float *fpointer2)
+sdt_benchmark_thread(unsigned long i, double fp1, float fp2)
 {
   PROBE(stap, benchmark__thread__start);
-  *fpointer += 0.0;
-  *fpointer2 += 0.0;
+  fp1 += 0.0;
+  fp2 += 0.0;
   while (i--)
     PROBE1(stap, benchmark, i);
   PROBE(stap, benchmark__thread__end);
@@ -408,7 +408,7 @@ run_sdt_benchmark(systemtap_session& s)
       double f = 2.71828;
       float f2 = 1.41421;
       for (unsigned long i = 0; i < threads; ++i)
-        handles.push_back(thread(sdt_benchmark_thread, loops, &f, &f2));
+        handles.push_back(thread(sdt_benchmark_thread, loops, f, f2));
       for (unsigned long i = 0; i < threads; ++i)
         handles[i].join();
     }
index 0502d5a075aee909f267c581d5a36f7749948602..5709e831d0c5b117bfd345b91e1c919c72b01fe1 100644 (file)
 #define pt_dwarf_register_13(regs) regs->r13
 #define pt_dwarf_register_14(regs) regs->r14
 #define pt_dwarf_register_15(regs) regs->r15
-#define pt_regs_maxno 15
+#define pt_dwarf_register_17(regs) ({uint64_t v; __asm__ __volatile__("movq %%xmm0, %0" : "=r"(v)); v;})
+#define pt_dwarf_register_18(regs) ({uint64_t v; __asm__ __volatile__("movq %%xmm1, %0" : "=r"(v)); v;})
+#define pt_dwarf_register_19(regs) ({uint64_t v; __asm__ __volatile__("movq %%xmm2, %0" : "=r"(v)); v;})
+#define pt_dwarf_register_20(regs) ({uint64_t v; __asm__ __volatile__("movq %%xmm3, %0" : "=r"(v)); v;})
+#define pt_dwarf_register_21(regs) ({uint64_t v; __asm__ __volatile__("movq %%xmm4, %0" : "=r"(v)); v;})
+#define pt_dwarf_register_22(regs) ({uint64_t v; __asm__ __volatile__("movq %%xmm5, %0" : "=r"(v)); v;})
+#define pt_dwarf_register_23(regs) ({uint64_t v; __asm__ __volatile__("movq %%xmm6, %0" : "=r"(v)); v;})
+#define pt_dwarf_register_24(regs) ({uint64_t v; __asm__ __volatile__("movq %%xmm7, %0" : "=r"(v)); v;})
+#define pt_regs_maxno 24
   
 #elif defined __i386__
 
index 30907f8accac766ca5829eff8bb127d30c209529..0178a6d1223e714bd113f972caa7db8c8c6bb5fa 100755 (executable)
@@ -5,9 +5,11 @@
 function printlnfp(a) { println(fp_to_string(a,5)) }
 
 probe process("stap").function("sdt_benchmark_thread") {
-    fp = user_long($fpointer)
+    //i_temp = $i_temp
+    //println(i_temp)
+    fp = $fp1
     printlnfp(fp)
-    fp32 = user_int($fpointer2)
+    fp32 = $fp2
     printlnfp(fp32_to_fp64(fp32))
     exit()
 }
index 3a5df8e630f5245dade6b3d2e7676bc5c2936527..949ce84e4723e80e60e3790fb777ebe7396958cb 100644 (file)
@@ -3,7 +3,7 @@
 function printlnfp(a) { println(fp_to_string(a,5)) }
 
 probe process("stap").function("sdt_benchmark_thread") {
-    a = user_long($fpointer)
+    a = $fp1
     b = string_to_fp("3.14")
     c = long_to_fp(2)
    
This page took 0.03913 seconds and 5 git commands to generate.