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.

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to