Patch for htdocs/hoist.html, bad html

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Mon Jan 4 12:21:00 GMT 1999


Some bad html I, er, spotted for some reason:
"<" to "<", missing "</body>" and "</html>".
(The "<pre>" element does not fix this, "<xmp>" should maybe be
used, but that may be to arcane to be supported by all browsers.)

Index: hoist.html
===================================================================
RCS file: /egcs/carton/cvsfiles/wwwdocs/htdocs/hoist.html,v
retrieving revision 1.2
diff -p -c -r1.2 hoist.html
*** hoist.html	1998/08/19 23:24:26	1.2
--- hoist.html	1999/01/04 20:00:28
*************** function:
*** 22,28 ****
    {
      int i;
  
!     for (i = 0; i < j; ++i)
        *k = *k + 2 * ((*k) - 1);
    }
  </pre>
--- 22,28 ----
    {
      int i;
  
!     for (i = 0; i < j; ++i)
        *k = *k + 2 * ((*k) - 1);
    }
  </pre>
*************** x86 looked like:
*** 34,41 ****
  	leal -2(%eax,%eax,2),%eax  # Compute *k + 2 * ((*k) - 1)
  	movl %eax,(%ecx)           # Store *k
  	incl %edx                  # Increment i
! 	cmpl %ebx,%edx             # Test i < j
! 	jl .L5                     # Loop if i < j
  </pre>
  With the optimization, the code generated for the loop becomes:
  <pre>
--- 34,41 ----
  	leal -2(%eax,%eax,2),%eax  # Compute *k + 2 * ((*k) - 1)
  	movl %eax,(%ecx)           # Store *k
  	incl %edx                  # Increment i
! 	cmpl %ebx,%edx             # Test i < j
! 	jl .L5                     # Loop if i < j
  </pre>
  With the optimization, the code generated for the loop becomes:
  <pre>
*************** With the optimization, the code generate
*** 43,50 ****
  .L5:
  	leal -2(%eax,%eax,2),%eax  # Compute *k + 2 * ((*k) - 1)
  	incl %edx                  # Increment i
! 	cmpl %ecx,%edx             # Test i < j
! 	jl .L5                     # Loop if i < j
  	movl %eax,(%ebx)           # Store *k
  </pre>
  Note that in the second case the loads and stores occur outside the
--- 43,50 ----
  .L5:
  	leal -2(%eax,%eax,2),%eax  # Compute *k + 2 * ((*k) - 1)
  	incl %edx                  # Increment i
! 	cmpl %ecx,%edx             # Test i < j
! 	jl .L5                     # Loop if i < j
  	movl %eax,(%ebx)           # Store *k
  </pre>
  Note that in the second case the loads and stores occur outside the
*************** be loaded into a register, and the sum w
*** 74,79 ****
  After the loop is complete, the value will be stored back to memory.
  
  <hr>
! <i>Last modified on August 19, 1998.</i>
! 
! 
--- 74,79 ----
  After the loop is complete, the value will be stored back to memory.
  
  <hr>
! <i>Last modified on Jan 4, 1999.</i>
! </body>
! </html>

brgds, H-P



More information about the Gcc-patches mailing list