Syscalls: write file + initial support for .data segment#142
Merged
pointbazaar merged 9 commits intomasterfrom Mar 13, 2025
Merged
Syscalls: write file + initial support for .data segment#142pointbazaar merged 9 commits intomasterfrom
pointbazaar merged 9 commits intomasterfrom
Conversation
- Add tables/data to represent our .data segment - Add compiler/main/analyzer/data to extract string literals - Emit .data section with symbols and data for the strings - Adjust examples/assert_examples.sh to not check for newline at the end of file. Since struct StringConst does not support this right now.
✅ Deploy Preview for espl1000 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Previously, 2 distinct strings could be mapped to the same symbol. This should hopefully not happen now.
Instead of hardcoding (just done for PoC), define a function 'data_string_offset' to return the offset in DataTable for a string.
oopsie, must have accidentally copied that. Unused file, builds without that.
This is so that they can be passed into functions expecting C strings which are NULL-terminated. - fix tac/tac_str.c to print width of load/store. - fix examples/syscalls/read_file/read_file.dg to read from it's own source file and print the first few chars. Also add a .stdout file there so it gets picked up by the test suite.
Propagate the escaped chars into the assembly. NASM supports these when the string appears in backticks [1]. References: [1] https://www.cs.ubbcluj.ro/~vancea/asc/practic/nasm_html/nasmdoc3.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.