summary refs log tree commit diff
AgeCommit message (Collapse)Author
2024-03-08Avoid building roux to test nonnative targets HEAD mainNguyễn Gia Phong
2024-03-08fix bug in alias analysisQuentin Carbonneaux
The handling of phi was incorrect and we would sometimes miss escapes. We now handle phis at the very end of the pass to make sure the defs for their arguments have all been processed.
2024-03-01Support macOSNguyễn Gia Phong
2024-03-01Port test runner to ZigNguyễn Gia Phong
2024-03-01Port entry point to ZigNguyễn Gia Phong
2024-03-01Build with ZigNguyễn Gia Phong
2024-03-01test/fpcnv: skip comparing inexactly converted intNguyễn Gia Phong
In C, if a floating point cannot be represented exactly as an integer, conversion from the former to the latter is implementation-defined. Therefore, it can be flaky to test this against QBE-defined behavior. This was discovered from (unsigned int) 4294967295.0f being an UB, because (uint64_t) 4294967295.0f is 4294967296 > UINT_MAX on amd64 when compiled by either gcc or clang.
2024-01-29Print total number of tests run to get a better view of how much is broken. v1.2Tobias Heider
2024-01-03fix link in docQuentin Carbonneaux
2024-01-02dbgloc: add column argumentDrew DeVault
dbgloc line [col] This is implemented in a backwards-compatible manner.
2024-01-02Add missing documentation for union types and VAL.Chenguang Wang
See previous discussion here[1]. It's unclear to me how to preview HTML page generated from the .txt file, though. [1]: https://lists.sr.ht/~mpu/qbe/%3C87cz1jq26k.fsf%40greenfork.me%3E
2024-01-02revert 5af33410Quentin Carbonneaux
Causes errors with stock toolchain on OpenBSD.
2023-12-30Fix IBT/BTI by instrumenting function callsTobias Heider
2023-12-30hard-code $(CC) to equal "cc"Lorenz (xha)
this fixes the build on FreeBSD, where the value of $(CC) recently changed from "cc" (13.2) to "c99" (14). Signed-off-by: Lorenz (xha) <me@xha.li>
2023-09-25Fix architecture detection on OpenBSD/arm64Josiah Frentsos
2023-08-28comments in amd64 iselQuentin Carbonneaux
2023-08-26Fix conversion from float/double to unsigned intMichael Forney
signed int can't represent all the values of unsigned int, so we need to do the conversion to signed long, and use the lower 32 bits as the result.
2023-08-18test.sh fixes for devuan linuxQuentin Carbonneaux
2023-08-18file,loc become dbgfile,dbglocQuentin Carbonneaux
2023-06-07parseline() tweaksQuentin Carbonneaux
2023-06-06implement line number info trackingThomas Bracht Laumann Jespersen
Support "file" and "loc" directives. "file" takes a string (a file name) assigns it a number, sets the current file to that number and records the string for later. "loc" takes a single number and outputs location information with a reference to the current file.
2023-05-31Bump NStringAlexey Yerin
2023-05-09fix sub-word returns on arm64_appleQuentin Carbonneaux
2023-04-03Fix 1 C UBLocria Cyber
2023-04-02amd64_apple: one more thread-local symbols fixQuentin Carbonneaux
We now treat thread-local symbols in Mems properly.
2023-04-02tests for thread-local addressesQuentin Carbonneaux
2023-04-02amd64_apple: support thread-local addressesQuentin Carbonneaux
Non-store/load instructions were not lowered correctly for thread- local symbols. This is an attempt at a fix (cannot test for now).
2023-04-02amd64_sysv: fix offsets in thread-local OaddrQuentin Carbonneaux
2023-04-02print prefix for thread-local symbolsQuentin Carbonneaux
2023-04-02amd64_sysv: thread-local support in OaddrQuentin Carbonneaux
Thanks to Lassi Pulkkinen for flagging the issue and pointing me to Ulrich Drepper's extensive doc [1]. [1] https://people.redhat.com/drepper/tls.pdf
2023-03-22rename blknew() to newblk()Quentin Carbonneaux
This is consistent with newtmp() and newcon().
2023-03-19naming nitQuentin Carbonneaux
2023-03-16silence format warning more reliablyQuentin Carbonneaux
2023-03-15silence some warningsQuentin Carbonneaux
2023-03-13fix memory leakQuentin Carbonneaux
2023-03-13refresh stale Tmp.link before useQuentin Carbonneaux
During coalescing, the resizing/ reordering of the sl[] array invalidates the indices stored in the 'visit' field of temps; we need to reset it before we can use it again.
2023-03-11Emit .type and .size directives on RISC-V and ARMAlexey Yerin
To match x86
2023-03-11kill dead stores when coalescing slotsQuentin Carbonneaux
This is necessary because, post fusion, dead stores may clobber data. A new test case exposes one such situation.
2023-01-09reorder some sections in doc v1.1Quentin Carbonneaux
2022-12-27ready for this jellyQuentin Carbonneaux
2022-12-25link pthread in testsQuentin Carbonneaux
2022-12-25new UNDEF RefQuentin Carbonneaux
Crashing loads of uninitialized memory proved to be a problem when implementing unions using qbe. This patch introduces a new UNDEF Ref to represent data that is known to be uninitialized. Optimization passes can make use of it to eliminate some code. In the last compilation stages, UNDEF is treated as the constant 0xdeaddead.
2022-12-16update documentationQuentin Carbonneaux
2022-12-15bugfix in load eliminationQuentin Carbonneaux
When checking if two slices represent the same range of memory we must check that offsets match. The bug was revealed by a harec test.
2022-12-14new blit instructionQuentin Carbonneaux
2022-12-14fix coalesce() to produce valid ssaQuentin Carbonneaux
When multiple stack slots are coalesced one 'alloc' instruction is kept in the il and the other ones are removed and have their uses replaced by the result of the selected one. To produce valid ssa, it must be ensured that the uses that get replaced are dominated by the selected 'alloc' instruction. This patch ensures dominance by moving the selected alloc up in the start block as necessary.
2022-12-12treat retc as non-escapingQuentin Carbonneaux
We may well treat all rets as non-escaping since stack slots are destroyed upon funcion return.
2022-12-12new rsval() helper for signed RefsQuentin Carbonneaux
The .val field is signed in RSlot. Add a new dedicated function to fetch it as a signed int.
2022-12-12crash loads from uninitialized slotsQuentin Carbonneaux
2022-12-12renamings in coalesce()Quentin Carbonneaux