Add a .gitattributes file to force hex files to be binary-like.
[firearm.git] / Execute.v
index 7dcc4b9..ac446aa 100644 (file)
--- a/Execute.v
+++ b/Execute.v
@@ -188,7 +188,7 @@ module Execute(
                begin end
                `DECODE_BRANCH:
                begin
-                       if(!inbubble && !flush && !delayedflush) begin
+                       if(!inbubble && !flush && !delayedflush && !outstall /* Let someone else take precedence. */) begin
                                jmppc = pc + op0 + 32'h8;
                                if(insn[24]) begin
                                        next_write_reg = 1;
@@ -291,11 +291,13 @@ module ALU(
                end
                `ALU_SUB: begin
                        {flag_c, result} = diff;
+                       flag_c = !flag_c;
                        flag_v = diff_v;
                        setres = 1'b1;
                end
                `ALU_RSB: begin
                        {flag_c, result} = rdiff;
+                       flag_c = !flag_c;
                        flag_v = rdiff_v;
                        setres = 1'b1;
                end
@@ -311,11 +313,13 @@ module ALU(
                end
                `ALU_SBC: begin
                        {flag_c, result} = diff - {32'b0, (~cpsr[`CPSR_C])};
+                       flag_c = !flag_c;
                        flag_v = diff_v | (diff[31] & ~result[31]);
                        setres = 1'b1;
                end
                `ALU_RSC: begin
                        {flag_c, result} = rdiff - {32'b0, (~cpsr[`CPSR_C])};
+                       flag_c = !flag_c;
                        flag_v = rdiff_v | (rdiff[31] & ~result[31]);
                        setres = 1'b1;
                end
@@ -331,6 +335,7 @@ module ALU(
                end
                `ALU_CMP: begin
                        {flag_c, result} = diff;
+                       flag_c = !flag_c;
                        flag_v = diff_v;
                        setres = 1'b0;
                end
This page took 0.017988 seconds and 4 git commands to generate.