Skip to content

interp: support GEP on fixed (MMIO) addresses #1655

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

Merged
merged 1 commit into from
Mar 12, 2021
Merged

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Feb 22, 2021

GetElementPtr would not work on values that weren't pointers. Because fixed addresses (often used in memory-mapped I/O) are integers rather than pointers in interp, it would return an error.

This resulted in the teensy40 target not compiling correctly since the interp package rewrite. This commit should fix that.

This should fix the issue in #1650.

@aykevl
Copy link
Member Author

aykevl commented Feb 23, 2021

That's not on Xtensa, that's on the pca10040.
...perhaps I should have run a few more tests before submitting this PR.

@aykevl aykevl force-pushed the interp-mmio-gep branch from 192a147 to 68d2c08 Compare March 4, 2021 20:16
GetElementPtr would not work on values that weren't pointers. Because
fixed addresses (often used in memory-mapped I/O) are integers rather
than pointers in interp, it would return an error.

This resulted in the teensy40 target not compiling correctly since the
interp package rewrite. This commit should fix that.
@aykevl aykevl force-pushed the interp-mmio-gep branch from 68d2c08 to 57a2dd0 Compare March 4, 2021 20:17
@aykevl
Copy link
Member Author

aykevl commented Mar 5, 2021

@ardnew if you are available, can you maybe re-test this PR with the Teensy40? I don't think my recent change would affect the Teensy 4.0, but it would be good to check just in case.

@deadprogram
Copy link
Member

I just tried the Teensy 4.0 with this branch and it did not correct the issue.

@aykevl
Copy link
Member Author

aykevl commented Mar 5, 2021

Did you try the other UART (not UART0)?

@ardnew
Copy link
Contributor

ardnew commented Mar 7, 2021

There are some changes I've made to the Teensy 4.0 that could help address this issue. I've found that UART.txBuffer is getting cleaned up too early, causing a segfault in the interrupt handler. Moving its allocation to the UART declaration (same place UART.Buffer is allocated) fixes the issue.

Have there been changes to the garbage collector? I'm not sure which commit to look for that would have introduced a change like this.

@deadprogram
Copy link
Member

Tested on Teensy 4.0 with the revised #1650 so this PR here can now be merged.

@deadprogram deadprogram merged commit 34b50ef into dev Mar 12, 2021
@deadprogram deadprogram deleted the interp-mmio-gep branch March 12, 2021 11:35
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.

3 participants