On 1/11/23 01:59, Alex Bennée wrote:
@@ -3277,13 +3278,26 @@ static void temp_allocate_frame(TCGContext *s, TCGTemp 
*ts)
          tcg_raise_tb_overflow(s);
      }
      s->current_frame_offset = off + size;
-
-    ts->mem_offset = off;
  #if defined(__sparc__)
-    ts->mem_offset += TCG_TARGET_STACK_BIAS;
+    off += TCG_TARGET_STACK_BIAS;
  #endif
-    ts->mem_base = s->frame_temp;
-    ts->mem_allocated = 1;
+
+    /* If the object was subdivided, assign memory to all the parts. */
+    if (ts->base_type != ts->type) {
+        int part_size = tcg_type_size(ts->type);
+        int part_count = size / part_size;
+
+        ts -= ts->temp_subindex;

Whats going on here? Are we jumping to a previous temp? What guarentees
there is something at ts - ts->temp_subindex?

Yes. Guaranteed by base_type != type. See tcg_temp_new_internal -- it's the raison d'être of temp_subindex.


r~

Reply via email to