Skip to main content

Update information for CubeSuite

Build Tool for V850(CA850)

Changes from V3.45 to V3.47.

Expansion of the upper limit for the number of macro identifiers

An upper limit for the number of macro identifiers has been expanded up to 999999.
This corresponds to the -Xm option of the compiler.

Restrictions eliminated

Two restrictions described below have been eliminated.

No. 111  Restriction on incorrect compare operation optimization while casting
[Description]
No.111 occurs when the following conditions are satisfied:

[Conditions]
1. Compare operation(<, <=, >, >=, ==, !=) between integer operands.
2. Either operand is casted as shown below:
  signed char ->unsigned char
  signed char ->unsigned short
  unsigned char ->signed char
  signed short ->unsigned short
  unsigned short ->signed short
  unsigned short ->signed char
3. After casting the operand, its type is the same as the type of the other operand.
4. Other operand is treated as constant by way of compiler optimization.
5. Comparison used in (1) occurs between constant in (4) and before casting of (2). This will always be true or always be false).

No. 112  Restriction on incorrect move optimization of assignment sentence
[Description]
No.112 occurs when the following conditions are satisfied, resulting in moving the statement assigning variable X in Basic Block 1 to the back of the sentence assigning variable X in Basic Block 2 incorrectly:

[Conditions]
1. Optimization level is -Og or higher (-Og, -O, -Os, -Ot, and associated code optimizations)
2. Control flow of function consists of Basic Blocks like (a)-(e).
(a) Either non-volatile automatic variable X or non-volatile argument variable X is assigned in both Basic Block 1 and 2,
     then referenced in Basic Block 3.
(b) The value assigned to variable X in Basic Block 2 is either volatile variable expression
      or peripheral I/O register expression.
(c) The path from Basic Block 1 is the only one merging into Basic Block 2.
(d) After Basic Block 2, both path-merging-into Basic Block 3 and path-not exist.
(e) No indirect access to variable X between Basic Block 1 and 3.

Note : A basic block is code that has one entry point,one exit point, and no jump instructions contained within it.

Changes from V3.43 to V3.45.

Addition of assembler option that suppresses output of the warning messages W3029, W3030, and W3031

The assembler option -woff=string has been added to suppress output of the warning messages W3029, W3030, and W3031. Either 3029, 3030, or 3031 can be specified for string. string must not be omitted.

Changes from V3.41 to V3.43.


Working around a V850ES core restriction on executing the mul or mulu instruction

If the V850ES core restriction might apply to an instruction, one of the warning messages below is output.
W3029: can not use r0 as destination in mul/mulu in V850ES core. replaced to r1.
W3030: can not use r0 as destination in mul/mulu in V850ES core.
W3031: can not use mul/mulu X,Y,Y format in V850ES core.


Changes from V3.31 to V3.41.

Restrictions eliminated

Seven restrictions described below have been eliminated.
No. 104  Incorrect number of loop executions
[Description]
If all of the following conditions are satisfied, a loop might execute the incorrect number of times: Conditions:

[Conditions]
( 1 ) -Og, -O, -Os, or -Ot is specified as the optimization option.
( 2 )The loop counter is not declared as volatile.
( 3 )The loop termination condition involves comparing the loop counter to a constant.
( 4 )A constant is added to or subtracted from the loop counter within the loop.
( 5 )The loop counter is used within the loop as described in (A) or (B).

(A) Conditions a to e are satisfied:
a. The loop counter is used to index an array.
b. The elements of the array in a are structures, unions, or arrays.
c. The size of the elements of the array in a is not a power of 2.
d. The size of the elements of the array in a is within 65,534 bytes.
e. The product of the constant used for the loop termination condition in (3) and the size of an element of
   the array in a is too large to store in a 32-bit integer.

(B) Conditions f to i are satisfied:
f. The loop counter is used as one multiplier in an expression with a constant.
g. The constant in f is not a power of 2.
h. The constant in f is in the range from 65,534 to 65,534.
i. The product of the constant used for the loop termination condition in (3) and the constant in f is too
   large to store in a 32-bit integer.

* Loop counter: This controls when a loop ends.
No. 105  Incorrect string literals
[Description]
If the following conditions are satisfied, the contents of the string literal become incorrect:

[Conditions]
(1)ASCII code 0x00 is used in a string literal.
(2)An ASCII code from 0x30 through 0x37 immediately follows 0x00 in (1).
No. 106  Restriction involving format specifiers for the sscanf, fscanf, and scanf functions
[Description]
If conditions (1) to (3) are satisfied, the parameter for the format specifier described in (3) is overwritten:

[Conditions]
(1) The sscanf, fscanf, or scanf function is used.
(2) There are less entered fields than format specifiers.
(3) The first extra format specifier character is s, e, f, g, E, F, G, or [ ].

If conditions (4) and (5) are satisfied, the parameter for the format specifier described in (5) is overwritten.
[Conditions]
(4) The sscanf, fscanf, or scanf function is used.
(5) [ ] are used as format specifier characters, and the character pattern enclosed by them is not in the
   entered fields.
No. 107  Restriction involving the character string parameter for the atoi, atol, strtol, and strtoul functions
[Description]
If conditions (1) to (5) below are satisfied, the return value might be invalid. For the strtol and strtoul functions, the global variable errno is not set to ERANGE:

[Conditions]
(1) The atoi, atol, strtol, or strtoul function is used.
(2) For the atoi or atol function, the character string parameter exceeds 32 bits when expressed as a
     decimal number. For the strtol or strtoul function, the first character string parameter exceeds32 bits
    when expressed using the base specified as the third parameter.
(3) When the portion of the character string parameter in (2) from the first character to a given character is
    converted to a number and compared to the absolute value of the lower 32 bits of the value thatresults
    when the portion of the same character string from the first character to the character following
    the given character above is converted to a number, the latter value is greater than the former.
(4) The comparison in (3) includes all characters in the string.
(5) For the atoi, atol, or strtol function, the lower 32 bits of the number to which the character string was
    converted in (2) are within the range from LONG_MIN to LONG_MAX after adding a sign.

No. 108  Restriction involving initialization of a structure that includes a bit field among its members
[Description]
If conditions (1) and (2) are satisfied, the bit field is not correctly initialized:

[Conditions]
(1) A structure is used that includes a bit field immediately followed by another structure (or union) as
     members.
(2) Both of the members included in the structure in 1 are initialized using initial values.

If conditions (3) to (5) are satisfied, the bit field might not be correctly initialized.
(3) An automatic array of structures is used.
(4) The structure in 3 includes a bit field and an element that is at least 126 bytes among its members.
(5) The initializer for this element is omitted, and the element is implicitly initialized to 0.

No. 109  Restriction involving nested conditionally assembled pseudo instructions
[Description]
If the following conditions are satisfied, the error message F3510 is output:

[Conditions]
(1) An .elseif or .elseifn pseudo instruction is used.
(2) The condition in (1) evaluates to true.
(3) There is an .elseif or .else pseudo instruction that corresponds to the pseudo instruction in (1).
(4) There is a pseudo instruction that is conditionally assembled nested within the block that corresponds
     to the pseudo instruction in (1).

No. 110  Restriction involving assignment within switch and if statements
[Description]
If the following conditions are satisfied, the processing within switch or if statements might become incorrect as a result of optimization by the ca850:

1. The C source code satisfies conditions (A) to (C).
[Conditions]
(A) For a version earlier than 2.50, the compiler optimization option -Os or –Ot is specified in addition to
    -Ol, but –Wi,–O4 is not specified. For Ver. 2.50 or later, the compiler optimization option -Os or -Ot is
    specified, but –Wi,–O4 is not specified.
(B) Parallel processing is performed to assign a value to the same variable in a switch or if statement.
(C) After the assignment in (B), execution jumps back to the same position.

2. The assembly language output according to the C source code in (1) satisfies all of the following
[Conditions]
(a)The mov or ld directive is used to transfer data to the same register at the end of multiple basic blocks
   (Block A).
(b)Block A combines everything into one block (Block B).
(c)There are no directives (or output code) in Block B, which contains information used by the compiler.
    At least one information item is included.
(d)In Block C (the block following Block B), the data is transferred to a register other than the one used in
    Block A.
(e)Among the blocks directly combined into Block C, there is a block (Block D) that performs the same
    transfer as that performed in Block A.

Remark A basic block is group of directives that are processed in order and ends with a directive that causes execution to jump.

Addition of warning messages

The warning messages below have been added:
(1) If an undefined escape character is used, the warning message W2181 is output.
W2181: undefined escape character (code)
An undefined escape character is used.

(2) In a shift operation, if the right operand value is outside the range 0 to 31, the warning message W5301 is output.
W5301: shift count(num) in function 'func' is out of range
The number of bits shifted (num) is outside the range 0 to 31 in the function func.

(3)In a division or modulo operation, if the second operand is 0, the warning message W5302 is output.
W5302: division by zero in function 'func'
Division by 0 is specified in the function func.


Modification of rule for outputting a warning message

In Ver. 3.31, the warning message W2784 is output if a variable is assigned to another variable of a smaller data type. In Ver. V3.41, W2784 is also output if a pointer is assigned to a variable of a smaller data type. W2784 is only output for an pointer assignment if the -wcast_type+ option is specified.

W2784: Conversion may lose significant digit
Data might have been lost.



Back To Top



End of content

Back To Top