Download CA850 Ver. 3.20 C Compiler Package C Language UM
Transcript
CHAPTER 3 C LANGUAGE EXPANSION #pragma section char unsigned char #pragma section tidata_byte begin a=1; /* allocated to tidata.byte attribute section */ b; /* allocated to tibss.byte attribute section */ tidata_byte end #pragma int short #pragma section a=1; b; section tidata_word begin /* allocated to tidata.word attribute section */ /* allocated to tibss.word attribute section */ tidata_word end #pragma int char #pragma section a=1; b; section tidata begin /* allocated to tidata.word attribute section */ /* allocated to tibss.byte attribute section */ tidata end The efficiency can be enhanced in terms of execution speed if variables or data that are especially frequently used in the system are selected and allocated to the tidata (tidata.byte, tidata.word) or tibss (tibss.byte or tibss.word) attribute section. The CA850 has a section file generator that investigates the frequency of reference. The frequency information obtained as a result of the investigation is output as a frequency information file. The code that allocates data to the tidata (tidata.byte, tidata.word) or tibss (tibss.byte, tibss.word) attribute section is output based on this information. The user can edit the frequency information file to select variables that should be allocated to the tidata (tidata.byte, tidata.word) or tibss (tibss.byte, tibss.word) attribute section by priority. The variables can then be allocated to these sections without qualifying the source. Refer to CA850 for Operation User’s Manual for details of the section file generator and frequency information file. Figure 3 - 5 shows an example of memory allocation of each section. 56 User’s Manual U18513EJ1V0UM