s5u1c33000c Epson Electronics America, Inc., s5u1c33000c Datasheet - Page 40

no-image

s5u1c33000c

Manufacturer Part Number
s5u1c33000c
Description
Cmos 32-bit Single Chip Microcomputer S5u1c33000c Manual
Manufacturer
Epson Electronics America, Inc.
Datasheet
CHAPTER 3: SOFTWARE DEVELOPMENT PROCEDURES
3.2.10 Optimization
The development procedure have been reviewed. As the final step, this section explains optimization of the code,
one of the features of this package.
The gcc33 options select part of the [gcc-lk options] window has an [optimize] field with radio buttons that allow
specifying the optimization level. Since the effects of code optimization cannot be confirmed with a sample
program, the following shows other methods.
One method is to use a global pointer.
A global pointer is the start address of a global variable area, and a general-purpose register R8 is used
exclusively for accessing this area. This helps to reduce the number of instructions necessary to access global
variables. Initialization of the R8 register in the assembly source of the sample program is the processing
performed to set up this global pointer.
This function is an option to the Instruction Extender ext33, and is deselected by default for the Work Bench.
Therefore, make in the tutorial was not optimized by using a global pointer.
When make is performed after selecting [global pointer optimize] which is an option to the ext33, the difference
in output code can be verified. The following shows the difference in the sample program where global variable i
(address being mapped to location 0) is accessed.
When not using a global pointer
When using a global pointer
The above example shows that use of a global pointer made it possible to eliminate two instructions.
Another method of optimization is 2-pass make. In 2-pass make, the program modules are linked, then processed
again by the Instruction Extender based on the absolute address information of the symbols determined by
linkage processing. This helps to delete the unnecessary "ext" instructions used for referencing the jump address
labels and symbols in external modules.
To perform 2-pass make
Step 33) Check the [2 pass] radio button in the make options select part of the [other options] window, then use
the [MAKE] button to execute make.
EPSON
24
S5U1C33000C MANUAL
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)

Related parts for s5u1c33000c