Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jul 2006 13:08:00 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        "R. Tyler Ballance" <tyler@bleepsoft.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Machine-dependent code extension?
Message-ID:  <20060723100800.GC24435@gothmog.pc>
In-Reply-To: <A69D645F-5DBC-48B3-BEC4-013EED427C0C@bleepsoft.com>
References:  <A69D645F-5DBC-48B3-BEC4-013EED427C0C@bleepsoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-07-22 20:51, "R. Tyler Ballance" <tyler@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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060723100800.GC24435>