Pattern A |
|
The instruction is converted without any changes.
|
|
|
Pattern B |
|
With GP-Pro EX, variables with different lengths can not be allocated on one instruction. In case that the bit lengths of variables allocated on MOV instruction are different, the convert instruction to match the variable lengths is added and converted.
|
-
|
Before Conversion |
|
|
Variable
|
Variable Type
|
Int_a.B[0]
|
Integer-Type
(Specified Byte)
|
Int_b
|
Integer-Type
|
|
|
- |
After Conversion |
|
1. |
An instruction to copy the data of "Int_a.B[0]" to 8 lower bits "Int08TmpTran(0).B[0]" of the integer variable "Int08TmpTran(0)" is created.
|
2. |
An instruction to copy the data stored in "Int08TmpTran(0)" to the integer variable "Int_b" is created. |
|
|
|
Pattern C |
|
With GP-Pro EX, different types of variables can not be allocated on one instruction. In case that the variable types allocated on MOV instruction are different, the convert instruction to match the variable types is added and converted.
|
- |
Before Conversion (Real → Integer) |
|
|
Variable
|
Variable Type
|
Real_a
|
Real-Type
|
Int_b
|
Integer-Type
|
|
|
- |
After Conversion (Real → Integer) |
|
1. |
An instruction to copy the data of "Real_a" to the real variable "RealTmpTran(0)" temporarily is created.
|
2. |
An instruction to convert the real data copied on "RealTmpTran(0)" to the integer data and copy it on the integer variable "Int_b" is created.
|
|
 |
|
- |
Before Conversion (Integer → Real) |
|
|
Variable
|
Variable Type
|
Int_a
|
Integer-Type
|
Real_b
|
Real-Type
|
|
|
- |
After Conversion (Integer → Real) |
|
1. |
An instruction to convert the integer data of "Int_a" to the real data and copy it on the real variable "RealTmpTran(0)" is created.
|
2. |
The real data stored in "RealTmpTran(0)" is stored in the real variable "Real_b". |
|
 |
|
Pattern D |
|
In case that the variable types allocated on MOV instruction are arrays with same size, the instruction is replaced to another instruction after conversion.
|
- |
Before Conversion |
|
|
Variable
|
Variable Type
|
BitArr_a
|
Bit Array-Type
|
BitArr_b
|
Bit Array-Type
|
|
|
- |
After Conversion |
|
1. |
In case to copy bit arrays with same size, the transfer instruction is replaced to the block transfer (block copy) instruction. |
|
 |
|
|
MEMO |
* |
The integer variable "Int08TmpTran(0)" and the real variable "RealTmpTran(0)" are created automatically when conversion. |
|
|