Commit graph

148 commits

Author SHA1 Message Date
Quentin Carbonneaux
ce7fd0cb49 add unsigned division and remainder 2016-03-16 11:30:57 -04:00
Quentin Carbonneaux
db6f7ad72d add shift instructions 2016-03-16 11:18:28 -04:00
Quentin Carbonneaux
6cba2db949 document oddity in seljmp() 2016-03-16 10:59:26 -04:00
Quentin Carbonneaux
4d41a720d0 use opdesc[] in isel.c 2016-03-09 11:50:44 -05:00
Quentin Carbonneaux
8645a5ae23 add more info in opdesc[] 2016-03-08 16:47:34 -05:00
Quentin Carbonneaux
cebec4dd47 add new cast instruction 2016-03-07 13:46:44 -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
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
169411a220 add some (easy) instructions 2016-03-03 17:40:48 -05:00
Quentin Carbonneaux
f6d5193cac use a new bits type for bitmaps 2016-02-27 13:41:57 -05:00
Quentin Carbonneaux
5bff7146fd add cheapo static assert 2016-02-26 13:33:27 -05:00
Quentin Carbonneaux
eff3371966 tentative big args support 2016-02-24 12:53:57 -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
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
47304da835 cosmetics in isel.c 2016-02-23 12:19:30 -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
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
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
7d203e7f99 better variable name in selcall() 2016-02-15 22:15:11 -05:00
Quentin Carbonneaux
b7dd7edbd5 more fp calling conventions 2016-02-15 22:05:49 -05:00
Quentin Carbonneaux
94b22db5c8 patch isel for store{s,d} 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
7b5e84a5d0 fix harmless typo in isel 2016-02-12 10:39:23 -05:00
Quentin Carbonneaux
21d637efc8 fix the class for generated jumps 2016-02-11 19:10:06 -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
2c351452b1 add cheapo static assert in isel 2016-01-29 10:48:14 -05:00
Quentin Carbonneaux
7bf505605f fix spacing 2016-01-22 13:29:47 -05:00
Quentin Carbonneaux
9a837884c6 force warning with XMM15 in rsave[] 2016-01-04 04:29:16 -05:00
Quentin Carbonneaux
b871c261a1 delete callclb altogether 2015-12-18 20:32:54 -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
1dc0089684 wip on instruction selection 2015-12-08 13:39:30 -05:00
Quentin Carbonneaux
5097cf1d42 stores becomes storeh 2015-11-30 10:18:03 -05:00
Quentin Carbonneaux
c744281317 uniformize looping on instructions
I am actually not sure if "i-b->ins < b->nins" is the best way,
maybe the comparison with the last instruction is a little more
efficient...  At least it is uniform now.
2015-11-16 17:54:16 -05:00
Quentin Carbonneaux
6ec5890628 change debug of ABI to A 2015-11-13 15:22:12 -05:00
Quentin Carbonneaux
46f99ac5b7 this emit was an emiti 2015-11-01 00:35:36 -04:00
Quentin Carbonneaux
5b54910adc add simple dce into isel
This looks simple, but it's unclear that the use counts
are correct or at least sound after all the instruction
massaging that happens for calls/jumps.
2015-10-30 13:44:53 -04:00
Quentin Carbonneaux
0a84de5e53 finish isel adressing modes and clear the code 2015-10-30 13:20:42 -04:00
Quentin Carbonneaux
d272f0896b simplify constant handling in amatch() 2015-10-30 13:20:42 -04:00