| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
When K&R prototypes are present, definition of compatible types and
composite types becomes recursive. For example
`int f(int (*)())`
should be compatible with
`int f(int (*)(int))`
etc
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Decays to pointer
|
| |
|
|
|
| |
Logic for this was duplicated. Updated in c4d9087746 but only in one of
the places, so broke on some PIC code.
|
| | |
|
| |
|
|
|
| |
Actually that check was OK. The issue was in isnullpo(), not detecting
the folded `(void*)0`
|
| | |
|
| |
|
|
|
|
| |
Would wrongly generate `udiv` and fail later in the backend. Should add
a IR sanity checks pass to catch e.g. unsigned operations being used
with floating point classes.
|
| |
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Turns out hardware enforces SP 16-bit alignment in every SP relative
load/store, but QEMU doesn't emulate this.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
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.
|