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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
4,837 Views
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 Kudos
Reply
1 Solution
4,825 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
4,819 Views
xuedongyang
Contributor II

Thank you very much.

0 Kudos
Reply
4,826 Views
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 Kudos
Reply