Commit graph

32 commits

Author SHA1 Message Date
Quentin Carbonneaux
e4bc35149c add cross testing for arm64 2017-04-08 22:10:01 -04:00
Quentin Carbonneaux
61090c758d new arm64 backend, yeepee 2017-04-08 22:09:55 -04:00
Quentin Carbonneaux
49a4593c33 prepare for multi-target
This big diff does multiple changes to allow
the addition of new targets to qbe.  The
changes are listed below in decreasing order
of impact.

1. Add a new Target structure.

To add support for a given target, one has to
implement all the members of the Target
structure.  All the source files where changed
to use this interface where needed.

2. Single out amd64-specific code.

In this commit, the amd64 target T_amd64_sysv
is the only target available, it is implemented
in the amd64/ directory.  All the non-static
items in this directory are prefixed with either
amd64_ or amd64_sysv (for items that are
specific to the System V ABI).

3. Centralize Ops information.

There is now a file 'ops.h' that must be used to
store all the available operations together with
their metadata.  The various targets will only
select what they need; but it is beneficial that
there is only *one* place to change to add a new
instruction.

One good side effect of this change is that any
operation 'xyz' in the IL now as a corresponding
'Oxyz' in the code.

4. Misc fixes.

One notable change is that instruction selection
now generates generic comparison operations and
the lowering to the target's comparisons is done
in the emitter.

GAS directives for data are the same for many
targets, so data emission was extracted in a
file 'gas.c'.

5. Modularize the Makefile.

The Makefile now has a list of C files that
are target-independent (SRC), and one list
of C files per target.  Each target can also
use its own 'all.h' header (for example to
define registers).
2017-04-08 21:56:20 -04:00
Quentin Carbonneaux
c6f8985c23 make install/uninstall phonies 2017-02-27 12:52:24 -05:00
Quentin Rameau
1a313306d6 add install and uninstall targets to Makefile 2017-02-27 12:47:29 -05:00
Quentin Carbonneaux
2c2db15995 do sign/zero extensions removal in copy.c 2017-02-25 15:14:12 -05:00
Quentin Carbonneaux
df61decee5 start a new simplification pass 2017-02-24 15:52:56 -05:00
Quentin Carbonneaux
3f147ed2e0 implement a simple load elimination pass 2016-12-12 22:17:03 -05:00
Quentin Carbonneaux
8fdea1dd52 implement a simple alias analysis 2016-12-12 22:17:03 -05:00
Quentin Carbonneaux
12f9d16c7b create cfg.c for cfg-related functions 2016-12-12 22:16:57 -05:00
Quentin Carbonneaux
6d62e5974b add funny 80 target 2016-04-13 17:43:18 -04:00
Quentin Carbonneaux
abe45f1ab0 enable constant folding 2016-04-09 14:32:07 -04:00
Quentin Carbonneaux
f2f9e156ca default to gnu gas format 2016-04-05 17:47:42 -04:00
Quentin Carbonneaux
7d37d0a7a4 yay, support freebsd 2016-04-05 14:08:04 -04:00
Quentin Carbonneaux
23c55ceb91 respect the order of the passes 2016-03-31 17:18:33 -04:00
Quentin Carbonneaux
0a81036fa2 move abi code in a new file 2016-03-31 17:17:09 -04:00
Quentin Carbonneaux
beec05cd3b do not echo compilation commands if verbose 2016-03-29 21:53:23 -04:00
Quentin Carbonneaux
b75cb8388f new layout, put LICENSE in root 2016-03-29 10:10:22 -04:00
Quentin Carbonneaux
205221226f move check rule into src/ 2016-03-27 19:13:34 -04:00
Quentin Carbonneaux
ff79d2abae move paper synchronization to top makefile 2016-03-27 18:20:34 -04:00
Quentin Carbonneaux
e38c61d95f add centralized all and clean targets 2016-03-27 18:05:27 -04:00
Quentin Carbonneaux
6405a0742f use make variable for extensibility 2016-03-27 15:05:26 -04:00
Quentin Carbonneaux
36635660b4 extract tests out of src 2016-03-27 15:00:45 -04:00
Quentin Carbonneaux
037c716b65 move ml prototype in a subdir 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
c7ab830c22 do not remove t subdir while cleaning 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
bab23d801e change name of test file 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
7ab237d8ed more cleaning 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
f23cd2882d compile tmain with optimizations 2015-09-15 23:01:26 -04:00
Quentin Carbonneaux
ff14ce3197 quiet 2015-09-15 23:01:26 -04:00
Quentin Carbonneaux
25528786d8 cosmetics 2015-09-15 23:01:26 -04:00
Quentin Carbonneaux
0aa0002337 fix spill code 2015-09-15 23:01:26 -04:00
Quentin Carbonneaux
d1cb824564 add simple Makefile 2015-09-15 23:01:26 -04:00