tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] .rept .endr for *.S. Any ideas?


From: Michael Matz
Subject: Re: [Tinycc-devel] .rept .endr for *.S. Any ideas?
Date: Thu, 14 Apr 2016 15:07:27 +0200 (CEST)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

On Thu, 14 Apr 2016, Sergey Korshunoff wrote:

> #if 0
>         .rept NR_syscalls-(.-sys_call_table)/4
> <------><------>.long SYMBOL_NAME(sys_ni_syscall)
> <------>.endr
> #else
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
>         .long SYMBOL_NAME(sys_ni_syscall)
> #endif..........
> 
> This is ugly.

But tinycc is not supposed to support all bells and whistles from other 
compilers, much less assemblers.  Simply use GNU as for compiling 
your .S files from that old kernel.  You can still use tinycc for what it 
was designed: compiling C files.

> How to implement this macro? Where to put code between .rept .endr? Any 
> ideas?

Remember tokes between the directives (instead of parsing them) and repeat 
the parsing loop N times with that token list at .endr, for instance.


Ciao,
Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]