Skip to content
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

fix: abi transformation tests #284

Merged
merged 18 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4c38c07
fix(codegen): ensure callee results are pushed on stack in correct order
bitwalker Aug 28, 2024
77a63e4
fix(codegen): ensure global initializers are set during rodata init
bitwalker Aug 28, 2024
6a6f774
fix(sdk): force all allocations to be minimally word-aligned
bitwalker Aug 28, 2024
7b52f31
fix(sdk): ensure we pass a miden-native ptr value to get_inputs
bitwalker Aug 28, 2024
affb200
fix(frontend-wasm): incorrect types applied to certain primops
bitwalker Aug 28, 2024
a2d6bc7
fix(frontend-wasm): do not apply redundant casts
bitwalker Aug 28, 2024
89cb0d6
fix(debugger): infinite loop in breakpoint id computation
bitwalker Aug 28, 2024
fc9ff3a
chore(codegen): be consistent about the way in which we push to stack
bitwalker Aug 28, 2024
cb52312
fix(codegen): incorrect handling of multi-result instructions
bitwalker Aug 28, 2024
9d091c0
fix(codegen): incorrect lowering of global.{load,iadd,symbol}
bitwalker Aug 28, 2024
fe8aa70
fix(codegen): make sure we always drop unused instruction results
bitwalker Aug 28, 2024
e77f235
chore(codegen): clippy suggested some improvements
bitwalker Aug 28, 2024
e6a3e95
fix(codegen): incorrect order of elements for word-oriented loads/stores
bitwalker Aug 29, 2024
c010bae
fix: swap the lo and mid parts in the most shifted case in `load_dw`
greenhat Aug 29, 2024
7747dcd
test: re-enable get_inputs test
bitwalker Aug 29, 2024
ee46fe3
chore: update expect tests due to codegen changes
bitwalker Aug 29, 2024
65365a0
fix(codegen): broken return via pointer transformation
bitwalker Aug 30, 2024
ba72ef6
chore: update expect output for sdk account/wallet tests
bitwalker Aug 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
416 changes: 214 additions & 202 deletions codegen/masm/intrinsics/mem.masm

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions codegen/masm/src/codegen/emit/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,10 @@ impl<'a> OpEmitter<'a> {
}
ty => unimplemented!("add is not yet implemented for {ty}"),
}
self.push(ty);
if overflow.is_overflowing() {
self.push(Type::I1);
}
self.push(ty);
}

pub fn add_imm(&mut self, imm: Immediate, overflow: Overflow, span: SourceSpan) {
Expand Down Expand Up @@ -393,10 +393,10 @@ impl<'a> OpEmitter<'a> {
}
ty => unimplemented!("add is not yet implemented for {ty}"),
}
self.push(ty);
if overflow.is_overflowing() {
self.push(Type::I1);
}
self.push(ty);
}

pub fn sub(&mut self, overflow: Overflow, span: SourceSpan) {
Expand Down Expand Up @@ -425,10 +425,10 @@ impl<'a> OpEmitter<'a> {
}
ty => unimplemented!("sub is not yet implemented for {ty}"),
}
self.push(ty);
if overflow.is_overflowing() {
self.push(Type::I1);
}
self.push(ty);
}

pub fn sub_imm(&mut self, imm: Immediate, overflow: Overflow, span: SourceSpan) {
Expand Down Expand Up @@ -457,10 +457,10 @@ impl<'a> OpEmitter<'a> {
}
ty => unimplemented!("sub is not yet implemented for {ty}"),
}
self.push(ty);
if overflow.is_overflowing() {
self.push(Type::I1);
}
self.push(ty);
}

pub fn mul(&mut self, overflow: Overflow, span: SourceSpan) {
Expand Down Expand Up @@ -505,10 +505,10 @@ impl<'a> OpEmitter<'a> {
}
ty => unimplemented!("mul for {ty} is not supported"),
}
self.push(ty);
if overflow.is_overflowing() {
self.push(Type::I1);
}
self.push(ty);
}

pub fn mul_imm(&mut self, imm: Immediate, overflow: Overflow, span: SourceSpan) {
Expand Down Expand Up @@ -539,10 +539,10 @@ impl<'a> OpEmitter<'a> {
}
ty => unimplemented!("mul for {ty} is not supported"),
}
self.push(ty);
if overflow.is_overflowing() {
self.push(Type::I1);
}
self.push(ty);
}

pub fn checked_div(&mut self, span: SourceSpan) {
Expand Down
Loading
Loading