Skip to content

implement airTrunc for @truncate - #1

Closed
SoraTenshi wants to merge 42 commits into
Rexicon226:riscvfrom
SoraTenshi:riscv
Closed

SoraTenshi wants to merge 42 commits into
Rexicon226:riscvfrom
SoraTenshi:riscv

Conversation

@SoraTenshi

Copy link
Copy Markdown

i also added in the MIR instruction list xor

offset isn't being calculated correctly for beqz. for some reason different offset in lowerMir and inside of the emit.
- before we were storing each arg in it's own function arg register. with this commit now we store the args in the fa register before calling as per the RISC-V calling convention, however as soon as we enter the callee, aka in airArg, we spill the argument to the stack. this allows us to spend less effort worrying about whether we're going to clobber the function arguments when another function is called inside of the callee.

- we were actually clobbering the fa regs inside of resolveCallingConvetion, because of the null argument to allocReg. now each lock is stored in an array which is then iterated over and unlocked, which actually aids in the first point of this commit.
lots of thinking later, ive begun to grasp my head around how the pointers should work. this commit allows basic pointer loading and storing to happen.
when the struct is in stack memory, we access it using a byte-offset,
because that's how the stack works. on the other hand when the struct
is in a register, we are working with bits and the field offset should
be a bit offset.
better indicates when we have controlled panic rather than a segfault.
we can use `std.os.exit` now! because it only upcasts.
@Rexicon226
Rexicon226 force-pushed the riscv branch 3 times, most recently from fc4053a to 7053eb0 Compare April 23, 2024 04:35
@Rexicon226
Rexicon226 force-pushed the riscv branch 7 times, most recently from 1745a3c to 21da821 Compare May 11, 2024 20:23
@Rexicon226
Rexicon226 force-pushed the riscv branch 3 times, most recently from 9c47f95 to 5e3e464 Compare May 26, 2024 06:09
@Rexicon226
Rexicon226 force-pushed the riscv branch 3 times, most recently from 2d8f04d to e60c581 Compare June 13, 2024 11:42
@Rexicon226
Rexicon226 force-pushed the riscv branch 2 times, most recently from d2a65f9 to 527f69b Compare July 10, 2024 05:44
@Rexicon226
Rexicon226 force-pushed the riscv branch 6 times, most recently from 6d02831 to 8da212c Compare July 26, 2024 11:20
@Rexicon226
Rexicon226 force-pushed the riscv branch 4 times, most recently from eb4ce3f to 0764490 Compare August 2, 2024 00:31
@Rexicon226 Rexicon226 closed this Aug 12, 2024
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.

2 participants