target-alpha: fix subl and s8subl indentation
PATCH 1/1 target-alpha: fix subl and s8subl indentation
Two missing braces, one close and one open, fabulously let the code compile.
--- target-alpha/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
target-alpha/translate.c +2 -1
@@ -1927,6 +1927,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)else {tcg_gen_neg_i64 (cpu_ir[rc], cpu_ir[rb]);tcg_gen_ext32s_i64 (cpu_ir[rc], cpu_ir[rc]); + } } }break ;
@@ -1991,7 +1992,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) }else {if (islit)tcg_gen_movi_i64 (cpu_ir[rc], -lit); -else +else {tcg_gen_neg_i64 (cpu_ir[rc], cpu_ir[rb]);tcg_gen_ext32s_i64 (cpu_ir[rc], cpu_ir[rc]); }
Signature · 1 line
1.8.5.3
Quoted 4 lines · Paolo Bonzini
Two missing braces, one close and one open, fabulously let the code compile.
Signed-off-by Paolo Bonzini <[email protected]>
Wow. That's ... amazing.
r~
Quoted 9 lines · Richard Henderson
Quoted 4 lines · Paolo Bonzini
Two missing braces, one close and one open, fabulously let the code compile.
Signed-off-by Paolo Bonzini <[email protected]>Wow. That's ... amazing.
Reviewed-by Richard Henderson <[email protected]>
The *really* amazing thing about this (at least as far as I can see) is the missing braces didn't alter the semantics of the code, except that with the patch we no longer generate an extra TCG op with no effect...
Signature · 2 lines
Cheers, Stuart
Quoted 21 lines · Paolo Bonzini
Two missing braces, one close and one open, fabulously let the code compile.
Signed-off-by Paolo Bonzini <[email protected]>--- target-alpha/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)target-alpha/translate.c +1
-0@@ -1927,6 +1927,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)else {tcg_gen_neg_i64 (cpu_ir[rc], cpu_ir[rb]);tcg_gen_ext32s_i64 (cpu_ir[rc], cpu_ir[rc]); + } } }break ;
target-alpha/translate.c static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) · line 1998
Quoted 8 lines
target-alpha/translate.c +1
-1@@ -1991,7 +1992,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) }else {if (islit)tcg_gen_movi_i64 (cpu_ir[rc], -lit); -else +else {tcg_gen_neg_i64 (cpu_ir[rc], cpu_ir[rb]);tcg_gen_ext32s_i64 (cpu_ir[rc], cpu_ir[rc]); }
I'm surprised checkpatch didn't insist you added braces to the "if" half of this if-else as well.
thanks
-- PMM
Il 16/03/2014 00:47, Peter Maydell ha scritto:
Quoted 25 lines · Paolo Bonzini
Quoted 24 lines
Two missing braces, one close and one open, fabulously let the code compile.
Signed-off-by Paolo Bonzini <[email protected]>--- target-alpha/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)target-alpha/translate.c +1
-0@@ -1927,6 +1927,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)else {tcg_gen_neg_i64 (cpu_ir[rc], cpu_ir[rb]);tcg_gen_ext32s_i64 (cpu_ir[rc], cpu_ir[rc]); + } } }break ;@@ -1991,7 +1992,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) }else {if (islit)tcg_gen_movi_i64 (cpu_ir[rc], -lit);
Quoted 8 lines
target-alpha/translate.c static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) · line 1998
Quoted 5 lines
target-alpha/translate.c +1
-1-else +else {tcg_gen_neg_i64 (cpu_ir[rc], cpu_ir[rb]);tcg_gen_ext32s_i64 (cpu_ir[rc], cpu_ir[rc]); }I'm surprised checkpatch didn't insist you added braces to the "if" half of this if-else as well.
I must admit I ignored it. It makes the patch harder to review, since the bug is explicitly about missing (unmatched) braces. I can add the braces throughout the file, but I don't think it's a reason to obfuscate this particular patch.
Paolo