|
Message
From: Damjan Lampret<damjanl@o...>
Date: Thu Dec 30 16:37:45 CET 2004
Subject: [openrisc] Bug in hello-uart
Thisl.addi r2,r0,-4 and this l.movhi r2,hi(0xfffffffc) l.ori r2,lo(0xfffffffc)
produces exactly the same result (r2). :-)
regards, Damjan
----- Original Message ----- From: "Patrick Loschmidt" <Patrick.Loschmidt@o...> To: "List about OpenRISC project" <openrisc@o...> Sent: Thursday, December 30, 2004 4:36 PM Subject: Re: [openrisc] Bug in hello-uart
> Matjaz Breskvar schrieb: >>> _reset: >>> l.movhi r1,hi(_stack-4) >>> l.ori r1,r1,lo(_stack-4) >>>- l.addi r2,r0,-3 >>>+ l.addi r2,r0,-4 >>> l.and r1,r1,r2 >>> >>> l.movhi r2,hi(_main) >>>I suppose that the -3 should do an alignment to 32bit words but this is >>>not the case. Because -3 is b1101 or 0xD so it should be -4 equal to >>>b1100 or 0xC. Could somebody please confirm this? >> it's readibility bug in any case. Since this is an example, let's do >> it really clearly: >> >> l.movhi r2,hi(0xfffffffc) >> l.ori r2,lo(0xfffffffc) >> >> and now there is no confusion anymore. > > I found the example very usefull for my own start-up code, so I'm not > sure whether changing it to fixed addresses is a good idea, but I leave > it up to the maintainer ... ;-) > > Regards, > Patrick > _______________________________________________ > http://www.opencores.org/mailman/listinfo/openrisc >
|
 |