Hi Maciej, Philippe,

>  So results of individual operations are as in the comments with this 
> code:
> 
>       mthi    $0              # HI <- 0
>       mtlo    $0              # LO <- 0
>       addiu   $2, $0, 1       # $2 <- 1
>       lui     $3, 0x4000      # $3 <- 0x40000000
>       maddu   $4, $3, $2      # HI <- 0
>                               # LO <- 0x40000000
>                               # $4 <- 0x40000000
>       maddu   $5, $4, $2      # HI <- 0
>                               # LO <- 0xffffffff80000000
>                               # $5 <- 0xffffffff80000000
>       maddu   $6, $4, $2      # HI <- 1
>                               # LO <- 0
>                               # $6 <- 0

Adding tests such as the one above to for example tests/tcg/mips/txx9/
would be useful, I think. As previously noted, GCC can produce 32-bit
R5900 programs but 64-bit compilations fail, so full test coverage may
not be easily obtainable at the moment.

Fredrik

Reply via email to