summary refs log tree commit diff
path: root/test
AgeCommit message (Collapse)Author
2021-08-23parsefields: fix padding calculationDrew DeVault
This was causing issues with aggregate types. A simple reproduction is: type :type.1 = align 8 { 24 } type :type.2 = align 8 { w 1, :type.1 1 } The size of type.2 should be 32, adding only 4 bytes of padding between the first and second field. Prior to this patch, 20 bytes of padding was added instead, causing the type to have a size of 48. Signed-off-by: Drew DeVault <sir@cmpwn.com>
2021-06-17amd64: fix conditional jump when compare is swapped and used elsewhereMichael Forney
selcmp may potentially swap the arguments and return 1 indicating that the opposite operation should be used. However, if the compare result is used for a conditional jump as well as elsewhere, the original compare op is used instead of the opposite. To fix this, add a check to see whether the opposite compare should be used, regardless of whether selcmp() is done now, or later on during sel(). Bug report and test case from Charlie Stanton.
2019-04-30isel fix for amd64 memory storesQuentin Carbonneaux
The value argument of store instructions was handled incorrectly.
2019-04-29fix folding of unsigned operationsQuentin Carbonneaux
This fixes similar bugs than the ones fixed in the previous commit. In the folding code the invariant is that when a result is 32 bits wide, the low 32 bits of 'x' are correct. The high bits can be anything.
2019-04-29fold: Make sure 32-bit constants get sign extended when necessaryMichael Forney
2019-04-26new large test to evaluate performanceQuentin Carbonneaux
This was generated by csmith and then compiled to qbe il by Michael Forney's C compiler.
2019-04-26update conaddr test to catch early segfaultsQuentin Carbonneaux
2019-04-26restore some code from b4a98cQuentin Carbonneaux
I had forgotten that %rip can only be used as base when there is no index. I also added a test which stresses addressing selection with and without constants.
2019-03-12emit valid code for mem->mem copiesQuentin Carbonneaux
2019-03-09add a stress test for phi spillingQuentin Carbonneaux
2019-02-21fix amd64 addressing mode matcherQuentin Carbonneaux
The numberer made some arranging choices when numbering arguments of an instruction, but these decisions were ignored when matching. The fix is to reconcile numbering and matching.
2019-02-18mark phi arguments as escapingQuentin Carbonneaux
Thanks to Michael Forney for spotting this oversight and providing the test case. Note: because esc() leaves ABot unchanged, the assertion "a->type == ABot" on line 122 remains valid.
2019-02-062 bug fixes in regaQuentin Carbonneaux
The worst one was that "part 3" of rega() could break the critical invariant that two interferring temporaries get assigned different registers. This is fixed by being careful when changing the register of a temporary based on predecessor blocks. Thanks to Michael Forney for reporting these bugs and helping with the analysis.
2017-09-22mark printf call as variadic in testQuentin Carbonneaux
2017-07-30fix dynamic stack allocs for amd64Quentin Carbonneaux
The arm64 might have the same problem but it is currently unable to handle them even in instruction selection. Thanks to Jean Dao for reporting the bug.
2017-04-08new abi test for arm64 HFAsQuentin Carbonneaux
2017-04-08enable arm64 testsQuentin Carbonneaux
The vararg tests had to be changed because va_list is 32-bit wide on arm. The astute reader will notice that the way we pass va_list values is wrong, we should be using the ':valist' type as defined below instead of 'l'. But eh, that works for now, because of the ABI. type :valist = align 8 { 32 }
2017-03-03add another idiomatic C test (rega does no good)Quentin Carbonneaux
2017-02-23add simple idiomatic c testQuentin Carbonneaux
2017-02-10tests for variable argument listsQuentin Carbonneaux
2017-02-10support variable argument listsQuentin Carbonneaux
This change is backward compatible, calls to "variadic" functions (like printf) must now be annotated (with ...).
2016-12-12new tests for the load optimizationQuentin Carbonneaux
2016-12-12new eight queens testQuentin Carbonneaux
2016-08-16add support for unions in sysv abiQuentin Carbonneaux
2016-04-22refine fp conversion instructionsQuentin Carbonneaux
2016-04-13add regression test for liveon bugQuentin Carbonneaux
2016-04-13add regression test for fixarg bugQuentin Carbonneaux
2016-04-12use a shift to divide by 2 in collatzQuentin Carbonneaux
2016-04-12fix type bug in abi3 testQuentin Carbonneaux
2016-04-01add huge mandelbrot brainfuck exampleQuentin Carbonneaux
2016-04-01add big test file for qbeQuentin Carbonneaux
2016-03-29make block labels per-functionQuentin Carbonneaux
2016-03-29new layout, put LICENSE in rootQuentin Carbonneaux
2016-03-28implement export controlQuentin Carbonneaux
2016-03-27mac os compatibility fixes in scriptsQuentin Carbonneaux
2016-03-27move check rule into src/Quentin Carbonneaux
2016-03-27extract tests out of srcQuentin Carbonneaux