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

no-image

s5u1c33000c

Manufacturer Part Number
s5u1c33000c
Description
Cmos 32-bit Single Chip Microcomputer S5u1c33000c Manual
Manufacturer
Epson Electronics America, Inc.
Datasheet
10.7 Optimize Function
10.7.1 Optimizing Relative Branch Instruction
The S1C33000's basic relative branch instruction allows branch to any location within a signed 9-bit (LSB = 0)
relative address range by using a single instruction. Branching to an address beyond this range requires extension
by the ext instruction.
The ext33 allows you to write an extended branch instruction without worrying about the ext instruction as
described in Section 10.6.9. Thus instruction is then expanded so that control is transferred a relative distance to
the branch destination label by using the fewest possible instructions.
The following extended branch instructions can be optimized:
xcall xjp xjreq xjrne xjrgt xjrge xjrlt xjrle xjrugt xjruge xjrult xjrule
xcall.d xjp.d xjreq.d xjrne.d xjrgt.d xjrge.d xjrlt.d xjrle.d xjrugt.d xjruge.d xjrult.d xjrule.d
The basic branch instructions written by adding the ext instruction are not optimized.
The number of instructions (1 to 3 instructions) that derive from expansion are determined according to the
following conditions:
The number of instructions derived by expansion are determined in the following manner by resolving the above
conditions:
The following shows the basic format after expansion.
Example: xcall sign32
An expansion result different from those shown above may be obtained depending on method of label
specification. For details, refer to Section 10.6.9.
S5U1C33000C MANUAL
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)
Relative distance between the extended branch instruction and branch destination label
Whether the extended branch instruction and branch destination label exist in the same file
Whether the -near option is specified
Whether there is symbol file/link map file specification by the -lk option
Relative distance determination threshold 0x180000 (default) or value specified by the -j option
1 instruction
call
The threshold value is half of the value specified using -j option. When using the -j
option's default value of 0x180000, the threshold value will be 0xc0000. Values in ( )
apply when branching to a lower address. The threshold value may be decreased due to
distance judgment when branching toward to a lower address.
0 to 126
To threshold value
To 0x7ffffff
Unknown relative distance
sign32(8:1)
1: The value indicates the number of instructions from the extended branch
2: Up to 125 when branching toward to a higher address.
3: Up to the threshold value - 1 when branching toward to a higher address in the
4: Up to 0x7fffffe when branching toward to a higher address in the same file.
(absolute value) 1
instruction to the branch destination label.
same file.
Relative distance
Table 10.7.1.1 Number of instructions derived by expansion
2 instructions
ext
call
2
3
4
sign32(21:9)
sign32(8:1)
In the same file
In different files
Instruction and
label positions
EPSON
ext
ext
3 instructions
call
Not specified
Not specified
sign32(31:22)<<0x3
sign32(21:9)
sign32(8:1)
-near flag
Specified
Specified
CHAPTER 10: INSTRUCTION EXTENDER
Number of expanded
instructions
1
2
2
2
3
2
3
147

Related parts for s5u1c33000c