This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Problems with var_mk_defs.c


On Wed, 2003-10-15 at 09:46, James Yates wrote:
> After looking at the generated var_mk_defs.s file by adding -save-temps to the global compiler flags, the first line the compiler complains about is:
> 
> .equ	HAL_UCACHE_SIZE, #0
> .loc 1 82 0
> 
> Would I be right in assuming that this should read:
> 
> .equ	HAL_UCACHE_SIZE, 0
> .loc 1 82 0
> 
> The function call that creates this line is:
> DEFINE(HAL_UCACHE_SIZE, HAL_UCACHE_SIZE);
> 
> The macro itself:
> #define DEFINE(sym, val) \
>         asm volatile("\n\t.equ\t" #sym ", %0" : : "i" (val))
> 
> I guess this is the assembler equivalent of #define HAL_UCACHE_SIZE 0 so that wherever HAL_UCACHE_SIZE is referenced, the value of 0 is used.
> 
> However, I am unsure about how to modify the macro, my skill in assembler is extremely poor. Any ideas?
> 

It looks right to me.  It seems that different assemblers (and
even different versions sometimes) want to see this written
differently.

Give it a try (sans "#") and see what happens.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]