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.

the usage of "call" instruction

Hi Champs,

              We find there're 'call" instruction in the assembly files which is generated by the compiler tools.  We did not find the detail usage in the spru732 document for example the delay cycles.

             Below are one extract from assembly file generated by compiler tools. Looks the delay slot is 3 ?

Case1:           

           CALL    .S1     _BsamGetHData1Zone_Opt ; |264|
           MV      .L2X    A11,B4            ; |264|
           ADDKPC  .S2     $C$RL4,B3,2       ; |264|

           MV      .L1     A8,A4             ; |264|
||         ADD     .S1X    8,SP,A6           ; |264|
||         MV      .L2X    A12,B6            ; |264|

$C$RL4:    ; CALL OCCURS {_BsamGetHData1Zone_Opt}  ; |264|
;** --------------------------------------------------------------------------*

           B       .S1     $C$L26            ; |264|
||         ADDAD   .D1     A12,8,A4          ; |268|

           LDW     .D1T1   *A4++,A3          ; |275|
           LDW     .D1T1   *A4++,A5          ; |275|
           LDW     .D1T1   *A4++,A8          ; |275|
           LDW     .D1T1   *A4++,A7          ; |275|
           LDW     .D1T1   *A4++,A6          ; |275|
           ; BRANCH OCCURS {$C$L26}          ; |264|

 

Thanks in advance!

Jane

  • Jane said:

               CALL    .S1     _BsamGetHData1Zone_Opt ; |264|
               MV      .L2X    A11,B4            ; |264|
               ADDKPC  .S2     $C$RL4,B3,2       ; |264|

               MV      .L1     A8,A4             ; |264|
    ||         ADD     .S1X    8,SP,A6           ; |264|
    ||         MV      .L2X    A12,B6            ; |264|

    The ADDKPC instruction encodes two additional NOP cycles with its third operand, 2.  Thus the MV takes one, the ADDKPC takes one, two NOPs are inserted, and the three parallel instructions take another one, for the five delay cycles of a CALL instruction.

    ADDKPC is described on page 3-62 in spru732c.