1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-18 08:30:18 +00:00

Adde useful comment

This commit is contained in:
Jesper Gravgaard 2018-02-13 23:21:24 +01:00
parent 3eb08597cf
commit 7900c846c9
3 changed files with 9 additions and 3 deletions

View File

@ -485,10 +485,12 @@ class AsmFragmentTemplateSynthesisRule {
// Use unsigned ASM to synthesize signed ASM ( ...vbs... -> ...vbu... )
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)_(eq|neq)_(v.s..)_then_(.*)", null, null, "$1_$2_$3_then_$4", null, mapSToU));
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(v.s..)", null, null, "$1=$2", null, mapSToU));
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(v.s..)_(plus|band|bxor|bor)_(v.s..)", null, null, "$1=$2_$3_$4", null, mapSToU));
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(v.s..)_(band|bxor|bor)_(v.s..)", null, null, "$1=$2_$3_$4", null, mapSToU));
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(p.s..)_derefidx_(vbu..)", null, null, "$1=$2_derefidx_$3", null, mapSToU));
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=_(inc|dec)_(v.s..)", null, null, "$1=_$2_$3", null, mapSToU));
synths.add(new AsmFragmentTemplateSynthesisRule("(vbuz.|vbuaa|vbuxx|vbuyy)=_(lo|hi)_vws(z.|c.)", null, null, "$1=_$2_vwu$3", null, mapSToU));
synths.add(new AsmFragmentTemplateSynthesisRule("(vbs..)=(vbs..)_(plus)_(vbs..)", null, null, "$1=$2_$3_$4", null, mapSToU));
synths.add(new AsmFragmentTemplateSynthesisRule("(vws..)=(vws..)_(plus)_(vws..)", null, null, "$1=$2_$3_$4", null, mapSToU));
// Use constant word ASM to synthesize unsigned constant byte ASM ( ...vb.c... -> vw.c... )
synths.add(new AsmFragmentTemplateSynthesisRule("(vwuz.)=(vwuz.)_(plus|minus|band|bxor|bor)_vb.c(.)", null, null, "$1=$2_$3_vwuc$4", null, null));

View File

@ -1,4 +1,6 @@
// Binary division implementation
// Simple binary division implementation
// Follows the C99 standard by truncating toward zero on negative results.
// See http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf section 6.5.5
// Remainder after signed 8 bit division
byte rem8u =0;

View File

@ -161,7 +161,9 @@ Adding pre/post-modifier (byte*) char_cursor ← ++ (byte*) char_cursor
Adding pre/post-modifier (byte*) print_cls::sc ← ++ (byte*) print_cls::sc
Importing division.kc
PARSING src/test/java/dk/camelot64/kickc/test/kc/division.kc
// Binary division implementation
// Simple binary division implementation
// Follows the C99 standard by truncating toward zero on negative results.
// See http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf section 6.5.5
// Remainder after signed 8 bit division
byte rem8u =0;