summary refs log tree commit diff
AgeCommit message (Collapse)Author
2015-09-15add basic support for stack allocationQuentin Carbonneaux
2015-09-15minor size optimization for 0XSetQuentin Carbonneaux
2015-09-15fix typos in selcmp and commentQuentin Carbonneaux
2015-09-15comment about immutablesQuentin Carbonneaux
2015-09-15fail on constant comparisonsQuentin Carbonneaux
In the future they will be eliminated by constant propagation.
2015-09-15add a small size optimization to emitQuentin Carbonneaux
2015-09-15support for large constantsQuentin Carbonneaux
It was not as simple as I thought. All constants used in 32b context get truncated to 32 bits. All constants in 64b contexts can either remain as immutables are have to be evicted in a register, this choice is taken in noimm(). The case of the comparison needs to be documented since the context is not clearly 32 or 64 bits. I am still unsure if this is fully correct.
2015-09-15store gcd result in aQuentin Carbonneaux
2015-09-15use proper store suffix in max testQuentin Carbonneaux
2015-09-15split store into store{w,l}Quentin Carbonneaux
2015-09-15prefix register macrosQuentin Carbonneaux
2015-09-15fix my sloppy understanding of x86 assembly!Quentin Carbonneaux
2015-09-15use round-robin in rallocQuentin Carbonneaux
This gives a more uniform use of the registers.
2015-09-15add funny little max ssa testQuentin Carbonneaux
2015-09-15cosmeticsQuentin Carbonneaux
2015-09-15movsb is not movsbl without suffix...Quentin Carbonneaux
2015-09-15attempt factoring store emission codeQuentin Carbonneaux
2015-09-15parse variants of storeQuentin Carbonneaux
2015-09-15ugly support for store/loadQuentin Carbonneaux
2015-09-15parse operations with no resultQuentin Carbonneaux
2015-09-15simplify parsingQuentin Carbonneaux
2015-09-15add nmem to opdesc for use in the spillerQuentin 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-15add some load/store operationsQuentin Carbonneaux
2015-09-15fix wrong instruction in emitQuentin Carbonneaux
2015-09-15forbid two memory operands for comparisonsQuentin Carbonneaux
2015-09-15fix a bug in setlocQuentin Carbonneaux
The way we detected if limit had spilled a variable was incorrect. This is because two consecutive calls to limit could require a spill of the same variable. Instead, we now use a return value from limit. Note that this is still not so ideal. Indeed, it works properly only when limit spills one value only, if not, we should return a bitset. In the current use scheme of limit, this invariant is true but ideally we would like to call limit with *all arguments added at once*, not one after the other.
2015-09-15add very nice spilling stress testQuentin Carbonneaux
2015-09-15minor change in rpo walkingQuentin Carbonneaux
2015-09-15simplify frequent pred detection in regaQuentin Carbonneaux
2015-09-15factor some comparison emitting codeQuentin Carbonneaux
2015-09-15add some more specific commentsQuentin Carbonneaux
2015-09-15the only wrong use count is the one of rQuentin Carbonneaux
2015-09-15I forgot cmp as flag setting instruction!Quentin Carbonneaux
2015-09-15jez becomes jnz, complete cmp+jmp contractionQuentin Carbonneaux
2015-09-15implement smarter compare+branchQuentin Carbonneaux
2015-09-15split cmp in two sizesQuentin Carbonneaux
2015-09-15get rid of the iteration macroQuentin Carbonneaux
2015-09-15fix two bugs in iselQuentin Carbonneaux
2015-09-15fix 2 bad bugs in rega and improve substractionQuentin Carbonneaux
The substraction contrained the register allocator to allocate a different register for the result and the second operand, now, we use a neg trick to compile it down. The machinery that was setup is, regardless, interesting and will have to be used for floating point computations (division). The first bug in rega made broke the explicited loop invariant: we were using register allocation unavailable information from other blocks. It's still unclear how we got wrong results from that considering mappings are all 0-initialized. The second bug is a stupid one, one sizeof operator was missing from a memcpy...
2015-09-15use nreg only when != NRegQuentin Carbonneaux
2015-09-15use a temporary for constant comparisonsQuentin Carbonneaux
2015-09-15fix limit bug in spillQuentin Carbonneaux
I think this was not a big issue because the register allocator does not consume a register when it encounters obviously dead code.
2015-09-15remove useless TODO for nowQuentin Carbonneaux
2015-09-15quick fix for comparisons with constantsQuentin Carbonneaux
2015-09-15start work on comparisonsQuentin Carbonneaux
There are two things I overlooked so far. 1. Binary instructions like cmp that do not have a result in registers need the size suffix sometimes, for example when comparing a spill location with a constant. 2. The register allocator needs to be adapted to support the comparison instruction: it is not possible to compare two spill locations without using a register.
2015-09-15use cmp $0, it works with spill slotsQuentin Carbonneaux
2015-09-15use correct sizes during reg allocationQuentin Carbonneaux
2015-09-15print registers with numbersQuentin Carbonneaux
2015-09-15adapt emit to new Ref settingQuentin Carbonneaux
2015-09-15use regs of the correct type in iselQuentin Carbonneaux