US2006195680A1PendingUtilityA1

Computer instruction value field having an embedded sign

Assignee: IBMPriority: Mar 28, 2003Filed: Apr 18, 2006Published: Aug 31, 2006
Est. expiryMar 28, 2023(expired)· nominal 20-yr term from priority
G06F 9/30167G06F 9/30145
49
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A computer machine instruction is fetched and executed, the machine instruction having a signed field value wherein the signed field value comprises contiguous bit positions 1 -N consisting of a contiguous most significant value contiguous with a contiguous embedded sign field, the embedded sign field contiguous with a contiguous least significant value. Preferably, the sign field is one bit, the contiguous most significant value comprises bit position N and the least significant value comprises bit position 1 wherein N is the least significant bit of the most significant value.

Claims

exact text as granted — not AI-modified
1 . A method comprising: 
 fetching a first machine instruction for execution, the machine instruction defined for computer execution according to a computer architecture, the first machine instruction comprising an opcode field, the first machine instruction associated with a signed field, the signed field consisting of a contiguous signed value, the contiguous signed value consisting of a contiguous first magnitude field adjacent to a sign field, the sign field adjacent to a contiguous second magnitude field;    extracting a magnitude value from the signed value;    extracting a sign indicator from the sign field; and    using the extracted sign indicator and the extracted magnitude value to perform a first function defined by the opcode field.    
   
   
       2 . The method according to  claim 1 , wherein the first machine instruction is a signed displacement machine instruction, the signed displacement machine instruction comprising a signed displacement field, the signed displacement field consisting of the contiguous signed value.  
   
   
       3 . The method according to  claim 1 , wherein the sign field consists of bit position S consisting of said sign indicator wherein the first magnitude field consists of contiguous bit positions  1  through S−1 and the second magnitude field consists of bit positions S+1 through N, wherein the first magnitude field consists of a first magnitude value, wherein the second magnitude field consists of a second magnitude value.  
   
   
       4 . The method according to  claim 1 , wherein the extracting step comprises concatenating the first magnitude value with the second magnitude value to form the magnitude value the second magnitude value consisting of least significant bits of the magnitude value the first magnitude value consisting of most significant bits of the magnitude value.  
   
   
       5 . The method according to  claim 4 , comprising the further steps of: 
 concatenating the sign indicator with the most significant bit position of the magnitude value to form a signed magnitude value; and    using the signed magnitude value in the using step to perform a function defined by the opcode field.    
   
   
       6 . The method according to  claim 5 , comprising the further steps of: 
 obtaining an operand base address from a location specified by an operand base address field of the signed displacement machine instruction;    if the sign indicator is negative, arithmetically subtracting the magnitude value from the operand base address to determine an address of an operand;    if the sign indicator is positive, arithmetically adding the magnitude value to the operand base address to determine the address of the operand; and    performing the function defined by the opcode field, wherein the function uses the operand at the determined address.    
   
   
       7 . The method according to  claim 1 , further comprising the steps of: 
 fetching a second machine instruction for execution, the second machine instruction defined for computer execution according to the computer architecture, the second machine instruction comprising an associated opcode field, the second machine instruction associated with an unsigned field, the unsigned field consisting of a contiguous unsigned value, the contiguous unsigned value consisting of a contiguous third magnitude field;    extracting a third magnitude value from the unsigned displacement value; and    using the extracted third magnitude value to perform a second function defined by the associated opcode field.    
   
   
       8 . The method according to  claim 7 , wherein the first function is the same function as the second function.  
   
   
       9 . The method according to  claim 1 , wherein the first machine instruction defined for the computer architecture is fetched and executed by a central processing unit of an alternate computer architecture, the method comprising the further steps of: 
 interpreting the first machine instruction to identify a predetermined software subroutine for emulating the operation of the first machine instruction, the predetermined software subroutine comprising a plurality of instructions; and    executing the predetermined software subroutine to perform steps of the method for executing the first machine instruction.    
   
   
       10 . A computer program product, the computer program product comprising: 
 a storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:    fetching a first machine instruction for execution, the machine instruction defined for computer execution according to a computer architecture, the first machine instruction comprising an opcode field, the first machine instruction associated with a signed field, the signed field consisting of a contiguous signed value, the contiguous signed value consisting of a contiguous first magnitude field adjacent to a sign field, the sign field adjacent to a contiguous second magnitude field;    extracting a magnitude value from the signed value;    extracting a sign indicator from the sign field; and    using the extracted sign indicator and the extracted magnitude value to perform a first function defined by the opcode field.    
   
   
       11 . The computer program product according to  claim 10 , wherein the first machine instruction is a signed displacement machine instruction, the signed displacement machine instruction comprising a signed displacement field, the signed displacement field consisting of the contiguous signed value.  
   
   
       12 . The computer program product according to  claim 10 , wherein the sign field consists of bit position S consisting of said sign indicator wherein the first magnitude field consists of contiguous bit positions  1  through S−1 and the second magnitude field consists of bit positions S+1 through N, wherein the first magnitude field consists of a first magnitude value, wherein the second magnitude field consists of a second magnitude value.  
   
   
       13 . The computer program product according to  claim 10 , wherein the extracting step comprises concatenating the first magnitude value with the second magnitude value to form the magnitude value the second magnitude value consisting of least significant bits of the magnitude value the first magnitude value consisting of most significant bits of the magnitude value.  
   
   
       14 . The computer program product according to  claim 13 , comprising the further steps of: 
 concatenating the sign indicator with the most significant bit position of the magnitude value to form a signed magnitude value; and    using the signed magnitude value in the using step to perform a function defined by the opcode field.    
   
   
       15 . The computer program product according to  claim 14 , comprising the further steps of: 
 obtaining an operand base address from a location specified by an operand base address field of the signed displacement machine instruction;    if the sign indicator is negative, arithmetically subtracting the magnitude value from the operand base address to determine an address of an operand;    if the sign indicator is positive, arithmetically adding the magnitude value to the operand base address to determine the address of the operand; and    performing the function defined by the opcode field, wherein the function uses the operand at the determined address.    
   
   
       16 . The computer program product according to  claim 10 , further comprising the steps of: 
 fetching a second machine instruction for execution, the second machine instruction defined for computer execution according to the computer architecture, the second machine instruction comprising an associated opcode field, the second machine instruction associated with an unsigned field, the unsigned field consisting of a contiguous unsigned value, the contiguous unsigned value consisting of a contiguous third magnitude field;    extracting a third magnitude value from the unsigned displacement value; and    using the extracted third magnitude value to perform a second function defined by the associated opcode field.    
   
   
       17 . The computer program product according to  claim 16 , wherein the first function is the same function as the second function.  
   
   
       18 . The computer program product according to  claim 10 , wherein the first machine instruction defined for the computer architecture is fetched and executed by a central processing unit of an alternate computer architecture, the computer program product comprising the further steps of: 
 interpreting the first machine instruction to identify a predetermined software subroutine for emulating the operation of the first machine instruction, the predetermined software subroutine comprising a plurality of instructions; and    executing the predetermined software subroutine to perform steps of the method for executing the first machine instruction.    
   
   
       19 . A system, the system comprising: 
 a memory;    a computer system in communication with the memory, the computer system comprising an instruction fetching unit for fetching instructions from memory and one or more execution units for executing fetched instructions;    wherein the computer system includes instructions to execute a method comprising:    fetching a first machine instruction for execution, the machine instruction defined for computer execution according to a computer architecture, the first machine instruction comprising an opcode field, the first machine instruction associated with a signed field, the signed field consisting of a contiguous signed value, the contiguous signed value consisting of a contiguous first magnitude field adjacent to a sign field, the sign field adjacent to a contiguous second magnitude field;    extracting a magnitude value from the signed value;    extracting a sign indicator from the sign field; and    using the extracted sign indicator and the extracted magnitude value to perform a first function defined by the opcode field.    
   
   
       20 . The system according to  claim 19 , wherein the first machine instruction is a signed displacement machine instruction, the signed displacement machine instruction comprising a signed displacement field, the signed displacement field consisting of the contiguous signed value.  
   
   
       21 . The system according to  claim 19 , wherein the sign field consists of bit position S consisting of said sign indicator wherein the first magnitude field consists of contiguous bit positions  1  through S−1 and the second magnitude field consists of bit positions S+1 through N, wherein the first magnitude field consists of a first magnitude value, wherein the second magnitude field consists of a second magnitude value.  
   
   
       22 . The system according to  claim 19 , wherein the extracting step comprises concatenating the first magnitude value with the second magnitude value to form the magnitude value the second magnitude value consisting of least significant bits of the magnitude value the first magnitude value consisting of most significant bits of the magnitude value.  
   
   
       23 . The system according to  claim 22 , comprising the further steps of: 
 concatenating the sign indicator with the most significant bit position of the magnitude value to form a signed magnitude value; and    using the signed magnitude value in the using step to perform a function defined by the opcode field.    
   
   
       24 . The system according to  claim 23 , comprising the further steps of: 
 obtaining an operand base address from a location specified by an operand base address field of the signed displacement machine instruction;    if the sign indicator is negative, arithmetically subtracting the magnitude value from the operand base address to determine an address of an operand;    if the sign indicator is positive, arithmetically adding the magnitude value to the operand base address to determine the address of the operand; and    performing the function defined by the opcode field, wherein the function uses the operand at the determined address.    
   
   
       25 . The system according to  claim 19 , further comprising the steps of: 
 fetching a second machine instruction for execution, the second machine instruction defined for computer execution according to the computer architecture, the second machine instruction comprising an associated opcode field, the second machine instruction associated with an unsigned field, the unsigned field consisting of a contiguous unsigned value, the contiguous unsigned value consisting of a contiguous third magnitude field;    extracting a third magnitude value from the unsigned displacement value; and    using the extracted third magnitude value to perform a second function defined by the associated opcode field.    
   
   
       26 . The system according to  claim 25 , wherein the first function is the same function as the second function.  
   
   
       27 . The system according to  claim 19 , wherein the first machine instruction defined for the computer architecture is fetched and executed by a central processing unit of an alternate computer architecture, the system comprising the further steps of: 
 interpreting the first machine instruction to identify a predetermined software subroutine for emulating the operation of the first machine instruction, the predetermined software subroutine comprising a plurality of instructions; and    executing the predetermined software subroutine to perform steps of the method for executing the first machine instruction.

Join the waitlist — get patent alerts

Track US2006195680A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.