Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Decoder Documentation#31

Open
mmsc2 wants to merge 7 commits intomainfrom
DecoderDocumentation
Open

Decoder Documentation#31
mmsc2 wants to merge 7 commits intomainfrom
DecoderDocumentation

Conversation

@mmsc2
Copy link
Copy Markdown
Contributor

@mmsc2 mmsc2 commented Jul 26, 2023

No description provided.

Comment thread README.md Outdated
Comment thread README.md
Comment thread src/instruction.h
Comment thread README.md Outdated
Comment thread README.md
@jrchatruc
Copy link
Copy Markdown
Collaborator

jrchatruc commented Jul 27, 2023

Give an example of an actual simple cairo assembly instruction and how it encodes to bytecode, something like ap++. You can take one from the Cairo paper, pages 27/28. This will then lead you to talk about instruction execution and how it works in detail, which you can document on your execution PR

Copy link
Copy Markdown
Collaborator

@jrchatruc jrchatruc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a bunch of comments

Comment thread README.md Outdated
};
```
to extract the dst_reg flag we can define a mask 'DST_REG_MASK' with value 0x0001 and and a padding 'DST_REG_OFF' with value 0 because it is the less significant bit, then we can perform the operation
'(((encoded_instr) >> 48) & DST_REG_MASK) >> DST_REG_OFF' to obtain the dst_reg flag. We shifted 48 bits first because there is where the flags start.
Copy link
Copy Markdown
Collaborator

@jrchatruc jrchatruc Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is not rendering well because you are using ' to enclose it instead of `. Consider changing it or just moving to a code block with using ```

The same goes for a bunch of code and instructions mentioned shown above

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants