On 11/30/20 7:22 PM, Richard Henderson wrote:
> On 11/30/20 6:26 AM, Philippe Mathieu-Daudé wrote:
>> # 'Foo=number' sets an argument field to a constant value
>> -if re.fullmatch(re_C_ident + '=[+-]?[0-9]+', t):
>> +if re.fullmatch(re_C_ident + '=[+-]?(0[bx])?[0-9]+', t):
On 11/30/20 6:26 AM, Philippe Mathieu-Daudé wrote:
> # 'Foo=number' sets an argument field to a constant value
> -if re.fullmatch(re_C_ident + '=[+-]?[0-9]+', t):
> +if re.fullmatch(re_C_ident + '=[+-]?(0[bx])?[0-9]+', t):
> (fname, value) = t.split('=')
> -
On Mon, Nov 30, 2020 at 1:26 PM Philippe Mathieu-Daudé wrote:
> ISA datasheets often use binary or hexadecimal constant values.
> By doing base conversion, we might introduce bugs. Safer is to
> copy/paste the datasheet value.
> Add support for bin/hex constants in argument field token.
>
> Signed
ISA datasheets often use binary or hexadecimal constant values.
By doing base conversion, we might introduce bugs. Safer is to
copy/paste the datasheet value.
Add support for bin/hex constants in argument field token.
Signed-off-by: Philippe Mathieu-Daudé
---
Is there a more pythonic way to write