Commit graph

967 commits

Author SHA1 Message Date
Quentin Carbonneaux
3f8af2ba7b specify the allocation function in vnew 2016-08-15 22:55:08 -07:00
Quentin Carbonneaux
5ad8a2c6fe couple of case fixes in tokens 2016-08-14 20:03:39 -07:00
Quentin Carbonneaux
8ca73af85a use an enum for aggregate segments 2016-08-14 20:02:56 -07:00
Quentin Carbonneaux
faa084cca9 get rid of old Alt enum 2016-08-14 18:09:49 -07:00
Quentin Carbonneaux
12755db1aa fix type size computations in parser
The type sizes are important to get right because
the ABI relies on them when it emits memory blits
to pass/return structs.
2016-04-25 10:58:11 -04:00
Quentin Carbonneaux
f4e0bfbbb9 correctly update nuse for jump arguments 2016-04-23 09:31:35 -04:00
Quentin Carbonneaux
fc87bc5ea5 use short for classes (so it is signed for sure) 2016-04-22 20:06:02 -04:00
Quentin Carbonneaux
97d33be074 update documentation with new fp conversions 2016-04-22 15:16:47 -04:00
Quentin Carbonneaux
55476d0738 refine fp conversion instructions 2016-04-22 15:11:18 -04:00
Quentin Carbonneaux
d2046e2cd0 make sure type sizes never overflow 2016-04-22 14:27:15 -04:00
Quentin Carbonneaux
1c96401f0c oops fix wrong instruction names in doc 2016-04-21 14:27:15 -04:00
Quentin Carbonneaux
5053577e0e cosmetics in all.h 2016-04-21 14:02:43 -04:00
Quentin Carbonneaux
6d07d0a4ac make mcc runable from anywhere 2016-04-21 11:24:40 -04:00
Quentin Carbonneaux
bbf90069b3 disallow phi nodes in the start block
AFL found this bug.
2016-04-20 14:03:38 -04:00
Quentin Carbonneaux
84bb28c042 support calls with no return
I thought it would be harder (and maybe it is).
My fear was that a call must be always followed by
a parallel move from machine registers (this is an
assumption in both spill and rega).  This however
remains true, because the ABI code generates a
dummy "copy RAX" by accident!
2016-04-20 12:53:42 -04:00
Quentin Carbonneaux
1258bb75d2 normalize case in token names 2016-04-20 12:51:40 -04:00
Quentin Carbonneaux
657c3fa66b match jumps/ops with il text 2016-04-20 09:56:29 -04:00
Quentin Carbonneaux
b7debc4e7f add compilation instructions 2016-04-19 21:34:52 -04:00
Quentin Carbonneaux
43967b6306 use assert for ssa invariants in fold/copy 2016-04-19 11:07:54 -04:00
Quentin Carbonneaux
20c9ec62ff check for trivial undefined uses in ssacheck 2016-04-19 11:04:48 -04:00
Quentin Carbonneaux
f5c4f9b76f rename only live phi arguments in fold
AFL found that.
2016-04-19 10:53:35 -04:00
Quentin Carbonneaux
479e946113 add tool to process afl results 2016-04-18 16:21:51 -04:00
Quentin Carbonneaux
c43a07086b factor some subtyping logic in clsmerge() 2016-04-18 14:03:06 -04:00
Quentin Carbonneaux
c6f3adc52d phis can assign slots after spill 2016-04-18 13:54:17 -04:00
Quentin Carbonneaux
5873a7dc1e make sure non-register temporaries get a slot
Inside the main instruction-processing loop, it is
taken care of by limit.  However at block boundaries
we are doing fancy bitset operations without calling
limit.
2016-04-18 13:44:41 -04:00
Quentin Carbonneaux
98c9cf29d3 output debug to stderr in spiller 2016-04-18 13:42:47 -04:00
Quentin Carbonneaux
b8709501f9 do not rewrite overwritten slots in memopt 2016-04-18 13:25:32 -04:00
Quentin Carbonneaux
47a0556a16 compute dead phi args correctly in fold
The code computing if "the" edge of a phi
argument is live or dead was wrong. AFL
found that.
2016-04-17 21:01:49 -04:00
Quentin Carbonneaux
dc2b1458ac use unsigned long long for bits 2016-04-16 15:37:50 -04:00
Ori Bernstein
0cedf8e6cf support trailing , in types/args/params 2016-04-16 15:37:21 -04:00
Quentin Carbonneaux
42ecd05b7f fix relic error message 2016-04-16 14:03:33 -04:00
Quentin Carbonneaux
f4da7d9ccf add regression test for liveon bug 2016-04-13 22:22:02 -04:00
Quentin Carbonneaux
3cabc10e7d add regression test for fixarg bug 2016-04-13 22:21:58 -04:00
Quentin Carbonneaux
3bec2c6087 call fixarg on the correct instruction
Because one call to fixarg can emit an instruction,
using curi, for the second fixarg calls patched is
incorrect.  AFL found that bug.
2016-04-13 17:53:07 -04:00
Quentin Carbonneaux
6d62e5974b add funny 80 target 2016-04-13 17:43:18 -04:00
Quentin Carbonneaux
9441c55fc6 oops, memcpy -> memmove 2016-04-13 12:39:57 -04:00
Quentin Carbonneaux
dc2fad4462 check types on assignments 2016-04-13 12:39:57 -04:00
Quentin Carbonneaux
af3363a796 turn alignment asserts into err() 2016-04-13 12:39:57 -04:00
Quentin Carbonneaux
491c55e6e0 handle odd jumps in blkdel() an renblk() 2016-04-13 12:39:57 -04:00
Quentin Carbonneaux
8992106928 do not compute def-use links for regs 2016-04-13 12:39:57 -04:00
Quentin Carbonneaux
e9dc0035ae hack an ssa validator (likely buggy) 2016-04-13 12:39:57 -04:00
Quentin Carbonneaux
4a4a013291 add unsigned comparisons to emit 2016-04-13 12:39:57 -04:00
Quentin Carbonneaux
0e85eb8282 handle the bad jump case 2016-04-13 12:39:54 -04:00
Quentin Carbonneaux
b067c4eea4 add new minic test 2016-04-13 09:58:10 -04:00
Quentin Carbonneaux
95f1a20e0e separate name and index in newtmp() 2016-04-13 09:53:54 -04:00
Quentin Carbonneaux
32d9e33191 harden memopt() 2016-04-13 09:53:50 -04:00
Quentin Carbonneaux
02b70c0cb1 bug in checking of multiple definitions 2016-04-12 14:51:50 -04:00
Quentin Carbonneaux
1f4ff63418 subtle bug in liveness!
If on of the phis in a block A uses the result
of another one when coming from B, we have to
be careful!
2016-04-12 14:51:50 -04:00
Quentin Carbonneaux
4cee19ea9f add missing idiv in opdesc[] 2016-04-12 14:51:50 -04:00
Quentin Carbonneaux
4be9d2b559 cosmetic modification in fold 2016-04-12 14:51:50 -04:00