Skip to content

Commit

Permalink
fix compiler exp
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrk24 committed Nov 20, 2023
1 parent c806033 commit 395b8ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. See [Keep a

## Unreleased

### Fixed

- The EXP opcode now behaves consistently between the interpreter and the C compiler.

### Added

- You can now customize the colors of the threads in the online debugger.
Expand Down
2 changes: 1 addition & 1 deletion src/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void compiler::get_c_code(const instruction& i, std::ostream& os, bool assume_as
cerr << "Nondeterministic instructions are not yet supported for compiled programs." << endl;
exit(EXIT_FAILURE);
case op::EXP:
os << "lws_push(stack, 1 << lws_pop(stack));";
os << "lws_push(stack, 1 << (lws_pop(stack) + 8) >> 8);";
return;
case op::SWP:
os << "{"
Expand Down
1 change: 1 addition & 0 deletions tests/compiler/exp

0 comments on commit 395b8ed

Please sign in to comment.