forked from Imagelibrary/binutils-gdb
gas: also maintain signed-ness for O_big expressions
Interestingly emit_leb128_expr() already assumes X_unsigned is properly
set for O_big. Adjust its conversion-to-bignum to respect the incoming
flag, and have convert_to_bignum() correctly set it on output.
It further can't be quite right that convert_to_bignum() depends on
anything other than the incoming expression. Therefore adjust
emit_expr_with_reloc() to be in line with the other invocation.
This also requires an adjustment for SH, which really should have been
part of 762acf217c ("gas: maintain O_constant signedness in more
cases").
This commit is contained in:
@@ -632,6 +632,7 @@ integer_constant (int radix, expressionS *expressionP)
|
||||
/* Not a small number. */
|
||||
expressionP->X_op = O_big;
|
||||
expressionP->X_add_number = number; /* Number of littlenums. */
|
||||
expressionP->X_unsigned = 1;
|
||||
input_line_pointer--; /* -> char following number. */
|
||||
}
|
||||
}
|
||||
@@ -707,6 +708,7 @@ mri_char_constant (expressionS *expressionP)
|
||||
{
|
||||
expressionP->X_op = O_big;
|
||||
expressionP->X_add_number = i;
|
||||
expressionP->X_unsigned = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1164,6 +1166,8 @@ operand (expressionS *expressionP, enum expr_mode mode)
|
||||
if (generic_bignum[i])
|
||||
break;
|
||||
}
|
||||
|
||||
expressionP->X_unsigned = 0;
|
||||
}
|
||||
else if (op == O_logical_not)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user