.line
Create a Line Number Entry
B-6
Syntax
.line
line number [, address]
Description
The .line directive creates a line number entry in the object file. Line number
entries are used in symbolic debugging to associate addresses in the object
code with the lines in the source code that generated them.
The .line directive has two operands:
-
The
line number indicates the line of the C source that generated a portion
of code. Line numbers are relative to the beginning of the current function.
This is a required parameter.
-
The
address is an expression that is the address associated with the line
number. This is an optional parameter; if you don’t specify an address, the
assembler will use the current SPC value.
Example
The .line directive is followed by the assembly language source statements
that are generated by the indicated line of C source. For example, assume that
the lines of C source below are line 4 and 5 in the original C source; line 5
produces the assembly language source statements that are shown below.
C source:
for (i = 1; i <= n; ++i)
p = p * x;
Resulting assembly language code:
31 .line 7
32 00000d 4400 LD *SP(0),16,A ; cycle 1
33 00000e 3102 MPYA *SP(2) ; cycle 2
34 00000f 8102 STL B,*SP(2) ; cycle 3
35 .line 6
36 000010 6b01 ADDM #1,*SP(1) ; cycle 4
000011 0001
37 000012 f7b8 SSBX SXM ; cycle 6
38 000013 f495 nop
39 000014 1004 LD *SP(4),A ; cycle 8
40 000015 0801 SUB *SP(1),A ; cycle 9
41 000016 f842 BC L2,AGEQ ; cycle 10
000017 000d’
42 ; branch occurs ; cycle 15
43 000018 L3:
44 .line 8
45 000018 1002 LD *SP(2),A
46 .line 9
47 000019 ee03 FRAME #3 ; cycle 1
48 00001a fc00 RET ; cycle 2
49 ; branch occurs ; cycle 7
50 .endfunc 9,000000000h,3
Содержание TMS320C54x
Страница 38: ......
Страница 39: ......
Страница 40: ......
Страница 41: ......
Страница 42: ......
Страница 43: ......
Страница 44: ......
Страница 45: ......
Страница 46: ......
Страница 47: ......
Страница 48: ......
Страница 49: ......
Страница 50: ......
Страница 51: ......
Страница 52: ......
Страница 53: ......
Страница 54: ......
Страница 55: ......
Страница 56: ......
Страница 57: ......
Страница 58: ......
Страница 59: ......
Страница 60: ......
Страница 61: ......
Страница 62: ......
Страница 276: ......
Страница 277: ......
Страница 278: ......
Страница 279: ......
Страница 280: ......
Страница 281: ......
Страница 282: ......
Страница 283: ......
Страница 284: ......
Страница 285: ......
Страница 286: ......
Страница 287: ......
Страница 288: ......
Страница 289: ......
Страница 290: ......
Страница 291: ......
Страница 292: ......
Страница 293: ......
Страница 294: ......
Страница 295: ......
Страница 296: ......
Страница 297: ......
Страница 298: ......
Страница 299: ......
Страница 300: ......
Страница 301: ......
Страница 302: ......