]> Joshua Wise's Git repositories - firearm.git/blobdiff - Execute.v
Decode: De-UNOPTFLAT it.
[firearm.git] / Execute.v
index 7dcc4b991d7da72df4adf9b34bfcc1a7ee61af43..ac446aafffc6d88fb73554b61716e2433717527b 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.026152 seconds and 4 git commands to generate.