 |
|
 |
RENESAS TOOL NEWS on December 16, 2003: RSO-M3T-SRA74-031216D
A Note on Using Relocatable Assembler M3T-SRA74
|
Please take note of the following problems in using the M3T-SRA74
relocatable assembler for the 740 family MCUs:
- On describing conditional expressions in structured description
- Versions Concerned
- M3T-SRA74 V.1.00 Release 1 through V.4.10 Release 1B
- Description
In a conditional expression in structured description, if the equality
or inequality is tested between a memory bit variable and a memory
variable, an unnecessary instruction will be created without
interpreting the evaluation as an error.
- 2.1 Conditions
- This problem occurs if the following three conditions are satisfied:
| (1) |
An equality or inequality operator (== or !=) is used in a conditional expression in structured description. |
| (2) |
The left operand of the operator in (1) is a memory bit variable. |
| (3) |
The right operand of the operator in (1) is a memory variable. |
- 2.2 Example
- In the example shown below, flag1 and work1 denote a memory bit variable and a memory variable respectively.
-----------------------------------
if [flag1] == [work1]
nop
endif
-----------------------------------
When the above example is assembled, the following assembler
instructions including an unnecessary one are generated:
-----------------------------------
;if [flag1] == [work1]
CMP work1 ; Unnecessary instruction
BBS flag1,.I0
nop
;endif
.I0:
-----------------------------------
- Workaround
In a conditional expression in structured description, don't test
the equality or inequality between a memory bit variable and a memory
variable.
- NOTE:
- When the left term of a conditional expression is a memory bit
variable, only 0 (zero) or 1 is allowed in its right term. For
details, see Appendix F.4 "Syntax maps of Structured Commands"
in the M3T-SRA74's User's manual.
|
 |