Age | Commit message (Collapse) | Author | |
---|---|---|---|
2015-10-08 | allow multiple functions in file | Quentin Carbonneaux | |
2015-10-08 | emit alignment directives properly | Quentin Carbonneaux | |
2015-10-07 | finish implementing data parsing | Quentin Carbonneaux | |
2015-10-01 | support negative frame offsets in emit | Quentin Carbonneaux | |
They are used to access function parameters passed on the stack. | |||
2015-09-30 | uniformize alignment code in framesz() | Quentin Carbonneaux | |
2015-09-29 | wip on new stack slots (emit, spill) | Quentin Carbonneaux | |
2015-09-22 | parse return types of functions | Quentin Carbonneaux | |
2015-09-21 | emit syntactically valid calls | Quentin Carbonneaux | |
2015-09-20 | factor formatting inside emitf | Quentin Carbonneaux | |
2015-09-20 | simplify two loops with a pointer | Quentin Carbonneaux | |
2015-09-20 | save callee-save registers | Quentin Carbonneaux | |
2015-09-17 | add hack in emit to support stack arguments | Quentin Carbonneaux | |
The number stored in the .val field of SLOTs has to be sign extended, so we can reach into the caller's frame when necessary (arguments passed on the stack). | |||
2015-09-17 | start work on fuction parameters | Quentin Carbonneaux | |
2015-09-15 | hack to enable proper regalloc on calls | Quentin Carbonneaux | |
I add the dual to dummy uses: dummy defs. They are compiled to nothing, but help preserving the invariants I had when writing the register allocator. Clearly, there should be a better way. | |||
2015-09-15 | implement aggregate passing in regs | Quentin Carbonneaux | |
2015-09-15 | start function call lowering (wip) | Quentin Carbonneaux | |
2015-09-15 | start work on aggregate types | Quentin Carbonneaux | |
The parser now has some code to parse the description of structured types. I tried to be even less specific than LLVM "type" by creating just enough abstraction so that I can deal with both AARCH64 and x64. The base types used in the definition of an aggregate are really just syntactic sugar to give a structure a size and an alignment. Only the location of float components matters for the compilation. In particular this means that the front-ends have to know how the ABI works to pass/return small integer types. This also means that the font-end has to be aware of the layout of structures. Chris Lattner has a proposition [1] for LLVM that is still pending and goes in the direction of giving more control of the ABI the front-end. [1]: http://www.nondot.org/sabre/LLVMNotes/ExtendedIntegerResults.txt | |||
2015-09-15 | split some long calls | Quentin Carbonneaux | |
2015-09-15 | fix two bugs in new emit | Quentin Carbonneaux | |
2015-09-15 | update emit to the new setting | Quentin Carbonneaux | |
2015-09-15 | fix invalid test in emit | Quentin Carbonneaux | |
It could be that the destination of the copy is a spill location, so we have to check the type of i.to first. | |||
2015-09-15 | output labels only when necessary | Quentin Carbonneaux | |
2015-09-15 | change cmp $0, %reg, to test %reg, %reg | Quentin Carbonneaux | |
2015-09-15 | fix emit(OCopy) and use pointers in max.ssa | Quentin Carbonneaux | |
2015-09-15 | remove non-critical diagnostics | Quentin Carbonneaux | |
2015-09-15 | add truncation operation | Quentin Carbonneaux | |
It would be nicer to have some kind of subtyping where a l variable can be used in place of a w variable but it is more complications than a truncation insutruction. In some cases, it might be less efficient than the above solution by requiring two registers instead of one. (I.e when both the truncated variable and the long variable live together.) We have to see what are the usage patterns. | |||
2015-09-15 | new NAlign constant and fix frame size computation | Quentin Carbonneaux | |
2015-09-15 | move spill and emit to the new slot system | Quentin Carbonneaux | |
In emit, I worked a little to make sure that framesz works when we change the size of the svec array (if we need more alignments). | |||
2015-09-15 | add sign/zero extension operations | Quentin Carbonneaux | |
2015-09-15 | remove obsolete comment about MEM | Quentin Carbonneaux | |
It turned out to be not so useful to have a MEM type for references. Instead I used an OAddr instruction that translates simply to a lea. | |||
2015-09-15 | add the mul instruction | Quentin Carbonneaux | |
2015-09-15 | replace RMem refs with an OAddr opertation | Quentin Carbonneaux | |
2015-09-15 | compile branches on and using test | Quentin Carbonneaux | |
2015-09-15 | make sure eflags-writing do not disappear | Quentin Carbonneaux | |
This is a hack implementation, ideally I would like something cleaner. The problem is that regalloc thinks an instruction is dead code because it's not aware that it writes to eflags. | |||
2015-09-15 | tentative support for fast allocs | Quentin Carbonneaux | |
It seems that the MEM reference type is meaningless in too many positions. Because of this, it is unclear if we should keep it or just introduce a OAddr instruction that only accepts slots. Regardless of the above, the spilling module needs to use the new slot_() function, also, the emit function needs to fetch the size of the stack frame from the slot[] array. The naming is still very transitional, here is a list of all bogus names I can think of: - SLOT() - Tmp.spill - slot_ | |||
2015-09-15 | major lifting: get rid of RReg | Quentin Carbonneaux | |
I've been septic since I introduced it, this commit proves that it costs more than it helps. I've also fixed a bad bug in rega() where I alloc'ed the wrong size for internal arrays. Enums now have names so I can use them to cast in gdb to get the name corresponding to a constant. | |||
2015-09-15 | add basic support for stack allocation | Quentin Carbonneaux | |
2015-09-15 | minor size optimization for 0XSet | Quentin Carbonneaux | |
2015-09-15 | add a small size optimization to emit | Quentin Carbonneaux | |
2015-09-15 | split store into store{w,l} | Quentin Carbonneaux | |
2015-09-15 | prefix register macros | Quentin Carbonneaux | |
2015-09-15 | fix my sloppy understanding of x86 assembly! | Quentin Carbonneaux | |
2015-09-15 | cosmetics | Quentin Carbonneaux | |
2015-09-15 | movsb is not movsbl without suffix... | Quentin Carbonneaux | |
2015-09-15 | attempt factoring store emission code | Quentin Carbonneaux | |
2015-09-15 | ugly support for store/load | Quentin Carbonneaux | |
2015-09-15 | simplify parsing | Quentin Carbonneaux | |
2015-09-15 | add nmem to opdesc for use in the spiller | Quentin Carbonneaux | |
This new machine-independent mechanism might not be general enough in the long term but, now, it provides a flexible way to inform the spiller about the maximum number of arguments of an instruction that can be spill locations. | |||
2015-09-15 | add some load/store operations | Quentin Carbonneaux | |
2015-09-15 | fix wrong instruction in emit | Quentin Carbonneaux | |