[Libre-soc-dev] bug in microwatt stfsu and stfdu

Luke Kenneth Casson Leighton lkcl at lkcl.net
Wed May 19 11:21:28 BST 2021


yep, lfsu as well, also incorrect according to spec.  recommend a full
review.

49,LDST,OP_LOAD,---->>>RA_OR_ZERO<<<----,CONST_SI,NONE,FRT,NONE,NONE,0,0,ZERO,0,is4B,0,0,1,0,1,0,NONE,0,1,lfsu,D


On Wed, May 19, 2021 at 11:19 AM Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> (blegh, sorry, having difficulty cut/pasting into HTML-formatted message,
> to get alignment here)
>
>
>
>
>
> -- unit fac internal in1 in2 in3 out CR CR inv inv cry cry ldst BR sgn
> upd rsrv 32b sgn rc lk sgl rpt
> 52 => (LDST, FPU, OP_STORE, RA_OR_ZERO, CONST_SI, FRS, NONE, '0', '0', '0',
> '0', ZERO, '0', is4B, '0', '0', '0', '0', '1', '0', NONE, '0', '0',
> NONE), -- stfs
> 53 => (LDST, FPU, OP_STORE, RA_OR_ZERO, CONST_SI, FRS, RA, '0', '0', '0',
> '0', ZERO, '0', is4B, '0', '0', '1', '0', '1', '0', NONE, '0', '0',
> NONE), -- stfsu
>
>
>
>
>
> v3.0B book I chapter 4 page 145 section 4.6.3 states:
>
> stfs FRS,D(RA)
>
>    if RA = 0 then b <- 0
>     else           b <- (RA)
>     EA <- + EXTS(D)
>
> but stfsu states simply:
>
>     EA <- (RA) + EXTS(D)
>
> thus we conclude that Major 53 is *wrong*, in1 should simply be RA *not*
> RA_OR_ZERO.
>
> now that i'm looking at it, stfdu is also wrong.
>
> stfsx is *correct*.  stfs is correct.  stfd is correct.  stfdux is
> *wrong*.  stfdx is correct.
>
> basically needs a full review.  in the above *i'm assuming the spec is
> correct*.
>
> l.
>
>


More information about the Libre-soc-dev mailing list