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

Re: Re: [openrisc] OR1200 problem



> the data mem and also jumps.. next, I'll try to test out some arithmetic
> and logical instructions.. I noticed that the first instruction is read
> twice.. because two reads are made to address 0x100.. is there a reason
> for this??

This is probably the only glitch you will find. For now it is like this, so put a l.nop as first instruction (or something that can be executed twice).

> 
> I've got a question.. just to get things right.. I'm currently coding in
> machine code (making a dumbROM implementation).. I printed out the
> instruction set from the architecture manual.. I'd like to check to make
> sure that my technique is correct..

You might want to check orpmon. You can compikle it and use or32-rtems-objdump to get the assembly code.

> 
> almost everything is done in 16-bit nibbles..
> 
> to move data into a register, I use l.movhi first to move the upper
> 16-bits in and then ORI it with the lower 16-bits.. is this the best way
> to move a 32-bit value into a register??

If your 32-bit value uses upper half of the word, then you will have to use the l.movhi. Otherwise l.addi is enough.

> 
> to store into a data mem location, I use a l.movhi to get the upper
> 16-bits into a register, and then to a l.sw with another 16-bit offset
> to move the data from a register to data mem.. a similar way for load
> except that I do a l.lwz instruction..

Yeah.

regards,
Damjan

--
To unsubscribe from openrisc mailing list please visit http://www.opencores.org/mailinglists.shtml