This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Assembly error with 128-bit Register Quadruplet

Hi,

The following is a portion of my assembly code:

.asg  B16,  B16_12

.asg  B17,  B17_34

.asg  B18,  B18_56

.asg  B19,  B19_78

.asg  B20,  B20_11

.asg  B21,  B21_11

.asg  B22,  B22_11

.asg  B23,  B23_11

......

DDOTP4H  .M2  B19_78:B18_56:B17_34:B16_12, B23_11:B22_11:B21_11:B20_11, B27_d2:B26_d1

......

But "Assembly Error" says:

Unexpected trailing operand(s)       DDOTP4H  .M2  B19_78:B18_56:B17_34:B16_12, B23_11:B22_11:B21_11:B20_11, B27_d2:B26_d1

After symbol substitution the line became:       DDOTP4H  .M2  B19_78B18B17_34:B16_12, B23_11B22B21_11:B20_11, B27_d2:B26_d1

 

Why?

My environment is C6678 simulator on CCS 5.4.

Is there any problem in this code, or it's a bug of Assembler?

 

Thanks!

  • Hi,

    We have moved your post to Compiler forum for correct response.

    Thanks.

  • The short answer is that the syntax :x: where x is defined with ".asg" is the forced substitution operator.  This consumes the colons and drops the definition of x where the forced substitution operator occured.

    Use .set instead:

    B16_12    .set  B16
    B17_34    .set  B17
    B18_56    .set  B18
    B19_78    .set  B19
    B20_11    .set  B20
    B21_11    .set  B21
    B22_11    .set  B22
    B23_11    .set  B23
    B26_d1    .set  B26
    B27_d2    .set  B27
    
        DDOTP4H  .M2  B19_78:B18_56:B17_34:B16_12, B23_11:B22_11:B21_11:B20_11, B27_d2:B26_d1