Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-07-05 | qbe: Style | Michael Forney | |
2021-07-05 | qbe: Fix bitfield sign extension with types shorter than int | Michael Forney | |
2021-07-02 | qbe: Mark static const data as such | Michael Forney | |
2021-07-02 | qbe: Remove more unnecessary copy instructions | Michael Forney | |
Now that we don't track QBE types within values, we don't have to worry about generating incorrect SSA when passing an 'l' value to a function taking a 'w'. So we can just return the source value instead of emitting a dummy copy instruction. | |||
2021-07-02 | qbe: Remove repr from struct value and use per-instruction class instead | Michael Forney | |
This way we avoid leaking backend-specific details of type representation outside qbe.c. It also facilitates some future simplifications. | |||
2021-07-01 | qbe: Remove unnecessary distinction between loaduw and loadsw | Michael Forney | |
We always store the result to a w temporary, so there is no difference. In fact, QBE provides loadw as an alias for loadsw precisely for this reason. | |||
2021-07-01 | qbe: Reorganize struct value to reduce size to 8 bytes | Michael Forney | |
Make the ID an unsigned int. This will make it small enough to efficiently pass struct value by value. It also simplifies things slightly. | |||
2021-06-30 | qbe: Move aggregate copying to separate function | Michael Forney | |
2021-06-30 | qbe: Remove before unnecessary adds during copy | Michael Forney | |
2021-05-02 | qbe: Use fixed precision of 17 when printing floating point constants | Michael Forney | |
It appears that some operating systems don't yet support the C11 DBL_DECIMAL_DIG. In order to ensure consistent output no matter the precision of long double (which varies from arch to arch), just use a fixed 17, which is sufficient for IEEE 754 binary64. | |||
2021-04-23 | Make some static data const | Michael Forney | |
2021-04-21 | qbe: Print floating point with DBL_DECIMAL_DIG precision | Michael Forney | |
DECIMAL_DIG may vary from system to system depending on the width of long double, causing one of the tests to fail. | |||
2021-04-08 | qbe: Remove unnecessary value copy for struct/union types | Michael Forney | |
Previously, this was needed so that an aggregate type value was updated to be an 'l' type value. However, since 5ff1d2fa the aggregate type name is stored in a separate parameter in IARG/ICALL instructions, so we can just re-use the same pointer value. | |||
2021-04-08 | qbe: Remove unnecessary extension for relational operands | Michael Forney | |
The operands are already promoted, so never need to be extended. These extend()s were added in 7d746860 in an attempt to fix a bug related to the comparison of values with type smaller than int. However, the real bug was that the operands should have been promoted to int by usual arithmetic conversions, which was fixed later in a8131372. | |||
2021-04-07 | qbe: Remove __PRETTY_FUNCTION__ declaration | Michael Forney | |
We no longer define __GNUC__ so we don't have to work around glibc's assert definition anymore. | |||
2021-04-06 | qbe: Shorten a few overly long lines | Michael Forney | |
2021-03-31 | qbe: Slight simplification | Michael Forney | |
2021-03-31 | qbe: Use second argument of call/arg to store type name | Michael Forney | |
2021-03-31 | qbe: Use separate type for block/label | Michael Forney | |
Labels are no longer used as instruction arguments. | |||
2021-03-31 | qbe: Switch to fixed-size instruction struct | Michael Forney | |
Move jump and phi instructions to struct block, and function arguments to their own instruction. This will facilitate allocating instructions as an array. | |||
2021-03-27 | qbe: Change value kind naming scheme | Michael Forney | |
2020-05-24 | qbe: Omit unnecessary add to help QBE's memopt pass | Michael Forney | |
2020-01-31 | qbe: Make non-constant initializer expression a proper error | Michael Forney | |
2020-01-30 | Fix links to issue tracker | Michael Forney | |
2019-07-10 | Remove comment for completed TODO | Michael Forney | |
2019-07-05 | Specify function name in error message | Michael Forney | |
2019-07-05 | qbe: Handle K&R function definition argument promotion | Michael Forney | |
Parameters for K&R function definitions that are affected by default argument promotion are passed as their promoted type, so need to be converted back before storing into memory allocated for the parameter. | |||
2019-07-05 | qbe: Separate out value conversion from funcexpr | Michael Forney | |
2019-07-05 | Move some functions around | Michael Forney | |
2019-06-27 | qbe: Fix switch statements with 64-bit controlling expression | Michael Forney | |
2019-05-29 | Temporarily avoid %a when printing floating constants | Michael Forney | |
This is C99, but is not supported by fscanf in OpenBSD, so floating constants can't be read back in by QBE. | |||
2019-05-16 | qbe: Fix error check for invalid object | Michael Forney | |
The result of funcexpr might be NULL if we are in a dead branch, but this doesn't mean that we had an invalid object. | |||
2019-05-15 | Implement asm labels | Michael Forney | |
2019-05-12 | eval: Keep track of kind of constant expression we are evaluating | Michael Forney | |
When we are evaluating an arithmetic constant expression, we don't want to indroduce static data definitions for string or compound literals. Fixes #59. | |||
2019-05-10 | qbe: Fix QBE types for structs containing bit-fields | Michael Forney | |
2019-04-27 | Sign-extend result of bit-field assignments | Michael Forney | |
Fixes #51. Thanks to Andrew Chambers for the bug report and test case. | |||
2019-04-25 | qbe: Error out when va_arg is called with non-scalar type | Michael Forney | |
2019-04-24 | Use a common member for expression base | Michael Forney | |
2019-04-24 | Use a common member for expression op | Michael Forney | |
2019-04-24 | Free function call argument lists | Michael Forney | |
2019-04-24 | Free functions when we're done with them | Michael Forney | |
2019-04-24 | qbe: Make sure generated code doesn't depend on argument evaluation order | Michael Forney | |
It would be correct in any order, but this is a bit simpler and guarantees the same output. | |||
2019-04-23 | Fix integer promotion on bit-fields | Michael Forney | |
Fixes #47. | |||
2019-04-21 | Keep track of type properties in type | Michael Forney | |
2019-04-20 | Make basic types have their own kind | Michael Forney | |
2019-04-18 | Fix potential overflow of bit-field initializers into following member | Michael Forney | |
Fixes #46. Thanks to Andrew Chambers for the bug report. | |||
2019-04-17 | Merge map.h and tree.h into util.h | Michael Forney | |
2019-04-17 | Just use a single mapkey function | Michael Forney | |
2019-04-17 | htab -> map | Michael Forney | |
2019-04-17 | Implement bit-field initializers | Michael Forney | |