Age | Commit message (Collapse) | Author | |
---|---|---|---|
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 | fix typos in selcmp and comment | Quentin Carbonneaux | |
2015-09-15 | comment about immutables | Quentin Carbonneaux | |
2015-09-15 | fail on constant comparisons | Quentin Carbonneaux | |
In the future they will be eliminated by constant propagation. | |||
2015-09-15 | support for large constants | Quentin 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-15 | split store into store{w,l} | Quentin Carbonneaux | |
2015-09-15 | fix my sloppy understanding of x86 assembly! | Quentin Carbonneaux | |
2015-09-15 | ugly support for store/load | Quentin Carbonneaux | |
2015-09-15 | factor some comparison emitting code | Quentin Carbonneaux | |
2015-09-15 | add some more specific comments | Quentin Carbonneaux | |
2015-09-15 | the only wrong use count is the one of r | Quentin Carbonneaux | |
2015-09-15 | I forgot cmp as flag setting instruction! | Quentin Carbonneaux | |
2015-09-15 | jez becomes jnz, complete cmp+jmp contraction | Quentin Carbonneaux | |
2015-09-15 | implement smarter compare+branch | Quentin Carbonneaux | |
2015-09-15 | split cmp in two sizes | Quentin Carbonneaux | |
2015-09-15 | fix two bugs in isel | Quentin Carbonneaux | |
2015-09-15 | use a temporary for constant comparisons | Quentin Carbonneaux | |
2015-09-15 | quick fix for comparisons with constants | Quentin Carbonneaux | |
2015-09-15 | start work on comparisons | Quentin 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-15 | use regs of the correct type in isel | Quentin Carbonneaux | |
2015-09-15 | use a new Ref type for registers | Quentin Carbonneaux | |
This might not be a good idea, the problem was that many spurious registers would be added to the Bits data-structures during compilation (and would always remain 0). However, doing the above modification de-uniformizes the handling of temps and regs, this makes the code longer and not really nicer. Also, additional Bits structures are required to track the registers independently. Overall this might be a bad idea to revert. | |||
2015-09-15 | patch isel to use symbol types | Quentin Carbonneaux | |
2015-09-15 | start work on word/long handling | Quentin Carbonneaux | |
2015-09-15 | replace IA with X for x64 instructions | Quentin Carbonneaux | |
2015-09-15 | avoid keyword clash by using cons for constants | Quentin Carbonneaux | |
2015-09-15 | add more printing support | Quentin Carbonneaux | |
2015-09-15 | isel logic was moved to spill | Quentin Carbonneaux | |
2015-09-15 | fix some instruction emitting code | Quentin Carbonneaux | |
2015-09-15 | define curi as a global too | Quentin Carbonneaux | |
2015-09-15 | fix small type issues | Quentin Carbonneaux | |
2015-09-15 | start simple work on isel | Quentin Carbonneaux | |