New answers tagged assembly
3
votes
Optimizing Masked Bit Shifts of Gray Code with AND Operation and Parity Count
This function is faster, but it crashes in the corner case where SHIFT_MASK == 0 because it loses the least significant bit. This issue can be resolved by zero ...
7
votes
Accepted
Optimizing Masked Bit Shifts of Gray Code with AND Operation and Parity Count
Latency analysis
The "generic" (not specific to any particular microarchitecture) latency analysis you did is not bad. There are some extra quirks though:
...
6
votes
Optimizing Masked Bit Shifts of Gray Code with AND Operation and Parity Count
CPUs are much more complex
Level 8: ret
You are looking at the instructions from the stand-alone functions, but those are never actually ...
3
votes
A PicoBlaze assembly program that converts binary numbers to octal
Name all the registers
namereg s0, switches
namereg sa, last_digits
namereg sc, first_digit
input switches, 0
Two lefts equal six rights
For the most significant ...
5
votes
Accepted
A PicoBlaze assembly program that converts binary numbers to octal
masking
sub s0, 300'o
less_than_300:
That wasn't obvious to me.
Wouldn't the relevant magic number be 377'o, instead?
And why ...
Top 50 recent answers are included
Related Tags
assembly × 347x86 × 77
performance × 52
beginner × 50
c × 46
linux × 31
strings × 25
c++ × 23
nasm × 23
algorithm × 19
windows × 19
integer × 18
amd64 × 14
bitwise × 11
primes × 10
brainfuck × 10
compiler × 10
reinventing-the-wheel × 9
console × 9
sse × 9
fizzbuzz × 8
embedded × 8
simd × 8
io × 7
arm × 7