mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-20 02:32:36 +00:00
Added needed synthesis rules.
This commit is contained in:
parent
c89b4bc6b0
commit
b04edfb241
@ -466,30 +466,29 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuaa=(.*)", twoZ1, "sta $ff" , "vb$1aa=$2", "ldy $ff\nsta ({z1}),y", mapZ));
|
||||
// Rewrite (Z1),x to save A to $FF and reload it into YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuxx=(.*)", twoZ1, "stx $ff" , "vb$1aa=$2", "ldy $ff\nsta ({z1}),y", mapZ));
|
||||
|
||||
// Rewrite (Z1),a to use TAY prefix
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuaa=(.*)", twoZ1+"|"+rvalYy, "tay" , "vb$1aa=$2", "sta ({z1}),y", mapZ, "yy"));
|
||||
|
||||
// Rewrite constant byte values to constant word values
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c1(.*)", null, null , "$1vw$2c1$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c2(.*)", null, null , "$1vw$2c2$3", null, null));
|
||||
/*
|
||||
// Rewrite constant word values to constant dword values
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vw(.)c1(.*)", null, null , "$1vd$2c1$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vw(.)c2(.*)", null, null , "$1vd$2c2$3", null, null));
|
||||
// Rewrite constant unsigned byte values to constant signed word values
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vbuc1(.*)", null, null , "$1vwsc1$2", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vbuc2(.*)", null, null , "$1vwsc2$2", null, null));
|
||||
// Rewrite constant word values to constant dword values
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vw(.)c1(.*)", null, null , "$1vd$2c1$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vw(.)c2(.*)", null, null , "$1vd$2c2$3", null, null));
|
||||
|
||||
/*
|
||||
|
||||
// Rewrite constant unsigned word values to constant signed dword values
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vwuc1(.*)", null, null , "$1vdsc1$2", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vwuc2(.*)", null, null , "$1vdsc2$2", null, null));
|
||||
*/
|
||||
|
||||
/*
|
||||
// Rewrite any zeropage pointer as an unsigned word zeropage values
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)p..z(.)(.*)", null, null , "$1vwuz$2$3", null, null));
|
||||
// Rewrite any constant pointer as an constant unsigned word
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)p..c(.)(.*)", null, null , "$1vwuc$2$3", null, null));
|
||||
|
||||
*/
|
||||
|
||||
// Synthesize constants using AA/XX/YY
|
||||
|
Loading…
Reference in New Issue
Block a user