| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Hm.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here's what the C standard[1] says about the conditional operator:
```
if one operand is a null pointer constant, the result has the type of
the other operand; otherwise, one operand is a pointer to void or a
qualified version of void, in which case the result type is a
pointer to an appropriately qualified version of void.
``
But actually, some codebases rely on things like 'x ? &foo.memb : NULL'
to have the type of `&foo.memb`, and not `void *`...
[1]: ISO/IEC 9899:TC3 §6.5.15
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Missing: static eval of complex values,
Silly inefficient implementation of equality comparisons between them
The whole thing is pretty inefficient without proper aggregate mem2reg
anyway
|
| | |
|
| |
|
|
|
|
| |
GNU extension. Previously was overloading arraylength==0 to mean unsized
array, now they are distinct with the type flag TFUNKNOWN marking
unsized arrays & aggregates.
|
| |
|
|
| |
This was a temporary workaround before d40371b615
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Turns out hardware enforces SP 16-bit alignment in every SP relative
load/store, but QEMU doesn't emulate this.
|
| |
|
|
| |
We don't support #pragma pack yet
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
places
|
| | |
|
| |
|
|
|
| |
It was wrong for functions that didn't use the frame pointer but took
arguments in the stack
|
| | |
|
| |
|
|
|
| |
The shift instructions do not update flags if the shift amount was zero,
so can't realiably do this micro optimization
|
| | |
|
| | |
|
| |
|
|
| |
Checks for RADDR should also look for RSTACK when fusing addresses
|
| |
|
|
|
| |
Because the integer mov can have immediate operands, avoids a round trip
through an XMM register.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
- Missing: vaargs, >2 member HFAs
- Reworked the way stack allocation references are lowered. Now RSTACK
persists throughout all passes until emit. This allows deferring stack
frame layouting until the end in a less messy way than before, which
was emiting frame-pointer relative addresses @ isel time and patching them up
later in emit to account for actual stack frame layout.
|
| |
|
|
| |
Don't use frame pointer or explicitly modify stack pointer for these
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Undefined behavior by the standard but a GNU extension.
|
| | |
|
| |
|
|
|
|
| |
I tested it and it seems this wasn't doing anything. Maybe at some point
in the past it was needed to fix up a worse implementation of mem2reg?
So turn it into a check. Maybe it's wrong and it can be necessary.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Do it in 2 passes: 1. gather variables, 2. step thru RPO transforming
loads/stores to each variable. More elegant solution to f9e3a52eaa.
More efficient since all variable usages are visited in CFG order, which
matters due to block sealing.
|
| | |
|
| |
|
|
|
|
|
| |
If a function is stashed for inlining and inlined in all of its
callsites or unused, it never ends up in the object file. If any symbol
reference to it is emitted, then it must be de-inlined (rematerialized),
and this is done near the end before emitting the actual object file.
|
| |
|
|
|
| |
That way they are not copied when inlining.
Also rename ninstr -> ninstrtab. opnarg -> opnoper
|
| | |
|