Commit Graph

650 Commits

Author SHA1 Message Date
Quentin Carbonneaux
7d642e85cc shuffle a bit visitins() 2016-03-07 13:41:18 -05:00
Quentin Carbonneaux
a55dd6fc07 refine immediate reload test
We only need to load all the bits of a large
constant when it is used in long context.
2016-03-07 13:38:55 -05:00
Quentin Carbonneaux
4c855e3e12 cosmetics in err() 2016-03-07 12:51:57 -05:00
Quentin Carbonneaux
26151e918a oops symbol conflict in abi3... 2016-03-07 12:31:06 -05:00
Quentin Carbonneaux
005c7e7c5e fix two bad bugs in abi classification
The conditions to put a struct in memory or
not were wrong.  And I misused the cls field
of the AClass struct.
2016-03-07 12:07:34 -05:00
Quentin Carbonneaux
53efd935d7 make abi3 resistant to reassoc 2016-03-07 11:56:06 -05:00
Quentin Carbonneaux
a7ba1c3d2e complete abi3 test (fails) 2016-03-07 11:54:10 -05:00
Quentin Carbonneaux
6deb301f3e new abi test, driver is to do 2016-03-05 08:19:06 -05:00
Quentin Carbonneaux
8a87b3f1ff make bshas() inline 2016-03-04 15:44:50 -05:00
Quentin Carbonneaux
8d4b438ada ignore .out files 2016-03-04 10:37:35 -05:00
Quentin Carbonneaux
a5dffd6c24 bump up NIns, should not hurt us 2016-03-04 10:31:59 -05:00
Quentin Carbonneaux
4467769253 get rid of hard coded NBlk 2016-03-04 10:30:13 -05:00
Quentin Carbonneaux
169411a220 add some (easy) instructions 2016-03-03 17:40:48 -05:00
Quentin Carbonneaux
cf8da3a614 reduce runtime of cprime.ssa 2016-03-03 14:08:42 -05:00
Quentin Carbonneaux
f0e8e335f9 fix typo in abi2.ssa 2016-03-03 13:49:06 -05:00
Quentin Carbonneaux
e700d69004 build tests with -g and show returned error code 2016-03-03 13:47:18 -05:00
Quentin Carbonneaux
b0ce949583 new basic fp abi test 2016-03-03 13:45:54 -05:00
Quentin Carbonneaux
315a7a6f72 add new abi test 2016-03-03 13:39:24 -05:00
Quentin Carbonneaux
a515ea364f nicer aligned okays 2016-03-03 13:24:31 -05:00
Quentin Carbonneaux
5c0e64e5f6 fix output inconsistencies in test/go.sh 2016-03-03 13:19:46 -05:00
Quentin Carbonneaux
67f611fbef testbed is now functional
I would like to make sure some _ tests are
passing, however I have to think of a nice
way to grab debug output and compare it
nicely.  Some require NReg == 3, that is a
pain in the ass.  Maybe they can be changed
to work for the full register set.
2016-03-03 11:55:13 -05:00
Quentin Carbonneaux
99965071d2 complete testing routine 2016-03-03 09:44:06 -05:00
Quentin Carbonneaux
3a12c94b73 start work on automating tests 2016-03-02 22:11:50 -05:00
Quentin Carbonneaux
d419274b04 revert buggy test in memory refs emission 2016-02-29 11:28:07 -05:00
Quentin Carbonneaux
d3530271f8 cosmetics 2016-02-29 10:09:17 -05:00
Quentin Carbonneaux
addd42ceae group symbols together in tokens enum 2016-02-29 10:03:33 -05:00
Ori Bernstein
cf5b7b0fb3 Output end data marker to correct file. 2016-02-28 23:41:48 -08:00
Ori Bernstein
032c3eafdd Make err nonstatic. 2016-02-28 23:39:43 -08:00
Ori Bernstein
b65a6892dd Error properly on strings.
Don't print junk when we don't have 'b' for a string.
2016-02-28 20:47:24 -08:00
Ori Bernstein
542d89bcd5 Add zero fill data. 2016-02-28 20:39:41 -08:00
Ori Bernstein
8a9b0c5513 Add strings as 'b "foo"' 2016-02-28 20:36:01 -08:00
Ori Bernstein
50c5af4290 Allow trailing and ',' and references in data.
This change adds support for two things:

		data $foo {l 123,}

	Which allows easier machine generation of data
	statements. It also adds the ability to parse
	and emit references in data declarations.
2016-02-28 20:16:20 -08:00
Ori Bernstein
ec7c4e0d60 Make parser slightly more accepting.
'_' is ok to start a symbol, and '$' is an acceptable character
	within a symbol.
2016-02-28 19:40:06 -08:00
Ori Bernstein
7f738bb025 More standard/better error message formatting. 2016-02-28 19:38:11 -08:00
Quentin Carbonneaux
09c45b936d support -o option 2016-02-28 18:12:43 -05:00
Quentin Carbonneaux
7185c41110 simplify a little more limit2() 2016-02-27 22:39:12 -05:00
Quentin Carbonneaux
165392ab63 leave only the most important free todos 2016-02-27 22:36:58 -05:00
Quentin Carbonneaux
abc2557839 remove BITS constant 2016-02-27 13:43:12 -05:00
Quentin Carbonneaux
f6d5193cac use a new bits type for bitmaps 2016-02-27 13:41:57 -05:00
Quentin Carbonneaux
6f808867f1 oops, fix wrong bitset allocation 2016-02-26 16:28:35 -05:00
Quentin Carbonneaux
f74f18b13e make the comment greppable 2016-02-26 16:13:44 -05:00
Quentin Carbonneaux
eb26f0cded use memset to zero a bitset 2016-02-26 16:05:01 -05:00
Quentin Carbonneaux
c56148e7f9 get rid of Bits 2016-02-26 16:01:52 -05:00
Quentin Carbonneaux
a9a723e008 also catch stderr 2016-02-26 15:54:43 -05:00
Quentin Carbonneaux
ef5ae515a0 add regression testing script 2016-02-26 15:46:15 -05:00
Quentin Carbonneaux
e91a7788e0 bug in liveout()
Because of the bsclr() call, liveout was not actually
making the union correctly.  Instead of performing an
union, it now fully sets the bitset passed as parameter.
2016-02-26 15:40:19 -05:00
Quentin Carbonneaux
956154e06e dirty fix bogus bsiter() 2016-02-26 13:55:13 -05:00
Quentin Carbonneaux
06c2e75a76 compile everything 2016-02-26 13:46:32 -05:00
Quentin Carbonneaux
b487620955 use bitset in rega.c (broken) 2016-02-26 13:46:16 -05:00
Quentin Carbonneaux
5bff7146fd add cheapo static assert 2016-02-26 13:33:27 -05:00
Quentin Carbonneaux
6275cd6e06 use bitset in spill.c 2016-02-26 13:33:09 -05:00
Quentin Carbonneaux
744cf01321 convert ssa.c to bitsets 2016-02-26 12:51:43 -05:00
Quentin Carbonneaux
ad5dae18f4 move dumpts() into util, add bsequal() 2016-02-26 11:38:57 -05:00
Quentin Carbonneaux
987b3def33 start conversion to dynamic bitsets 2016-02-26 10:31:21 -05:00
Quentin Carbonneaux
3e104e532b a little code compaction 2016-02-25 15:05:40 -05:00
Quentin Carbonneaux
beda73643f add some bitset functions 2016-02-25 14:38:40 -05:00
Quentin Carbonneaux
649fb739fd remove FP notes 2016-02-25 13:26:47 -05:00
Quentin Carbonneaux
381dfc1fc6 create new doc directory 2016-02-24 19:11:19 -05:00
Quentin Carbonneaux
abf4d3f719 fix tight assertion in MEM() 2016-02-24 14:32:16 -05:00
Quentin Carbonneaux
eff3371966 tentative big args support 2016-02-24 12:53:57 -05:00
Quentin Carbonneaux
01a8102c3d use default use/def counts in newtmp()
This is paliative, before I check that all use
counts in isel.c are correct.
2016-02-24 12:53:08 -05:00
Quentin Carbonneaux
ebaec26046 do not print null offsets 2016-02-24 12:37:21 -05:00
Quentin Carbonneaux
eae16f56eb fix swapped operands on emitcopy() call 2016-02-24 12:10:37 -05:00
Quentin Carbonneaux
0705d509dd prepare for big structs passing code 2016-02-24 12:10:00 -05:00
Quentin Carbonneaux
08f2c03e30 support memory class arguemnts 2016-02-24 10:57:08 -05:00
Quentin Carbonneaux
43d3f241ba oh oh, subs are not folded! 2016-02-24 10:56:36 -05:00
Quentin Carbonneaux
e10b91fcc9 simply use memset to 0 stuff 2016-02-24 09:50:03 -05:00
Quentin Carbonneaux
72988e6aa8 oops, phi nodes rewrite for fast locals was trashed
The phi fixing mechanism can use emit(), so we need to
set curi before performing the rewrite.  Otherwise, we are
writing at random places in the instruction buffer (not so
bad because it is bounds checked), but then we loose the
instructions written (bad)!
2016-02-24 09:40:18 -05:00
Quentin Carbonneaux
400a8c70f9 add fun example, does not compile yet 2016-02-23 18:28:28 -05:00
Quentin Carbonneaux
47304da835 cosmetics in isel.c 2016-02-23 12:19:30 -05:00
Quentin Carbonneaux
187c9991b5 print new jump instructions 2016-02-23 11:27:46 -05:00
Quentin Carbonneaux
e301a51457 fix uninitialized variable in selpar() 2016-02-23 11:27:23 -05:00
Quentin Carbonneaux
82d5bbc0bc patch return, might not work 2016-02-23 10:54:56 -05:00
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