1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-13 15:18:09 +00:00

Merge pull request #47 from antonblanchard/if-fix

Explicitly check against '1' in if statements
This commit is contained in:
Anton Blanchard 2019-09-12 09:46:22 +10:00 committed by GitHub
commit 80aa781454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -248,7 +248,7 @@ begin
ppc_insn := PPC_ILLEGAL;
if f_in.valid then
if f_in.valid = '1' then
v.nia := f_in.nia;
v.insn := f_in.insn;

View File

@ -254,7 +254,7 @@ begin
v.e.cr := c_in.read_cr_data;
v.e.input_carry := d_in.decode.input_carry;
v.e.output_carry := d_in.decode.output_carry;
if d_in.decode.lr then
if d_in.decode.lr = '1' then
v.e.lr := insn_lk(d_in.insn);
end if;
v.e.const1 := decode_const_a(d_in.decode.const_a, d_in.insn);