摘要 |
A processor contains a memory and a processing unit. The memory is of a type which loses data upon reading. The processing unit has instructions of a first type and of a second type, each of which, when executed, causes the processing unit to read the data from the memory. Instructions of the first type cause the processing unit to restore the data in the memory after reading, instructions of the second type cause the processing unit not to restore the data after reading. During compilation of a program, it is determined whether a generated instruction that reads data from the location is the last instruction to do so. If so, an instruction of the second type is generated. If not, an instruction of the first type is generated.
|