forked from swissmicros/SDKdemo
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement binary shift and rotate instructions #622
Comments
c3d
added a commit
that referenced
this issue
Nov 30, 2023
Implement the following instructions: * `RotateLeft` (`RL`) * `RotateRight` (`RR`) * `RotateLeftByte` (`RLB`) * `RotateRightByte` (`RRB`) * `ShiftLeft` (`SL`) * `ShiftRight` (`SR`) * `ShiftLeftByte` (`SLB`) * `ShiftRightByte` (`SRB`) * `ArithmeticShiftRight` (`ASR`) DB48X adds counted variants of the above, that shift by an amount other than one or eight. * `RotateLeftCount` (`RLC`), rotating left several bits * `RotateRightCount` (`RRC`), rotating right several bits * `ShiftLeftCount` (`SLC`), shift left several bits * `ShiftRightCount` (`SRC`), shift right several bits * `ArithmeticShiftRightCount` (`ASRC`), arithmetic shift right several bits Also slight rework of the `BasesMenu`. Fixes: #622 Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
c3d
added a commit
that referenced
this issue
Dec 25, 2023
This release was a bit longer in coming than earlier ones, because we are about to reach the limits of what can fit on a DM42. This release uses 711228 bytes out of the 716800 (99.2%). Without the Intel Decimal Library code, we use only 282980 bytes. This means that the Intel Decimal Library code uses 60.2% of the total code space. Being able to move further requires a rather radical rethinking of the project, where we replace the Intel Decimal Library with size-optimized decimal code. As a result, release 0.5.2 will be the last one using the Intel Decimal Library, and is release in parallel with 0.6.0, which switches to a table-free and variable-precisions implementation of decimal code that uses much less code space. The two releases should otherwise be functionally identical **New features** * Shift and rotate instructions (#622) * Add `CompatibleTypes` and `DetsailedTypes` setting to control `Type` results * Recognize HP-compatible negative values for flags, e.g. `-64 SF` (#625) * Add settings to control multiline result and stack display (#634) **Bug fixes** * Truncate to `WordSize` the small results of binary operations (#624) * Fix day-of-week shortcut in simulator * Avoid double-evaluation of immediate commands when there is no help * Generate an error when selecting base 1 (#628) * Avoid `Number too big` error on based nunbers * Correctly garbage-collect menu entries (#630) * Select default settings that allow solver to find solutions (#627) * Fix display of decimal numbers (broken by multi-line display) * Fix rendering of menu entries for `Fix`, `Std`, etc * Detect non-finite results in arithmetic, e.g. `(-8)^0.3`m (#635, #639) * Fix range-checking for `Dig` to allow `-1` value * Accept large values for `Fix`, `Sci` and `Eng` (for variable precision) * Restore missing last entry in built-in units menu (#638) * Accept `Hz` and non-primary units as input for `ConvertToUnitPrefix` (#640) * Fix LEB128 encoding for signed value 64 and similar (#642) * Do not parse `IfThenElse` as a command * Do not consider `E` as a digit in decimal numbers (#643) * Do not parse `min` as a function in units, but as minute (#644) **Improvements** * Add `OnesComplement` flag for binary operation (not used yet) * Add `ComplexResults` (-103) flag (not used yet) * Accept negative values for `B→R` (according to `WordSize`) * Add documentation for `STO` and `RCL` accessing flash storage * Mention `True` and `False` in documentation * Rename `MaxBigNumBits` to `MaxNumberBits` * Return HP-compatible values from `Type` function * Minor optimization of flags implementation * Catalog auto-completion now suggests all possible spellings (#626) * Add aliases for `CubeRoot` and `Hypothenuse` * Align based number promotion rules to HP calculators (#629) * Expand the range of garbage collector integrity check on simulator * Show command according to preferences in error messages (#633) * Avoid crash in `debug_printf` if used before font initialization * Update performance data in documentation * Add ability to disable any reference to Intel Decimal Floating-point library * Simplify C++ notations for safe pointers (`+x` and `operartor bool()`) * Fix link to old `db48x` project in `README.md` Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
c3d
added a commit
that referenced
this issue
Dec 25, 2023
This release was a bit longer in coming than earlier ones, because we are about to reach the limits of what can fit on a DM42. This release uses 711228 bytes out of the 716800 (99.2%). Without the Intel Decimal Library code, we use only 282980 bytes. This means that the Intel Decimal Library code uses 60.2% of the total code space. Being able to move further requires a rather radical rethinking of the project, where we replace the Intel Decimal Library with size-optimized decimal code. As a result, release 0.5.2 will be the last one using the Intel Decimal Library, and is release in parallel with 0.6.0, which switches to a table-free and variable-precisions implementation of decimal code that uses much less code space. The two releases should otherwise be functionally identical **New features** * Shift and rotate instructions (#622) * Add `CompatibleTypes` and `DetsailedTypes` setting to control `Type` results * Recognize HP-compatible negative values for flags, e.g. `-64 SF` (#625) * Add settings to control multiline result and stack display (#634) **Bug fixes** * Truncate to `WordSize` the small results of binary operations (#624) * Fix day-of-week shortcut in simulator * Avoid double-evaluation of immediate commands when there is no help * Generate an error when selecting base 1 (#628) * Avoid `Number too big` error on based nunbers * Correctly garbage-collect menu entries (#630) * Select default settings that allow solver to find solutions (#627) * Fix display of decimal numbers (broken by multi-line display) * Fix rendering of menu entries for `Fix`, `Std`, etc * Detect non-finite results in arithmetic, e.g. `(-8)^0.3`m (#635, #639) * Fix range-checking for `Dig` to allow `-1` value * Accept large values for `Fix`, `Sci` and `Eng` (for variable precision) * Restore missing last entry in built-in units menu (#638) * Accept `Hz` and non-primary units as input for `ConvertToUnitPrefix` (#640) * Fix LEB128 encoding for signed value 64 and similar (#642) * Do not parse `IfThenElse` as a command * Do not consider `E` as a digit in decimal numbers (#643) * Do not parse `min` as a function in units, but as minute (#644) **Improvements** * Add `OnesComplement` flag for binary operation (not used yet) * Add `ComplexResults` (-103) flag (not used yet) * Accept negative values for `B→R` (according to `WordSize`) * Add documentation for `STO` and `RCL` accessing flash storage * Mention `True` and `False` in documentation * Rename `MaxBigNumBits` to `MaxNumberBits` * Return HP-compatible values from `Type` function * Minor optimization of flags implementation * Catalog auto-completion now suggests all possible spellings (#626) * Add aliases for `CubeRoot` and `Hypothenuse` * Align based number promotion rules to HP calculators (#629) * Expand the range of garbage collector integrity check on simulator * Show command according to preferences in error messages (#633) * Avoid crash in `debug_printf` if used before font initialization * Update performance data in documentation * Add ability to disable any reference to Intel Decimal Floating-point library * Simplify C++ notations for safe pointers (`+x` and `operartor bool()`) * Fix link to old `db48x` project in `README.md` Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current missing binary instructions include:
RotateLeft
(RL
)RotateRight
(RR
)RotateLeftByte
(RLB
)RotateRightByte
(RRB
)ShiftLeft
(SL
)ShiftRight
(SR
)ShiftLeftByte
(SLB
)ShiftRightByte
(SRB
)ArithmeticShiftRight
(ASR
)DB48X useful extensions would include:
RotateLeftCount
(RLC
), rotating left several bitsRotateRightCount
(RRC
), rotating right several bitsShiftLeftCount
(SLC
), shift left several bitsShiftRightCount
(SRC
), shift right several bitsArithmeticShiftRightCount
(ASRC
), arithmetic shift right several bitsThe text was updated successfully, but these errors were encountered: