[llvm-commits] CVS: reopt/lib/LightWtProfiling/SLI.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Fri Mar 5 00:44:03 PST 2004


Changes in directory reopt/lib/LightWtProfiling:

SLI.cpp updated: 1.15 -> 1.16

---
Log message:

Disassemble and comment machine code

---
Diffs of the changes:  (+38 -18)

Index: reopt/lib/LightWtProfiling/SLI.cpp
diff -u reopt/lib/LightWtProfiling/SLI.cpp:1.15 reopt/lib/LightWtProfiling/SLI.cpp:1.16
--- reopt/lib/LightWtProfiling/SLI.cpp:1.15	Tue Feb 10 13:17:01 2004
+++ reopt/lib/LightWtProfiling/SLI.cpp	Fri Mar  5 00:43:10 2004
@@ -252,15 +252,25 @@
   std::vector<BasicBlock *> vBB;
   getTrace(root, vBB, backward);
 
-  unsigned int initial_code[] = {0x83663001};//0x82102001//move 1 to g1
-  unsigned int call_code[] = {0xc277a7ef, 0xc25fa7ef, 0xde77a7f7, 0xde5fa7f7}; 
-  //save g1, restore g1, save o7, restore o7
-  unsigned int succ0_code[] = {0x83286001, 0x82106001}; //shift g1, or g1 with 1
-  unsigned int succ1_code[] = {0x83286001, NOP}; //shift g1
-  unsigned int loop_top_code[] = {CALL, NOP};
-  //{0xd077A7F7, 0x91661001, CALL, 0xd05fA7F7};
-  //spill o0, g7->o0, call, unspill o0 0x90104000
-  unsigned int exit_code[] = {CALL, NOP};//call llvm_time_end
+  uint32_t initial_code[] = {
+    0x83663001}; // mova  %xcc, 1, %g1          ! Move Always 1 into g1
+  uint32_t call_code[] = {
+	0xc277a7ef,  // stx   %g1, [ %fp + 0x7ef ]  ! Save g1 on stack
+	0xc25fa7ef,  // ldx   [ %fp + 0x7ef ], %g1  ! Restore g1 from stack
+	0xde77a7f7,  // stx   %o7, [ %fp + 0x7f7 ]  ! Save o7 on stack
+	0xde5fa7f7}; // ldx   [ %fp + 0x7f7 ], %o7  ! Restore o7 from stack
+  uint32_t succ0_code[] = {
+    0x83286001,  // sll   %g1, 1, %g1           ! Shift g1 left by 1
+    0x82106001}; // or    %g1, 1, %g1           ! Bitwise-or g1 with 1
+  uint32_t succ1_code[] = {
+    0x83286001,  // sll   %g1, 1, %g1           ! Shift g1 left by 1
+    NOP};        // nop
+  uint32_t loop_top_code[] = {
+    CALL,        // call  0
+    NOP};        // nop
+  uint32_t exit_code[] = {
+    CALL,        // call  0
+    NOP};        // nop
 
   std::map<int, uint64_t> callMap;
   std::map<int, uint64_t> branchMap;
@@ -456,15 +466,25 @@
   std::map<BasicBlock *, Color> color;
   doTraceDFSForFunction(root, vBB, color);
 
-  unsigned int initial_code[] = {0x83663001};//0x82102001//move 1 to g1
-  unsigned int call_code[] = {0xc277a7ef, 0xc25fa7ef, 0xde77a7f7, 0xde5fa7f7}; 
-  //save g1, restore g1, save o7, restore o7
-  unsigned int succ0_code[] = {0x83286001, 0x82106001}; //shift g1, or g1 with 1
-  unsigned int succ1_code[] = {0x83286001, NOP}; //shift g1
-  unsigned int loop_top_code[] = {CALL, NOP};
-  //{0xd077A7F7, 0x91661001, CALL, 0xd05fA7F7};
-  //spill o0, g7->o0, call, unspill o0 0x90104000
-  unsigned int exit_code[] = {CALL, NOP};//call llvm_time_end
+  uint32_t initial_code[] = {
+    0x83663001}; // mova  %xcc, 1, %g1          ! Move Always 1 into g1
+  uint32_t call_code[] = {
+    0xc277a7ef,  // stx   %g1, [ %fp + 0x7ef ]  ! Save g1 on stack
+    0xc25fa7ef,  // ldx   [ %fp + 0x7ef ], %g1  ! Restore g1 from stack
+    0xde77a7f7,  // stx   %o7, [ %fp + 0x7f7 ]  ! Save o7 on stack
+    0xde5fa7f7}; // ldx   [ %fp + 0x7f7 ], %o7  ! Restore o7 from stack
+  uint32_t succ0_code[] = {
+    0x83286001,  // sll   %g1, 1, %g1           ! Shift g1 left by 1
+    0x82106001}; // or    %g1, 1, %g1           ! Bitwise-or g1 with 1
+  uint32_t succ1_code[] = {
+    0x83286001,  // sll   %g1, 1, %g1           ! Shift g1 left by 1
+    NOP};        // nop
+  uint32_t loop_top_code[] = {
+    CALL,        // call  0
+    NOP};        // nop
+  uint32_t exit_code[] = {
+    CALL,        // call  0
+    NOP};        // nop
 
   std::map<int, uint64_t> callMap;
   std::map<int, uint64_t> branchMap;





More information about the llvm-commits mailing list