From edb174da8d16d7c7429a790c4ee985996f848105 Mon Sep 17 00:00:00 2001 From: David Given Date: Sat, 29 Jun 2013 00:32:39 +0100 Subject: [PATCH] Fix incorrect encoding of 'push lr' and 'pop pc'. --HG-- branch : dtrg-videocore --- mach/vc4/as/mach5.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mach/vc4/as/mach5.c b/mach/vc4/as/mach5.c index 350806e11..e98f67594 100644 --- a/mach/vc4/as/mach5.c +++ b/mach/vc4/as/mach5.c @@ -174,13 +174,11 @@ void stack_instr(quad opcode, int loreg, int hireg, int extrareg) case 26: /* lr */ extrareg = 26; hireg = loreg = -1; - b = 0; break; case 31: /* pc */ extrareg = 31; hireg = loreg = -1; - b = 0; break; default: @@ -204,7 +202,10 @@ void stack_instr(quad opcode, int loreg, int hireg, int extrareg) serror("invalid register range"); if (hireg == -1) - m = 31; + { + b = 3; + m = 15; + } else m = hireg - loreg;