ncatelli / spasm

An experimental multi-target assembler.
Apache License 2.0
4 stars 0 forks source link

Fix bugfix in bits method #119

Closed ncatelli closed 3 years ago

ncatelli commented 3 years ago

Introduction

This PR fixes an issue where values that have a least significant byte with 8 leading zeroes incorrectly is calculated as needing 0 bits to be expressed rather than requiring all bits to be expressible due to the leading byte.

Example would be a value you like 0x6000.

This is correctly calculated by the leading_zeroes method on the LeByteEncodedValue type and is fixed by updating the bits method to calculate it's needed bits by subtracting it's leading zeros from the total bits of the represented value.

Linked Issues

resolves #118

Dependencies

Test

Review

Deployment

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.1.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: