Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
This way we avoid leaking backend-specific details of type
representation outside qbe.c. It also facilitates some future
simplifications.
|
|
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.
|
|
|
|
Make an exception for flexible array members, though we should also
check that the flexible array member, if any, is last.
|
|
|
|
Make the ID an unsigned int. This will make it small enough to
efficiently pass struct value by value. It also simplifies things
slightly.
|
|
conversion
The conversion is only needed for floating types. QBE isn't able
to optimize it away for integer types yet, so removing this unnecessary
conversion has a substantial performance benefit.
|
|
|
|
|
|
This function also ensures that the string prefixes (if any) are
compatible. It should make it easier to implement wide string
support.
|
|
|
|
This will facilitate the support of wide-string literals.
Based on patch from Nihal Jere.
|
|
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.
|
|
|
|
|
|
|
|
DECIMAL_DIG may vary from system to system depending on the width
of long double, causing one of the tests to fail.
|
|
FreeBSD 13 no longer contains a standalone assembler in the base
install, and also added a hard-requirement on _Thread_local.
|
|
QBE support isn't quite there yet, but is progressing smoothly.
|
|
|
|
|
|
C11 6.7.5p6 says "An alignment specification of zero has no effect".
|
|
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.
|
|
|
|
It appears that these packages recommended by gcc-aarch64-linux-gnu
and qemu-user are no longer installed automatically, so list them
explicitly.
|
|
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.
|
|
We no longer define __GNUC__ so we don't have to work around glibc's
assert definition anymore.
|
|
|
|
|
|
|
|
Labels are no longer used as instruction arguments.
|
|
Move jump and phi instructions to struct block, and function arguments
to their own instruction.
This will facilitate allocating instructions as an array.
|
|
The struct-passing test checks for function definitions with struct
arguments, but we were missing a test for function calls with struct
arguments.
|
|
|
|
|
|
POSIX requires -lpthread, but most Linux manual pages recommend using
-pthread, and a lot of projects use it.
|
|
|
|
|
|
This issue is already fixed in -current.
|
|
The OpenBSD linker defaults to PIE, but QBE does not yet support
generating position-independent code.
|
|
This feature is being removed from git.sr.ht
|
|
|
|
This reverts commit 6229709b8ae21d7722fef48ad8a9f2f10b900030.
I still don't understand how out-of-range enum constants are supposed
to work.
|
|
|
|
gcc and clang allow enum constants out of range of int, but this
means that the type of enumerator may differ inside and outside the
enum specifier.
Instead, only allow out-of-range enum constants when their types
are compatible with the final enum type.
|
|
|
|
|
|
|