lcc porting question

"Roger.Gough" <Roger.Gough@ul.ie>
21 Nov 2003 00:55:16 -0500

          From comp.compilers

Related articles
lcc porting question Roger.Gough@ul.ie (Roger.Gough) (2003-11-21)
| List of all articles for this month |
From: "Roger.Gough" <Roger.Gough@ul.ie>
Newsgroups: comp.compilers
Date: 21 Nov 2003 00:55:16 -0500
Organization: Compilers Central
Keywords: lcc
Posted-Date: 21 Nov 2003 00:55:16 EST

Hi all,
I am looking to port lcc to a 32 bit RISC like architecture. At present, I
am looking to modify lcc so as that it accepts the 'asm' keyword and outputs
everything between parantheses that follows, i.e. get lcc using inline
assembly. My architecture contains several coprocessors and inline assembly
seems to be the easiest way for me to write code for these.


So far, I have modified lex.c and token.h. I have lcc recognising the 'asm'
keyword. I think my problem is with the file stmt.c, I cant manage to
traverse the code between the parentheses. I need to output this directly to
the assembly file. I keep getting the error empty declaration when I try
and run ./rcc on the following code:


int main()
{
asm("coproc_mutex = 0x024");
return;
}


Are there any other files that need modifying?. Has anybody managed to solve
this problem. Any hints or suggestions would be greatly appreciated. I
realise that I am going to have to tell lcc which registers are clobbered
etc, but that is another days work.


Kind Regards


Roger.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.