In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
28 bytes removed ,  06:21, 15 November 2009
m
Corrected spelling errors
Line 28: Line 28:  
</tt>
 
</tt>
   −
An integer value of 12 can also be specified as 0x0C in hexadecimal or 0b001100 in binary.
+
An integer value of 12 can also be specified as 0x0C in hexadecimal or01100 in binary.
      Line 291: Line 291:  
Example: cmp 7,0,3,4
 
Example: cmp 7,0,3,4
   −
This will compare the sigend contents of the GPR3 and GPR4 registers and set the CR7 field of the CR register accordingly. The second parameter -L- has to be set to zero for 32bit processors.
+
This will compare the signed contents of the GPR3 and GPR4 registers and set the CR7 field of the CR register accordingly. The second parameter has to be set to zero for 32bit processors.
   −
If <nowiki>rA<rB then bit 0 of CR7 will be set. If rA>rB</nowiki> then bit 1 of CR7 will be set. If rA=rB then bit 2 of CR7 will be set.
+
Ifwiki>rA<rB then bit 0 of CR7 will be set. If rA>rB</nowiki> then bit 1 of CR7 will be set. If rA=rB then bit 2 of CR7 will be set.
      Line 302: Line 302:  
Example: cmpi 7,0,3,4
 
Example: cmpi 7,0,3,4
   −
This will compare the sigend contents of the GPR3 register with the value 4 and set the CR7 field of the CR register accordingly. The second parameter -L- has to be set to zero for 32bit processors.
+
This will compare the signed contents of the GPR3 register with the value 4 and set the CR7 field of the CR register accordingly. The second parameter has to be set to zero for 32bit processors.
    
If rA<4 then bit 0 of CR7 will be set. If rA>4 then bit 1 of CR7 will be set. If rA=4 then bit 2 of CR7 will be set.
 
If rA<4 then bit 0 of CR7 will be set. If rA>4 then bit 1 of CR7 will be set. If rA=4 then bit 2 of CR7 will be set.
Line 435: Line 435:       −
The PowerPC stores the data in big-endian format. So if you have a value of 31 which is 0b00011111 and you want to clear the lower two bits you have to AND this with a mask of 0,29. Then bits 30 and 31 are set to zero in the mask and these bits will be cleared in the value of 31. The result will then be 0b00011100 or 28.
+
The PowerPC stores the data in big-endian format. So if you have a value of 31 which is0011111 and you want to clear the lower two bits you have to AND this with a mask of 0,29. Then bits 30 and 31 are set to zero in the mask and these bits will be cleared in the value of 31. The result will then be0011100 or 28.
      Line 445: Line 445:  
rlwinm 3,3,0,24,24  
 
rlwinm 3,3,0,24,24  
   −
will clear all bits except bit 24 (big-endian format) in register GPR3. So register GPR3 will then contain 128 or 0b010000000.
+
will clear all bits except bit 24 (big-endian format) in register GPR3. So register GPR3 will then contain 128 or10000000.
     
17

edits

Navigation menu