Re: MIPS Alchemy machine don't boot

Masao Uebayashi <[email protected]> Sat, 9 Jan 2010 23:40:04 +0900
Newsgroups gmane.os.netbsd.ports.evbmips,gmane.os.netbsd.ports.mips.devel
Message-ID <[email protected]>
> I've found the problem.

Good catch!  I've never realized this problem too.

> code:
> 
>         .set    mips3
> 	...
>          move t1, a2
> 
> which will always generate a 64-bit move, since the ".set mips3"
> will override any -mabi=<abi> command line flag.
> 
> The following snippet from mipsX_subr.S shows what is needed.  Perhaps
> we can wrap this up in a macro?

I think we should have explicit type / size macros for "move" too, like
PTR_MOVE, REG_MOVE, ..., to tell assembler the actual size of operand of
"move".  It's size of pointer (curlwp) for the lock_stubs.S case.

The actual code will be either addu or daddu adding to the zero register.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635