path: root/6/isel.c
AgeCommit message (Collapse)Author
2017-09-11Fix indentation.Ori Bernstein
GCC has silly warnings.
2017-09-10Emit rotl/rotr instructions.Ori Bernstein
2017-09-10Format whitespace.Ori Bernstein
2017-07-09Style(9)-ify.Ori Bernstein
2017-03-20Step by line in gdb.Ori Bernstein
I guess it's a good idea.
2017-01-02Fix clang warnings.Ori Bernstein
Apparently enums getting promoted to ints in va_start() is undefined behavior. This is stupid.
2016-02-22Extract util functions into separate dir from parse/Ori Bernstein
2016-02-20Start refactoringOri Bernstein
Split flattening and lowering.
2016-02-13Eliminate special case instructions.Ori Bernstein
They're used rarely, and are clunky. If your types are big enough that you need to blit them regularly, just use memops code.
2016-02-13Same treatment for 'repstosb'Ori Bernstein
2016-02-13And correctly null terminate arg lists.Ori Bernstein
2016-02-13Save regs correctly around rep movsOri Bernstein
2016-01-26Remove the '$' shorthand for end of array.Ori Bernstein
2015-12-28Fix union alignment.Ori Bernstein
2015-12-28Remove leftover debugging cruft.Ori Bernstein
2015-12-28Fix alignment in argument passing.Ori Bernstein
The alignment of a compound type is equal to the maximum alignment of its members, so your array shouldn't be aligned. When setting up arguments, though, I was accidentally using the size of the type instead of the alignment. Fixes #30
2015-12-15Don't die on zero sized structs.Ori Bernstein
2015-12-15More fixes to void values.Ori Bernstein
We now unbreak varargs, and compare them correctly.
2015-12-14Fix void arguments in argument lists.Ori Bernstein
'void' isn't a bloody integer.
2015-12-14Initial support for void as an expression.Ori Bernstein
2015-11-17MEGAPATCH: Tabification.Ori Bernstein
Tabs > spaces. By 4 spaces, to be precise. Let's use them.
2015-11-06Add support for '$' operator.Ori Bernstein
2015-10-19Work towards better match statements.Ori Bernstein
Generate decision trees from mi/match.c. Still slightly broken, so not enabled.
2015-09-27Don't index directly off of %rax.Ori Bernstein
We use it for function returns. We also use it for environment of called closures. This means we clobbered it. Oops.
2015-09-27Working closures.Ori Bernstein
2015-09-27Add indirect call operator.Ori Bernstein
This should allow us to split up direct calls and environment calls. Currently, it doesn't actually do anything.
2015-09-26Separate out the concepts of code and func ptrs.Ori Bernstein
In order to pass around functions with environments for closures, we need to refer to the type of a function pointer, as well as the type of code. This is ugly. When I rewrite the backend I should change it.
2015-09-26Fix up constant initialization a bit.Ori Bernstein
2015-09-25Refer to captured vars through env ptrOri Bernstein
The other half to populate an env pointer isn't there, so we haven't enabled this.
2015-09-19Store function args into the right place.Ori Bernstein
This probably means a register, but possibly a stack slot. Let loc() figure it out.
2015-09-14Fix alignment of function args.Ori Bernstein
2015-08-24Revert "Generates 'rol' instructions."Ori Bernstein
This reverts commit 6a921aa5b2045b172370c1677c1e3f75b8c3cfc4. This broke sha1 hashing.
2015-08-23Generates 'rol' instructions.Ori Bernstein
This doesn't seem to have the performance effect I was hoping for with the sha1 calculaton, but it still improves code gen time, since there are fewer dumb, wasteful instructions.
2015-08-23Merge branch 'peephole-opt'Ori Bernstein
2015-08-20Update Plan 9 build for new ABI.Ori Bernstein
2015-08-21Get closer to the C ABIOri Bernstein
2015-08-19Start using mostly caller save ABI.Ori Bernstein
2015-07-24Replace snprintf with a variant that asserts when out of buffer.Ori Bernstein
Let's not happy silent truncate.
2015-07-16Remove janky return register crud for stack types.Ori Bernstein
We don't return in a register. Why are we trying to pick one?
2015-07-05Add proper support for a 'gap' variable.Ori Bernstein
'_' is now a reserved token.
2015-07-05Improve error messages.Ori Bernstein
2015-05-08Use before def checking is closer to working.Ori Bernstein
Reduce spurious errors.
2015-05-07Add 'undef' operator.Ori Bernstein
Marks values as undefined, useful for reaching defn dummy analysis.
2015-05-06Compile error on reaching end of func without return.Ori Bernstein
2015-02-09Fix int->float conversion.Ori Bernstein
2015-02-07Put the rhs of the multiplication operator into a reg.Ori Bernstein
This needs to happen to avoid errors in code gen.
2015-01-25Clear structs.Ori Bernstein
When creating stack structs, clear them. TODO: only clear uninitialized values.
2015-01-06Improve error messages.Ori Bernstein
This involved lots of table changes.
2014-12-26Fix a few typos.Ori Bernstein
2014-12-26Sign extend byte regs for signed division.Ori Bernstein