Skip to content

Commit

Permalink
Fixed incorrect test for 16 bit multiplies on P2
Browse files Browse the repository at this point in the history
  • Loading branch information
totalspectrum committed Feb 23, 2024
1 parent 35b3c43 commit 4b3de21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Version 6.9.0
- Fixed failure to allocate memory for local variables in some cases
- Fixed incorrect removal of some functions that were not completely inlined
- Fixed sizeof() for boolean types
- Fixed incorrect test for 16 bit multiplies on P2

Version 6.8.1
- Fixed using new keywords like `bytes` in parameters with default values
Expand Down
2 changes: 1 addition & 1 deletion backends/asm/outasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2215,7 +2215,7 @@ CompileMul(IRList *irl, AST *expr, int gethi, Operand *dest)
lhs = CompileExpression(irl, expr->left, NULL);
rhs = CompileExpression(irl, expr->right, NULL);
if (gl_p2 && gethi == 0) {
enum SixteenBitSafe sixteen_safe = is16BitCompatible(is16BitSafe(expr->left),is16BitSafe(expr->left));
enum SixteenBitSafe sixteen_safe = is16BitCompatible(is16BitSafe(expr->left),is16BitSafe(expr->right));
if (sixteen_safe) {
Operand *temp = NewFunctionTempRegister();
EmitMove(irl, temp, lhs, expr);
Expand Down

0 comments on commit 4b3de21

Please sign in to comment.