Skip to contentSkip to conversation

tcg: Allow displaying TCG_TYPE_I128 arguments

PATCH In review Philippe Mathieu-Daudé 2 participants 3 messages Feb 22, 2023 – Feb 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg: Allow displaying TCG_TYPE_I128 arguments

---
 tcg/tcg.c | 1 +
 1 file changed, 1 insertion(+)
tcg/tcg.c +1 -0
index a4a3da6804..3df2c6a6af 100644
@@ -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
Signature · 1 line
2.38.1
#1 lore raw
Quoted 10 lines · Philippe Mathieu-Daudé
---
  tcg/tcg.c | 1 +
  1 file changed, 1 insertion(+)
tcg/tcg.c +0 -0
index a4a3da6804..3df2c6a6af 100644

tcg/tcg.c static char *tcg_get_arg_str_ptr(TCGContext *s, char *buf, int buf_size, · line 1959

Quoted 5 lines
tcg/tcg.c +1 -0
@@ -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~

#2 lore raw
Quoted 6 lines · Richard Henderson
Quoted 5 lines · Philippe Mathieu-Daudé

---
  tcg/tcg.c | 1 +

  1 file changed, 1 insertion(+)
Quoted 14 lines
Quoted 11 lines
tcg/tcg.c +0 -0
index a4a3da6804..3df2c6a6af 100644
@@ -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 :)