Machine-dependent code extension?

Giorgos Keramidas keramida at ceid.upatras.gr
Sun Jul 23 10:08:42 UTC 2006


On 2006-07-22 20:51, "R. Tyler Ballance" <tyler at bleepsoft.com> wrote:
> I'm just wondering, the machine-dependent assembly tied into the i386
> kernel, that's all named ${FILENAME}., while in the arm/ kernel
> machine-dependent code is named ${FILENAME}.S, what's the difference?
> Or is there none, just a change in convention?

It looks like you missed a ".s" extension in the i386 case above, right?

If this is what you are asking, then the difference between *.s and *.S
is that the latter is preprocessed by cpp(1).  The GNU as(1) manual
hints at this difference here:

    File: as.info,  Node: Preprocessing,  Next: Whitespace,  Up: Syntax
    
    3.1 Preprocessing
    =================
    
    The `as' internal preprocessor:
       * adjusts and removes extra whitespace.  It leaves one space or tab
         before the keywords on a line, and turns any other whitespace on
         the line into a single space.
    
       * removes all comments, replacing them with a single space, or an
         appropriate number of newlines.
    
       * converts character constants into the appropriate numeric values.
    
       It does not do macro processing, include file handling, or anything
    else you may get from your C compiler's preprocessor.  You can do
    include file processing with the `.include' directive (*note `.include':
!   Include.).  You can use the GNU C compiler driver to get other "CPP"
!   style preprocessing by giving the input file a `.S' suffix.  *Note
!   Options Controlling the Kind of Output: (gcc.info)Overall Options.
    
       Excess whitespace, comments, and character constants cannot be used
    in the portions of the input text that are not preprocessed.



More information about the freebsd-hackers mailing list