Patent ID: 9218171
Filing Date: 2015-12-22
Classification: G06F

Abstract:
1. A computer-implemented method for optimizing a sign assignment instruction for correctly assigning a packed decimal sign including a memory and a processor communicatively coupled to the memory, wherein the processor is configured to perform the steps comprising: detecting a sign assignment instruction having an input operand and an output operand identical in size to each other, the sign assignment instruction operating on an input operand having a packed decimal format, the sign assignment instruction operating to assign a value of zero to a packed decimal data value of the input operand having a value of negative zero; analyzing, based on the detecting, the input operand of the sign assignment instruction detected to determine whether a value of the input operand results from an add or subtract operation and whether the value is greater than the value prior to the operation; based on the analyzing determining that the value of the input operand results from an add or subtract operation and the value is greater than the value prior to the operation in the analyzing step, removing the sign assignment instruction on the condition that the input operand and the output operand of the sign assignment instruction have their addresses identical to each other; determining that the addresses of the input operand and the output operand of the sign assignment instruction are not identical and do not overlap each other; replacing, based on determining that the addresses of the input operand and the output operand of the sign assignment instruction are not identical and do not overlap each other, the sign assignment instruction with a copy instruction for copying the value of the input operand of the sign assignment instruction to a value of the output operand; and based on the analyzing determining at least one of one of that the value of the input operand does not result from an add or subtract operation and that the value is not greater than the value prior to the operation in the analyzing step,