Skip to content

Commit

Permalink
chore: update cycle counts in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbinth committed Sep 7, 2024
1 parent 8a51cd5 commit 245e89c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/src/user_docs/assembly/u32_operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ If the error code is omitted, the default value of $0$ is assumed.
| u32shl <br> - *(18 cycles)* <br> u32shl.*b* <br> - *(3 cycles)* | [b, a, ...] | [c, ...] | $c \leftarrow (a \cdot 2^b) \mod 2^{32}$ <br> Undefined if $a \ge 2^{32}$ or $b > 31$ |
| u32shr <br> - *(18 cycles)* <br> u32shr.*b* <br> - *(3 cycles)* | [b, a, ...] | [c, ...] | $c \leftarrow \lfloor a/2^b \rfloor$ <br> Undefined if $a \ge 2^{32}$ or $b > 31$ |
| u32rotl <br> - *(18 cycles)* <br> u32rotl.*b* <br> - *(3 cycles)* | [b, a, ...] | [c, ...] | Computes $c$ by rotating a 32-bit representation of $a$ to the left by $b$ bits. <br> Undefined if $a \ge 2^{32}$ or $b > 31$ |
| u32rotr <br> - *(22 cycles)* <br> u32rotr.*b* <br> - *(3 cycles)* | [b, a, ...] | [c, ...] | Computes $c$ by rotating a 32-bit representation of $a$ to the right by $b$ bits. <br> Undefined if $a \ge 2^{32}$ or $b > 31$ |
| u32rotr <br> - *(23 cycles)* <br> u32rotr.*b* <br> - *(3 cycles)* | [b, a, ...] | [c, ...] | Computes $c$ by rotating a 32-bit representation of $a$ to the right by $b$ bits. <br> Undefined if $a \ge 2^{32}$ or $b > 31$ |
| u32popcnt <br> - *(33 cycles)* | [a, ...] | [b, ...] | Computes $b$ by counting the number of set bits in $a$ (hamming weight of $a$). <br> Undefined if $a \ge 2^{32}$ |
| u32clz <br> - *(37 cycles)* | [a, ...] | [b, ...] | Computes $b$ as a number of leading zeros of $a$. <br> Undefined if $a \ge 2^{32}$ |
| u32clz <br> - *(42 cycles)* | [a, ...] | [b, ...] | Computes $b$ as a number of leading zeros of $a$. <br> Undefined if $a \ge 2^{32}$ |
| u32ctz <br> - *(34 cycles)* | [a, ...] | [b, ...] | Computes $b$ as a number of trailing zeros of $a$. <br> Undefined if $a \ge 2^{32}$ |
| u32clo <br> - *(36 cycles)* | [a, ...] | [b, ...] | Computes $b$ as a number of leading ones of $a$. <br> Undefined if $a \ge 2^{32}$ |
| u32clo <br> - *(41 cycles)* | [a, ...] | [b, ...] | Computes $b$ as a number of leading ones of $a$. <br> Undefined if $a \ge 2^{32}$ |
| u32cto <br> - *(33 cycles)* | [a, ...] | [b, ...] | Computes $b$ as a number of trailing ones of $a$. <br> Undefined if $a \ge 2^{32}$ |


Expand Down
6 changes: 3 additions & 3 deletions stdlib/asm/math/u64.masm
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ end
#! error.
#! Stack transition looks as follows:
#! [b, a_hi, a_lo, ...] -> [c_hi, c_lo, ...], where c = a << b mod 2^64.
#! This takes 40 cycles.
#! This takes 44 cycles.
export.rotr
push.31
dup.1
Expand Down Expand Up @@ -609,7 +609,7 @@ end
#! The input value is assumed to be represented using 32 bit limbs, but this is not checked.
#! Stack transition looks as follows:
#! [n_hi, n_lo, ...] -> [clz, ...], where clz is a number of leading zeros of value n.
#! This takes 43 cycles.
#! This takes 48 cycles.
export.clz
dup.0
eq.0
Expand Down Expand Up @@ -650,7 +650,7 @@ end
#! The input value is assumed to be represented using 32 bit limbs, but this is not checked.
#! Stack transition looks as follows:
#! [n_hi, n_lo, ...] -> [clo, ...], where clo is a number of leading ones of value n.
#! This takes 42 cycles.
#! This takes 47 cycles.
export.clo
dup.0
eq.4294967295
Expand Down

0 comments on commit 245e89c

Please sign in to comment.