https://bugs.kde.org/show_bug.cgi?id=385412

--- Comment #19 from Vadim Barkov <vbr...@gmail.com> ---
(In reply to Julian Seward from comment #18)
> I think this is equivalent:
> 
> // getReg(RegisterNumber n) returns the value of GPR number 'n'
> 
> // reg1 and reg2 are even
> void ppno(RegisterNumber reg1, RegisterNumber reg2) {
> 
>     switch(getReg(0)) {
>     case 0x0:
>         // Query mode, ignore reg1 and reg2
>         // Write 16 bytes                    at  getReg(1)
>         break;
> 
>     case 0x3:
>         // SHA-512 generate mode, ignore reg2
> 
>         // Read 240 bytes                    at  getReg(1)
>         // Write getReg(reg1 + 1) bytes      at  getReg(reg1)
>         // Write some of 240 bytes starting  at  getReg(1)
>         break;
> 
>     case 0x83:
>         // SHA-512 seed mode, ignore reg1
> 
>         // Read some of 240 bytes starting  at  getReg(1)
>         // Read getReg(reg2 + 1) bytes      at  getReg(reg2)
>         // Write 240 bytes                  at  getReg(1)
>         break;
> 
>     default:
>         // Specification exception, abort execution.
>     }
> }
Yes, this is equivalent.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to