summary refs log tree commit diff
path: root/lisc/parse.c
AgeCommit message (Collapse)Author
2015-10-05factor vector duplication in vdup()Quentin Carbonneaux
2015-10-05rename blocka to ballocQuentin Carbonneaux
2015-10-05factor some utility functions/data in util.cQuentin Carbonneaux
2015-09-25move return type information into FnQuentin Carbonneaux
2015-09-22improve error reporting in the parserQuentin Carbonneaux
2015-09-22oops, missing newline in pretty-printerQuentin Carbonneaux
2015-09-22parse return types of functionsQuentin Carbonneaux
2015-09-21print size suffix for swapQuentin Carbonneaux
2015-09-18use new function syntax in testsQuentin Carbonneaux
2015-09-17pretty print OPar os parnQuentin Carbonneaux
2015-09-17parse parameter lists of functionsQuentin Carbonneaux
2015-09-15heavy modification of call handlingQuentin Carbonneaux
The IR generated by calls was very bulky because two instructions were used for marking the live range of a clobber. This patch attempts to store the information of what registers are use/def/clobber in the call instruction itself, this leads to more compact code (even more when we'll have SSE registers). However, I find that the amount of extra code needed is not really easonable. Fortunately it is not too invasive, thus if the complexity creeps in, it should be easy to revert.
2015-09-15cosmetic indentation style fixQuentin Carbonneaux
2015-09-15drop arity information from OpDescQuentin Carbonneaux
2015-09-15implement aggregate passing in regsQuentin Carbonneaux
2015-09-15start function call lowering (wip)Quentin Carbonneaux
2015-09-15add parsing code for function callsQuentin Carbonneaux
2015-09-15define a new CMPS macro, shorten TypeQuentin Carbonneaux
2015-09-15fix minor type parsing bugsQuentin Carbonneaux
2015-09-15start work on aggregate typesQuentin 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-15get rid of OTruncQuentin Carbonneaux
2015-09-15add a size to all operations (wip)Quentin Carbonneaux
2015-09-15add truncation operationQuentin 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-15add sign/zero extension operationsQuentin Carbonneaux
2015-09-15add the mul instructionQuentin Carbonneaux
2015-09-15replace RMem refs with an OAddr opertationQuentin Carbonneaux
2015-09-15compile branches on and using testQuentin Carbonneaux
2015-09-15tentative support for fast allocsQuentin 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-15major lifting: get rid of RRegQuentin 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-15add basic support for stack allocationQuentin Carbonneaux
2015-09-15split store into store{w,l}Quentin Carbonneaux
2015-09-15cosmeticsQuentin Carbonneaux
2015-09-15parse variants of storeQuentin 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-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-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-15print registers with numbersQuentin Carbonneaux
2015-09-15use a new Ref type for registersQuentin 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-15avoid name conflicts in enumsQuentin Carbonneaux
2015-09-15start change of representation for registersQuentin Carbonneaux
2015-09-15start work on word/long handlingQuentin Carbonneaux
2015-09-15replace IA with X for x64 instructionsQuentin Carbonneaux
2015-09-15avoid keyword clash by using cons for constantsQuentin Carbonneaux