From: David Given Date: Mon, 10 Oct 2016 22:23:35 +0000 (+0200) Subject: A little fiddling with store instructions. The PowerPC is not friendly to X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=2be1c51885afb8940548aa96e999cb8c24917f1d;p=ack.git A little fiddling with store instructions. The PowerPC is not friendly to iburg. --- diff --git a/mach/proto/mcg/table b/mach/proto/mcg/table index 4a853a642..20ef46b2b 100644 --- a/mach/proto/mcg/table +++ b/mach/proto/mcg/table @@ -73,6 +73,7 @@ REGISTERS DECLARATIONS cr; + ubyte_to_be; address fragment; @@ -129,10 +130,23 @@ PATTERNS emit "sth %value, %addr" cost 4; - STORE1(addr:address, value:(int)reg) + STORE1(addr:address, value:(int)ubyte_to_be) emit "stb %value, %addr" cost 4; + STORE1(ADD4(left:(int)reg, right:(int)reg), value:(int)ubyte_to_be) + emit "stbx %value, %left, %right" + cost 4; + + out:(int)ubyte_to_be = in:(int)reg + cost 1; + + out:(int)ubyte_to_be = CIU41(value:(int)reg) + cost 1; + + out:(int)ubyte_to_be = CIU41(CII14(CIU41(value:(int)reg))) + cost 1; + out:(int)reg = LOAD4(addr:address) emit "lwz %out, %addr" cost 4; @@ -325,7 +339,7 @@ PATTERNS cost 4; out:(int)reg = value:CONST4 - emit "la %out, $value" + emit "li %out, $value" cost 8;