JackCotter / Microprocessing-on-Fedora

SENG440 project for programming a microprocessor on Fedora. Using Virtual-manager and QEMU.
0 stars 0 forks source link

Add CLZ instruction #13

Open charliewager opened 1 month ago

charliewager commented 1 month ago

Utilize the CLZ instruction to eliminate the if-block.

Details:

Example:

4bbit int chord = abs(CLZ val - 8) 4bit int step = mag << (abs(CLZ - 7))

8bit int result = sign << 7 | chord << 4 | step