qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 03/36] tcg: Allocate objects contiguously in temp_allocate


From: Richard Henderson
Subject: Re: [PATCH v4 03/36] tcg: Allocate objects contiguously in temp_allocate_frame
Date: Wed, 11 Jan 2023 07:06:53 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

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

[Prev in Thread] Current Thread [Next in Thread]