V0.8: fix shifting of 0 or signed constant.
This patch matches the one from development. If just returns the L-value if the shift is a NOP.
This commit is contained in:
parent
b4b9667def
commit
74e2343e52
|
|
@ -733,7 +733,7 @@ static struct vector_info draw_binary_expr_lrs(ivl_expr_t exp, unsigned wid)
|
||||||
|
|
||||||
/* shifting 0 gets 0. */
|
/* shifting 0 gets 0. */
|
||||||
if (lv.base == 0)
|
if (lv.base == 0)
|
||||||
break;
|
return lv;
|
||||||
|
|
||||||
if (lv.base < 4) {
|
if (lv.base < 4) {
|
||||||
struct vector_info tmp;
|
struct vector_info tmp;
|
||||||
|
|
@ -760,7 +760,7 @@ static struct vector_info draw_binary_expr_lrs(ivl_expr_t exp, unsigned wid)
|
||||||
|
|
||||||
/* shifting 0 gets 0. */
|
/* shifting 0 gets 0. */
|
||||||
if (lv.base == 0)
|
if (lv.base == 0)
|
||||||
break;
|
return lv;
|
||||||
|
|
||||||
if (lv.base < 4) {
|
if (lv.base < 4) {
|
||||||
struct vector_info tmp;
|
struct vector_info tmp;
|
||||||
|
|
@ -787,12 +787,12 @@ static struct vector_info draw_binary_expr_lrs(ivl_expr_t exp, unsigned wid)
|
||||||
|
|
||||||
/* shifting 0 gets 0. */
|
/* shifting 0 gets 0. */
|
||||||
if (lv.base == 0)
|
if (lv.base == 0)
|
||||||
break;
|
return lv;
|
||||||
|
|
||||||
/* Sign extend any constant begets itself, if this
|
/* Sign extend any constant begets itself, if this
|
||||||
expression is signed. */
|
expression is signed. */
|
||||||
if ((lv.base < 4) && (ivl_expr_signed(exp)))
|
if ((lv.base < 4) && (ivl_expr_signed(exp)))
|
||||||
break;
|
return lv;
|
||||||
|
|
||||||
if (lv.base < 4) {
|
if (lv.base < 4) {
|
||||||
struct vector_info tmp;
|
struct vector_info tmp;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue