Age | Commit message (Collapse) | Author |
|
It is more natural to branch on a
flag than have different function
pointers for high-level passes.
|
|
When emitting data detected as zero
the comment appeared before the data
directives were output.
|
|
|
|
|
|
The apple targets are not done yet.
|
|
|
|
|
|
Should make qbe work on apple
arm-based hardware.
|
|
|
|
The general idea is to give abis a
chance to talk before we've done all
the optimizations. Currently, all
targets eliminate {par,arg,ret}{sb,ub,...}
during this pass. The forthcoming
arm64_apple will, however, insert
proper extensions during abi0.
Moving forward abis can, for example,
lower small-aggregates passing there
so that memory optimizations can
interact better with function calls.
|
|
|
|
Eg. data $a = { w $b $c }
|
|
|
|
We have a uint alias that we use
everywhere else. I also added a
todo about unhandled large offsets
in arm64/emit.
|
|
This generates tidier code and is pic
friendly because it lets the linker
trampoline calls to dynlinked libs.
|
|
apple support is more than assembly syntax
in case of arm64 machines, and apple syntax
is currently useless in all cases but amd64;
rather than having a -G option that only
makes sense with amd64, we add a new target
amd64_apple
|
|
|
|
|
|
- update the test generation script to
match some manual changes
- fix some variadic calls to printf
- add a test case where an odd number of
slots is used on the stack before varargs
|
|
|
|
When qbe is used with other tools is a bit hard to identify
what is the tool that is generating the error. Adding an
identifier at the beginning of the line makes much easier
to identify the tool generating the error.
|
|
POSIX specification stays:
string1 = [string2]
...
Macro expansions in string1 of macro definition lines shall
be evaluated when read. Macro expansions in string2 of macro
definition lines shall be performed when the macro identified
by string1 is expanded in a rule or command.
It means that recursive macro expansion is not guaranteed to work in
a portable Make. Also, as make is a declarative language makes more
sense to declare your targets as a primary concern instead of
derivating them from a informational macro like SRC that is only
used in a rule command.
|
|
|
|
|
|
cc can be absent in Gentoo to make sure the right compiler is picked,
for example when clang is preferred or when cross-compiling.
|
|
Makefile now compatible with gmake, bmake, smake and pdpmake.
|
|
This may cause invalid assembly to be generated
and is not all that useful anyway after constant
folding has run.
|
|
|
|
We were redundantly checking cardinality in a
way that prevented fp regs from ever being
globally live. We now check that the live
regs after a return are exactly the globally
live ones.
|
|
|
|
|
|
|
|
Thanks to Paul Ouellette for reporting.
|
|
|
|
|
|
The maximum immediate size for 1, 2, 4, and 8 byte loads/stores is
4095, 8190, 16380, and 32760 respectively[0][1][2].
[0] https://developer.arm.com/documentation/dui0802/a/A64-Data-Transfer-Instructions/LDRB--immediate-
[1] https://developer.arm.com/documentation/dui0802/a/A64-Data-Transfer-Instructions/LDRH--immediate-
[2] https://developer.arm.com/documentation/dui0802/a/A64-Data-Transfer-Instructions/LDR--immediate-
|
|
|
|
Leaks resources to not close.
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
|
|
Thanks to Daniel Xu for reporting.
|
|
|
|
The recent changes in arm and riscv
typclass() set ngp to 1 when a struct
is returned via a caller-provided
buffer. This interacts bogusly with
selret() that ends up declaring a gp
register live when none is set in
the returning sequence.
The fix is simply to set cty to zero
(all registers dead) in case a caller-
provided buffer is used.
|
|
|
|
|
|
|
|
The x9 register is used for
the env parameter.
|
|
|
|
I also moved some isel logic
that would have been repeated
a third time in util.c.
|
|
|
|
That is not available on osx
so I tweaked the gas.c api
a little to conditionally
output the two directives.
|
|
|