github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm Set by AlexDaniel on 12 June 2018. |
|||
00:14
lucasb left
01:01
MasterDuke left
03:34
squashable6 left
03:35
squashable6 joined
04:15
Kaiepi left
04:51
Kaiepi joined
08:08
dogbert11 left,
dogbert11 joined
|
|||
nwc10 | good *, #moarvm | 08:13 | |
08:32
MasterDuke joined
08:37
sena_kun joined
|
|||
nine | good nwc10! | 08:51 | |
09:30
zakharyas joined
10:18
domidumont joined
11:30
Altai-man joined
11:32
sena_kun left
12:58
zakharyas left
14:27
zakharyas joined
14:42
brrt joined
15:31
sena_kun joined
15:33
Altai-man left
16:25
squashable6 left
16:26
brrt left
16:27
squashable6 joined
17:24
brrt joined
17:32
brrt left
17:39
patrickb joined
18:08
brrt joined
|
|||
cog | Hi, brtt. I am trying to make sense of the jtting. How come bytecode instructions are defined twice, one in core_template.expr and once in tiles.dasc. Which is used when. | 18:19 | |
brrt | hi cog | 18:20 | |
good question | |||
the expressions in core_template.expr map from moarvm bytecode to the JIT IR | |||
cog | I understand one is processor independant | ||
brrt | so there's another file that you may have missed, which is tile_pattern.tile, which maps subtrees of expressions to 'tiles' | 18:22 | |
cog | So what the point of tiles.dasc ? | ||
brrt | tiles represent basic architecture instructions like 'add', 'mov', 'lea', etc. | ||
tiles.dasc containst the functions that emit those instructions to the assembler buffer | 18:23 | ||
so, there's three steps: | |||
- map MoarVM bytecode to lower-level 'expression' JIT code | 18:24 | ||
- map the expressions to the tiles | |||
- emit the tiles to the assembler buffer | |||
cog | Ok, I still don't get the relationship between step 2 and 3. If you have tiled what is the purpose of editing using the .dasc instructions ? I am missing something, | 18:27 | |
timotimo | the dasc file is what's responsible for writing the actual bytes that represent the instructions with the desired arguments | ||
so it does the "instruction encoding" step i guess? | 18:28 | ||
are you familiar with how x86 and x86_64 instructions look? | |||
at the bit and byte level i mean | 18:29 | ||
cog | A little. I am trying to see if I can do the same with arm. | ||
timotimo | oh cool | ||
cog | So far it is way over my head. | 18:30 | |
timotimo | i do believe arm is a lot less complicated in its encoding | ||
but you won't have to deal with that anyway, that's dynasm's job | |||
cog | Yes 3 register instructions instead of two. RISC. | ||
timotimo | what i'm refering to mostly is length of instructions and how the details are signalled | 18:31 | |
cog | Also how to test it piece wise ? Starting by writing or stealing from somewhere the functions prologue and epilogues. | 18:32 | |
timotimo | yes definitely start with these, won't get anywhere without that | 18:33 | |
but it also requires you to decide which registers should hold what | |||
like, we have one register holding the ThreadContext at all times if i'm not mistaken | |||
i think we have one register that needs to always be free for temporarily moving stuff out of the way? | |||
you'll want to build a very simple function, likely in nqp, and call it over and over, and that ought to give you a guide for the order in which to implement things so that you can always run a bit of test code | 18:35 | ||
the spesh log should help with that, have you looked at its output yet? the env var MVM_SPESH_LOG=filename activates it | 18:36 | ||
cog | Probably rewriting the brainfuck dynasm tutorial using arm will be a way to get my feet wet before trying doing anything MoarVM related. | 18:37 | |
Thx timotimo and brrt | |||
So it there a way to jit just a nap test functions ? | 18:40 | ||
* nqp | |||
timotimo | i'd really just get moar to call the function often enough so the jit will naturally do its thing | ||
18:42
domidumont left
19:01
lucasb joined
|
|||
brrt | cog: not yet, and I want something like that very much | 19:08 | |
19:23
zakharyas left
19:30
Altai-man joined
19:32
sena_kun left
20:27
MasterDuke left
20:28
patrickb left
20:53
zakharyas joined
21:10
MasterDuke joined
21:17
brrt left
22:30
zakharyas left
22:31
Altai-man left
23:10
MasterDuke left
|
|||
cog | If I understand correctly MVM_JIT_EXPR_TEMPLATE DESTRUCTIVE flag is tested but nowhere set | 23:12 | |
23:21
lucasb left
|
|||
timotimo | that's what you get when you make a (template blahblah! (...)),i.e. ending in ! | 23:51 | |
forgot how exactly it looks | |||
cog | To get a feeling of the data, I am have the sexpr parser using raku grammars. Now I have to write the actions to generate the files. | 23:55 | |
S/am have the/have written/ |