Edmund Grimley Evans
03303628c7
tests/Makefile: Quote to avoid: /bin/sh: 1: [: !=: unexpected operator
2015-03-07 18:10:45 +00:00
Edmund Grimley Evans
d854dede03
arm64: Optimise some integer operations with a constant operand.
2015-03-07 17:42:08 +00:00
Edmund Grimley Evans
ac70e6b840
tccgen.c: Optimise 0<<x, 0>>x, -1>>x, x&0, x*0, x|-1, x%1.
...
More precisely, treat (0 << x) and so on as constant expressions, but
not if const_wanted as we do not want to allow "case (x*0):", ...
Do not optimise (0 / x) and (0 % x) here as x might be zero, though
for an architecture that does not generate an exception for division
by zero the back end might choose to optimise those.
2015-03-07 17:32:39 +00:00
Edmund Grimley Evans
9163393476
arm64-gen.c: In load(), do not sign-extend 32-bit VT_CONST.
2015-03-07 17:32:39 +00:00
Edmund Grimley Evans
238e760a29
Add __builtin_return_address.
...
Implementation is mostly shared with __builtin_frame_address.
It seems to work on arm64, i386 and x86_64. It may need to be
adapted for other targets.
2015-03-06 21:01:14 +00:00
Edmund Grimley Evans
3fb8b14806
tccelf.c: File path component is "arm64", not "ARM64".
2015-03-04 19:43:29 +00:00
Edmund Grimley Evans
1706d2254b
arm64-gen.c: Improve generation of stack offsets.
2015-03-02 20:51:03 +00:00
Edmund Grimley Evans
1d41da9590
arm64-gen.c: Rename some functions and add comments.
2015-03-02 20:45:58 +00:00
Edmund Grimley Evans
86e8dcd5e2
arm64: Improve constant generation, with tests.
2015-03-02 20:39:28 +00:00
Edmund Grimley Evans
883fd365c7
arm64-gen.c: Better explanation of relocation choice.
2015-03-01 11:31:10 +00:00
Edmund Grimley Evans
fc119f9840
73_arm64.c: Avoid taking address of return value.
2015-02-26 12:27:00 +00:00
Edmund Grimley Evans
8329facdfa
Add 73_arm64 for testing some arm64 things, mostly PCS.
2015-02-25 22:51:41 +00:00
Edmund Grimley Evans
a4d43618fb
arm64-gen.c: In gen_va_arg, handle the remaining HFA cases.
2015-02-25 22:51:41 +00:00
Edmund Grimley Evans
36bb8994dd
Relicensing TinyCC
2015-02-25 07:52:39 +00:00
Edmund Grimley Evans
97e08be344
tests/tcctest.c: Test COMPAT_TYPE(char *, signed char *).
2015-02-24 19:35:31 +00:00
Edmund Grimley Evans
40f7e11c53
tccgen.c: Make sure that gen_op always returns an rvalue.
...
Either this fix, or an alternative one, is required for arm64.
2015-02-23 22:51:10 +00:00
Edmund Grimley Evans
b14ef0e24b
Add arm64 (AArch64) as a target architecture.
2015-02-23 22:51:03 +00:00
Edmund Grimley Evans
738606dbd5
Use RELA relocations properly for R_DATA_PTR on x86_64.
...
libtcc.c: Add greloca, a generalisation of greloc that takes an addend.
tcc.h: Add greloca and put_elf_reloca.
tccelf.c: Add put_elf_reloca, a generalisation of put_elf_reloc.
tccgen.c: On x86_64, use greloca instead of greloc in init_putv.
2015-02-21 21:29:03 +00:00
Edmund Grimley Evans
86c850fc58
tcc-doc.texi: Explain VT_LLOCAL a bit better.
...
And delete the sentence about it being removed.
2015-02-20 23:29:21 +00:00
Edmund Grimley Evans
ff3f9aa6ba
Fix handling of case_reg in switch statement.
...
The back end functions gen_op(comparison) and gtst() might allocate
registers so case_reg should be left on the value stack while they
are called and set again afterwards.
2015-02-20 23:16:00 +00:00