What is the difference between .s and .sx assembly file?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

What is the difference between .s and .sx assembly file?

ソリューションへジャンプ
4,873件の閲覧回数
xuedongyang
Contributor II

Hi, NXP experts,

Can you guide me what is the difference between .s and .sx assembly file?

I noticed that some assembly files with .s extension and others with .sx extension. I am just wondering what is the difference between them. 

In addition, do you have any document to explain assembly code syntax (like, .global, .section, .type, .size, etc) for LA1224? I have the instruction set manual, but it does not have such explanation of assembly code syntax.

 

xuedongyang_1-1644594831861.png

 

xuedongyang_0-1644594475228.png

Thanks,

Xuedong

 

0 件の賞賛
返信
1 解決策
4,861件の閲覧回数
ufedor
NXP Employee
NXP Employee

Invocation of the C preprocessor will be automatic when the filename provided for the assembler file ends in .S (the capital letter 's'). This would even apply to operating systems that use case-insensitive filesystems since the actual decision is made based on the case of the filename suffix given on the command-line, not based on the actual filename from the file system.

As an alternative to using .S, the suffix .sx is recognized for this purpose (starting with GCC 4.3.0). This is primarily meant to be compatible with other compiler environments that have been providing this variant before in order to cope with operating systems where filenames are case-insensitive (and, with some versions of make that could not distinguish between .s and .S on such systems).

Reference:

http://manpages.ubuntu.com/manpages/bionic/man3/assembler.3avr.html

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
4,855件の閲覧回数
xuedongyang
Contributor II

Thank you very much.

0 件の賞賛
返信
4,862件の閲覧回数
ufedor
NXP Employee
NXP Employee

Invocation of the C preprocessor will be automatic when the filename provided for the assembler file ends in .S (the capital letter 's'). This would even apply to operating systems that use case-insensitive filesystems since the actual decision is made based on the case of the filename suffix given on the command-line, not based on the actual filename from the file system.

As an alternative to using .S, the suffix .sx is recognized for this purpose (starting with GCC 4.3.0). This is primarily meant to be compatible with other compiler environments that have been providing this variant before in order to cope with operating systems where filenames are case-insensitive (and, with some versions of make that could not distinguish between .s and .S on such systems).

Reference:

http://manpages.ubuntu.com/manpages/bionic/man3/assembler.3avr.html

0 件の賞賛
返信