Message ID | 1497974944-27050-3-git-send-email-edgar.iglesias@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 06/20/2017 09:08 AM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias"<edgar.iglesias@xilinx.com> > > Use extract32 instead of opencoding the shifting and masking. > No functional change. > > Signed-off-by: Edgar E. Iglesias<edgar.iglesias@xilinx.com> > --- > target/microblaze/translate.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson <rth@twiddle.net> r~
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 4136a8e..e959de7 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -670,8 +670,8 @@ static void dec_barrel(DisasContext *dc) return; } - s = dc->imm & (1 << 10); - t = dc->imm & (1 << 9); + s = extract32(dc->imm, 10, 1); + t = extract32(dc->imm, 9, 1); LOG_DIS("bs%s%s r%d r%d r%d\n", s ? "l" : "r", t ? "a" : "l", dc->rd, dc->ra, dc->rb);