[PATCH] tcg: Allow displaying TCG_TYPE_I128 arguments

Philippe Mathieu-Daudé posted 1 patch 1 year, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230222212810.53857-1-philmd@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>
tcg/tcg.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] tcg: Allow displaying TCG_TYPE_I128 arguments
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 tcg/tcg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index a4a3da6804..3df2c6a6af 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1955,6 +1955,7 @@ static char *tcg_get_arg_str_ptr(TCGContext *s, char *buf, int buf_size,
             break;
 #if TCG_TARGET_REG_BITS > 32
         case TCG_TYPE_I64:
+        case TCG_TYPE_I128:
             snprintf(buf, buf_size, "$0x%" PRIx64, ts->val);
             break;
 #endif
-- 
2.38.1


Re: [PATCH] tcg: Allow displaying TCG_TYPE_I128 arguments
Posted by Richard Henderson 1 year, 2 months ago
On 2/22/23 11:28, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   tcg/tcg.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index a4a3da6804..3df2c6a6af 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -1955,6 +1955,7 @@ static char *tcg_get_arg_str_ptr(TCGContext *s, char *buf, int buf_size,
>               break;
>   #if TCG_TARGET_REG_BITS > 32
>           case TCG_TYPE_I64:
> +        case TCG_TYPE_I128:
>               snprintf(buf, buf_size, "$0x%" PRIx64, ts->val);

This would be for a 128-bit constant, which we don't have.
Is this a guess, or hitting the assert, or what?


r~

Re: [PATCH] tcg: Allow displaying TCG_TYPE_I128 arguments
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
On 22/2/23 23:36, Richard Henderson wrote:
> On 2/22/23 11:28, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   tcg/tcg.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/tcg/tcg.c b/tcg/tcg.c
>> index a4a3da6804..3df2c6a6af 100644
>> --- a/tcg/tcg.c
>> +++ b/tcg/tcg.c
>> @@ -1955,6 +1955,7 @@ static char *tcg_get_arg_str_ptr(TCGContext *s, 
>> char *buf, int buf_size,
>>               break;
>>   #if TCG_TARGET_REG_BITS > 32
>>           case TCG_TYPE_I64:
>> +        case TCG_TYPE_I128:
>>               snprintf(buf, buf_size, "$0x%" PRIx64, ts->val);
> 
> This would be for a 128-bit constant, which we don't have.
> Is this a guess, or hitting the assert, or what?

Doh, right... Guessing while reviewing abort() / assert(0) /
g_assert_not_reached() calls :)