Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: Why is it different for the compiler output with pdf example?

$
0
0

Hi,

I see that below ,,,line example from spru187t.pdf. It(*SP--(12) is different from my hello.c compiler output in the SP--(16)

Second, there is

"STW .D2 A10,*+SP(8)" in spru187t.pdf example.

I am just curious about it.

Thanks,

 

 

//////////////////////////////////LIST file from hello.c with V7.4.2 compiler, C64 DSP

           STW     .D2T2   B3,*SP--(16)  ; |6|

.dwcfi cfa_offset, 16

.dwcfi save_reg_to_mem, 19, 0

.dwpsn file

"../hello.c",line 7,column 2,is_stmt

$C$DW$5 .dwtag  DW_TAG_TI_branch

.dwattr $C$DW$5, DW_AT_low_pc(0x00)

.dwattr $C$DW$5, DW_AT_name("_printf")

.dwattr $C$DW$5, DW_AT_TI_call

           CALL    .S1     _printf          

; |7|

           MVKL    .S2     $C$SL1+0,B4

           MVKH    .S2     $C$SL1+0,B4

           STW     .D2T2   B4,*+SP(4)       

; |7|

           ADDKPC  .S2     $C$RL0,B3,1      

; |7|

$C$RL0:    ; CALL OCCURS {_printf} {0}       ; |7|

.dwpsn file

"../hello.c",line 9,column 2,is_stmt

ZERO    .L1     A4                ; |9|

.dwpsn file

"../hello.c",line 10,column 1,is_stmt

           LDW     .D2T2   *++SP(16),B3     

; |10|

NOP             4

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,example from Page 60, spru187t.pdf

_main:

STW .D2 B3,*SP--(12)

STW .D2 A10,*+SP(8)

;------------------------------------------------------------------------------

; 5 | printf("Hello, world\n");

;------------------------------------------------------------------------------

B .S1 _printf

NOP 2

MVKL .S1 SL1+0,A0

MVKH .S1 SL1+0,A0

|| MVKL .S2 RL0,B3

STW .D2 A0,*+SP(4)

|| MVKH .S2 RL0,B3

RL0: ; CALL OCCURS

;------------------------------------------------------------------------------

; 6 | return 0;

;------------------------------------------------------------------------------

ZERO .L1 A10

MV .L1 A10,A4

LDW .D2 *+SP(8),A10

LDW .D2 *++SP(12),B3

NOP 4

B .S2 B3

NOP


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>