Commit Graph

577 Commits

Author SHA1 Message Date
Quentin Carbonneaux
b75c211dbf fix buggy name changes in isel 2016-02-22 15:14:28 -05:00
Quentin Carbonneaux
b7b430e578 simplify emit table 2016-02-22 14:07:05 -05:00
Quentin Carbonneaux
2ee3d2ec2e cosmetics 2016-02-22 14:00:21 -05:00
Quentin Carbonneaux
e400e177b6 use isstore() in parser 2016-02-22 13:55:18 -05:00
Quentin Carbonneaux
4be29d4030 do not spill dead phis
Regalloc will be able to handle these spurious phis,
however, some other spurious dead instructions can be
emitted.  It would be better to get rid of them upfront;
maybe by modifying isel, or by inserting a proper dce
pass.  An example of that undesirable behavior is
exposed below.

@l1
	%foo =w ...
@l2
	%dead =w phi @l1 %foo, ...
2016-02-21 21:22:05 -05:00
Quentin Carbonneaux
8041947672 complete fp support for small structs
There is an oddity/bug though, we use OStorel to store possibly
fp registers.  Gas does not complain, but this is wrong.  The
fix is probably to have a simple OStore, like in the OLoad case.
2016-02-21 18:29:25 -05:00
Quentin Carbonneaux
420bf4cc8b genius or idiot? 2016-02-21 11:35:53 -05:00
Quentin Carbonneaux
3983c206f9 add lexing sugar for backward compatibility 2016-02-19 14:17:22 -05:00
Quentin Carbonneaux
97cfdc309e stop using OXxx1 and use new OLoad 2016-02-18 19:40:40 -05:00
Quentin Carbonneaux
7922b259d9 use classes in arg classification 2016-02-18 18:56:56 -05:00
Quentin Carbonneaux
a74291382c complete argcls (pretty ugly...) 2016-02-18 18:33:09 -05:00
Quentin Carbonneaux
cabad82d72 start completing the fp abi 2016-02-18 18:13:57 -05:00
Quentin Carbonneaux
70d73e2d6e fix dumb bug found by Andrew Chambers 2016-02-16 22:17:18 -05:00
Quentin Carbonneaux
7d203e7f99 better variable name in selcall() 2016-02-15 22:15:11 -05:00
Quentin Carbonneaux
6dc1cdead0 always print RACall with 3 digits 2016-02-15 22:12:54 -05:00
Quentin Carbonneaux
2cfccce680 use arguments in mandelbrot test 2016-02-15 22:06:29 -05:00
Quentin Carbonneaux
b7dd7edbd5 more fp calling conventions 2016-02-15 22:05:49 -05:00
Quentin Carbonneaux
bfef767349 be future proof in usage message :) 2016-02-15 17:45:15 -05:00
Quentin Carbonneaux
95bd36c620 fix comments in emit 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
b2fa33c32d uniformize notations in mandelbrot test 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
53a3c3c2dd scale up the mandelbrot test 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
c237d0dd74 quickly patch emit (fp load and store) 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
0ae8564b3c initialize class correctly in pmgen() 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
94b22db5c8 patch isel for store{s,d} 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
0debea30d4 completely hide xmm15 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
5900eb7b0b more stressful test for fp 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
740ebf164d partial fix argcls() in isel 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
16e430935d collect and emit fp constants 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
52fad57580 test int syntax for one fp constant 2016-02-12 19:44:19 -05:00
Quentin Carbonneaux
1d9499172b cut code, use scanf a little more 2016-02-12 14:23:57 -05:00
Quentin Carbonneaux
8e88861807 new syntax for float literals 2016-02-12 14:20:12 -05:00
Quentin Carbonneaux
8b81a5acc6 scan ints using scanf 2016-02-12 13:56:29 -05:00
Quentin Carbonneaux
7b5e84a5d0 fix harmless typo in isel 2016-02-12 10:39:23 -05:00
Quentin Carbonneaux
b498f24b8f use ICX{np,p} to clarify enum definitions 2016-02-12 10:27:05 -05:00
Quentin Carbonneaux
66a8044fcc fixed the comparison issue 2016-02-11 20:03:35 -05:00
Quentin Carbonneaux
cfa285395e update tests to new comparisons 2016-02-11 20:02:31 -05:00
Quentin Carbonneaux
21d637efc8 fix the class for generated jumps 2016-02-11 19:10:06 -05:00
Quentin Carbonneaux
b78e030bcc fix format string bug in fptox.c 2016-02-11 19:03:42 -05:00
Quentin Carbonneaux
727abf1f73 use new float comparison in test 2016-02-11 18:59:23 -05:00
Quentin Carbonneaux
53a5d7de2a fp cmp fixes (highly untested) 2016-02-11 16:12:11 -05:00
Quentin Carbonneaux
c92b0268fd add one case in address matching 2016-02-09 16:56:36 -05:00
Quentin Carbonneaux
610e03f6d0 fix indent in emit 2016-02-04 14:37:28 -05:00
Quentin Carbonneaux
dd6ed823f0 more mac os compatibility in emit 2016-02-04 14:30:28 -05:00
Quentin Carbonneaux
1c75c40889 cheap rip relative hack 2016-02-04 14:28:55 -05:00
Quentin Carbonneaux
131e210b38 re-enable all optimizations 2016-02-04 14:01:07 -05:00
Quentin Carbonneaux
c2ce1375eb cheaply integrate fp in mem.c 2016-02-04 14:00:50 -05:00
Quentin Carbonneaux
b4f80258a1 comment in enum Op 2016-02-04 14:00:26 -05:00
Quentin Carbonneaux
f184585cd5 iterate correctly on blocks in spiller... 2016-02-04 13:58:23 -05:00
Quentin Carbonneaux
134cfc4541 re-add ssa construction 2016-02-04 12:58:51 -05:00
Quentin Carbonneaux
a3650701d1 fix super old bug in rega! 2016-02-04 12:22:20 -05:00
Quentin Carbonneaux
90138539bc fix emit bugs for binops 2016-02-04 12:21:50 -05:00
Quentin Carbonneaux
059d378b9d fix hinting bug in spiller
We have to first free the output register of an instruction
before setting the interference hints for inregs temporaries.
2016-02-04 12:19:55 -05:00
Quentin Carbonneaux
fb838ce095 fix spill bug on return nodes
When a node has no successor, its inregs out was
initialized with garbage.
2016-02-04 12:18:21 -05:00
Quentin Carbonneaux
77cfb14f58 fix typo in emit tables 2016-02-04 11:58:47 -05:00
Quentin Carbonneaux
f72e1d4b02 fix call emission 2016-02-03 16:45:51 -05:00
Quentin Carbonneaux
470810f307 add more spaces 2016-02-03 16:00:45 -05:00
Quentin Carbonneaux
8937b6c918 add tool to show ieee representations 2016-02-03 15:50:55 -05:00
Quentin Carbonneaux
cab84cb96b fix the double test 2016-02-03 15:50:22 -05:00
Quentin Carbonneaux
45b6017a61 finish emit lifting, seems ok now 2016-02-03 15:50:02 -05:00
Quentin Carbonneaux
09176bc115 more revamp in emit 2016-02-03 11:33:34 -05:00
Quentin Carbonneaux
cf3f6edb75 document emit format 2016-02-02 14:25:10 -05:00
Quentin Carbonneaux
b375751755 start emit simplification 2016-01-29 15:13:19 -05:00
Quentin Carbonneaux
2c351452b1 add cheapo static assert in isel 2016-01-29 10:48:14 -05:00
Quentin Carbonneaux
8d1f2f9d2c compile rega 2016-01-29 10:07:19 -05:00
Quentin Carbonneaux
a70119010f more fp integration in rega 2016-01-29 10:06:33 -05:00
Quentin Carbonneaux
409bb9f838 cosmetics 2016-01-28 16:42:44 -05:00
Quentin Carbonneaux
69b6b9290f use macros for OXxx and OXxx1
This will make sure the debugger uses the
correct name when printing an operation.
2016-01-28 16:33:54 -05:00
Quentin Carbonneaux
ffdc2be115 start fp integration in rega 2016-01-28 16:28:19 -05:00
Quentin Carbonneaux
be088e724f remove constant NReg 2016-01-28 15:12:46 -05:00
Quentin Carbonneaux
d2bcd3beeb fix non-updated limit() call in spiller 2016-01-28 15:12:17 -05:00
Quentin Carbonneaux
7bf505605f fix spacing 2016-01-22 13:29:47 -05:00
Quentin Carbonneaux
ed36bde01e fix wrong assumption in spill.c 2016-01-22 13:25:28 -05:00
Quentin Carbonneaux
dcbcd651c5 enable new spilling pass 2016-01-05 15:03:00 -05:00
Quentin Carbonneaux
3e2c93bde5 compile spill.c 2016-01-04 04:29:42 -05:00
Quentin Carbonneaux
9a837884c6 force warning with XMM15 in rsave[] 2016-01-04 04:29:16 -05:00
Quentin Carbonneaux
70f7e8687d fix dopm() in spill 2016-01-04 04:26:23 -05:00
Ori Bernstein
1a677839aa index() conflicts with string.h on freebsd
rename it to avoid the conflict.
2016-01-03 15:07:48 -05:00
Quentin Carbonneaux
d9aa722d55 change design in spill.c 2016-01-03 15:02:01 -05:00
Quentin Carbonneaux
d71749d2fd go verbose in parse.c 2015-12-27 14:13:33 -05:00
Quentin Carbonneaux
417255cff1 get rid of the Ty enum 2015-12-27 14:13:00 -05:00
Quentin Carbonneaux
d0ccaeb831 more work on spill, not elegant 2015-12-27 12:06:17 -05:00
Quentin Carbonneaux
87cfb3dd2e wip fp lifting in spill.c, pheeew 2015-12-25 17:49:17 -05:00
Quentin Carbonneaux
2aea575f12 get rid of TYS() macro 2015-12-25 17:47:24 -05:00
Quentin Carbonneaux
215914f58d missing case in tmpuse() of spiller 2015-12-23 17:05:41 -05:00
Quentin Carbonneaux
56fc8bfe5c purify test logic in liveness 2015-12-23 16:53:37 -05:00
Quentin Carbonneaux
b871c261a1 delete callclb altogether 2015-12-18 20:32:54 -05:00
Quentin Carbonneaux
5163c8902e enable call handling in liveness 2015-12-18 20:31:25 -05:00
Quentin Carbonneaux
573abcff02 make call{def,use} fp aware 2015-12-18 20:31:08 -05:00
Quentin Carbonneaux
d43958ee71 fix isel typo 2015-12-18 13:16:40 -05:00
Quentin Carbonneaux
587d02df4f uniformize argument fixing 2015-12-10 16:57:41 -05:00
Quentin Carbonneaux
e12500f5e3 fp constant loading must be done on phi 2015-12-08 13:42:29 -05:00
Quentin Carbonneaux
1dc0089684 wip on instruction selection 2015-12-08 13:39:30 -05:00
Quentin Carbonneaux
0791dd026e sanitize constants representation 2015-12-08 10:39:06 -05:00
Quentin Carbonneaux
0298b6c4ca oops, fix typo bug in parse.c 2015-12-01 13:11:03 -05:00
Quentin Carbonneaux
22f2ec9667 test fancy float notation 2015-12-01 13:01:24 -05:00
Quentin Carbonneaux
891877d67d plan work on isel 2015-11-30 17:11:42 -05:00
Quentin Carbonneaux
839dca331a more error reporting in parsedat() 2015-11-30 16:12:51 -05:00
Quentin Carbonneaux
67db7b6578 add a simple floating point test 2015-11-30 15:53:15 -05:00
Quentin Carbonneaux
7c97ca6aae parse and print floating points 2015-11-30 15:51:32 -05:00
Quentin Carbonneaux
62a4ff4566 cosmetics in the ABI document 2015-11-30 14:52:42 -05:00