aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-27function params must be uniqueQuentin Carbonneaux
2024-04-22revert 1b7770e271Quentin Carbonneaux
Quotes are used on Apple target variants to flag that we must not add the _ symbol prefix.
2024-04-13parse: use dynamically sized hashtable for temporariesMichael Forney
This significantly improves parsing performance for massive functions with a huge number of temporaries. Parsing the 86MiB IL produced by cproc during zig bootstrap drops from 17m15s to 2.5s (over 400x speedup). The speedup is much smaller for IL produced from normal non-autogenerated C code. Parsing the sqlite3 amalgamation drops from 0.40s to 0.33s.
2024-04-12add "make wc"Quentin Carbonneaux
2024-04-12drop unnecessary checkQuentin Carbonneaux
2024-04-12add common linkage for dataQuentin Carbonneaux
2024-04-11fold scaled offsets in addressesQuentin Carbonneaux
2024-04-11drop over-zealous offset accumulationQuentin Carbonneaux
2024-04-09use mgen in amd64/isel.cQuentin Carbonneaux
2024-04-09mgen: match automatons and C generationQuentin Carbonneaux
The algorithm to generate matchers took a long time to be discovered and refined to its present version. The rest of mgen is mostly boring engineering. Extensive fuzzing ensures that the two core components of mgen (tables and matchers generation) are correct on specific problem instances.
2024-04-09fuse ac rules in ins-tree matchingQuentin Carbonneaux
The initial plan was to have one matcher per ac-variant, but that leads to way too much generated code. Instead, we can fuse ac variants of the rules and have a smarter matching algorithm to recover bound variables.
2024-04-09does not look too goodQuentin Carbonneaux
2024-04-09modulo ac matching and more testsQuentin Carbonneaux
2024-04-09wip ins-tree matcherQuentin Carbonneaux
2024-04-07mcf's improved rsval()Quentin Carbonneaux
It is semantically the same but does not rely on implementation- defined behavior.
2024-04-04fix accidentally noop loopQuentin Carbonneaux
Credit goes to Roland Paterson-Jones for spotting this bug.
2024-04-03do not parse +N constantsQuentin Carbonneaux
The parsing code for these constants conflicts with the Tplus token.
2024-04-03Eliminate fully overlapping blits after coalescing stack slotsRichard McCormack
I noticed that my compiler was generating redundant blits, and after looking through the QBE debug output I believe that I found some low hanging fruit to help clean them up. I'm new to this codebase, so please treat this patch with a lot of skepticism. Happy to make any changes. Thanks for reviewing, and thank you for QBE!
2024-03-28check that data alignment is in range and a power of twoMichael Forney
Otherwise, the alignment gets truncated to fit in char, so `align 256` is handled as no alignment requirement.
2024-03-26Drop quotes around floating point constant labelsMichael Forney
This is incompatible with binutils gas older than 2.26.
2024-03-07test/fpcnv: skip of inexactly converted integersNguyễ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-03-07remove duplicated function declarationsNguyễn Gia Phong
References: 12f9d16c7b000 ("create cfg.c for cfg-related functions")
2024-03-07update copyright yearsQuentin Carbonneaux
2024-03-07declare check-rv64 as a phony make targetNguyễn Gia Phong
References: 4e93eeaa3b63b ("add rv64 backend")
2024-03-07fix 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-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) <[email protected]>
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