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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
4,847 次查看
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,835 次查看
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,829 次查看
xuedongyang
Contributor II

Thank you very much.

0 项奖励
回复
4,836 次查看
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 项奖励
回复