From: David Given Date: Sun, 26 May 2013 12:13:58 +0000 (+0100) Subject: Remainders are calculated correctly. printf now works. X-Git-Tag: release-6-0-pre-5~10^2~28 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=366cd10194f6fd8f4d887723d124de33ecd61818;p=ack.git Remainders are calculated correctly. printf now works. --HG-- branch : dtrg-videocore --- diff --git a/mach/vc4/ncg/table b/mach/vc4/ncg/table index 56a3d871a..18e7bc3f7 100644 --- a/mach/vc4/ncg/table +++ b/mach/vc4/ncg/table @@ -150,6 +150,7 @@ INSTRUCTIONS pop GPR0+GPR6+GPR16+GPRFP:wo, GPRPC:wo. push GPR0+GPR6+GPR16+GPRFP+GPRLR:ro. push GPR0+GPR6+GPR16+GPRFP:ro, GPRLR:ro. + rsb GPR:rw, GPR+CONST:ro. sub GPR:wo, GPR:ro, CONST+GPR:ro. sub GPR:rw, GPR+CONST:ro. st GPR:ro, GPRINC:rw. @@ -783,7 +784,7 @@ PATTERNS gen divu %a, %2, %1 mul %a, %1 - sub %a, %2 + rsb %a, %2 yields %a pat rmi $1==QUAD /* Remainder signed word (second % top) */ @@ -792,7 +793,7 @@ PATTERNS gen divs %a, %2, %1 mul %a, %1 - sub %a, %2 + rsb %a, %2 yields %a pat ngi $1==QUAD /* Negate word */