Skip to content

structs on stack#122

Merged
pointbazaar merged 6 commits intomasterfrom
syscalls
Feb 9, 2025
Merged

structs on stack#122
pointbazaar merged 6 commits intomasterfrom
syscalls

Conversation

@pointbazaar
Copy link
Owner

No description provided.

Add store width in bytes.
The IR statement TAC_STORE_CONST_ADDR can be replaced by a sequence of

TAC_CONST_VALUE
TAC_STORE

which simplifies the IR.

And then later arch-specific optimizer module for e.g. AVR
can merge instructions to achieve the optimal code for storing
at a const address, as was the case before.

resolves #113
this can be replaced by sequence of

TAC_CONST_VALUE
TAC_LOAD

The code size bloat in the emitted assembly code can then later be
removed again by an arch-specific optimizer module to merge the
instructions if possible.

resolves #112
@netlify
Copy link

netlify bot commented Feb 9, 2025

Deploy Preview for espl1000 ready!

Name Link
🔨 Latest commit c5eba5a
🔍 Latest deploy log https://app.netlify.com/sites/espl1000/deploys/67a932529f25450008e3712b
😎 Deploy Preview https://deploy-preview-122--espl1000.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pointbazaar pointbazaar force-pushed the syscalls branch 9 times, most recently from 9a1842f to 5f80043 Compare February 9, 2025 22:07
structs can be stored on the stack.

Additionally, a new notation for declaring local variables:

```
LocalVarDeclStmt ::= 'local' Type Id ';'
```

Also remove 'first_occur' from LVST line.
It was not used anymore.
Examples for storing structs as local variables.

Multiple examples with different levels of nesting.

Since '.exitcode' files are present, these examples are also tests for
the common code and the x86-64 backend.
@pointbazaar pointbazaar merged commit a3dead4 into master Feb 9, 2025
13 checks passed
@pointbazaar pointbazaar deleted the syscalls branch February 9, 2025 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant