src/i386_backend.c
static void update_locations(loc_t *aloc)
{
  loc0 = aloc;
  if (loc1 != NULL)
    {
      loc1 = copy_loc_shallow(loc1);
      should_free_loc1 = true;
    }
  if (loc2 != NULL)
    {
      loc2 = copy_loc_shallow(loc2);
      should_free_loc2 = true;
    }
  if (loc0 != NULL)
    {
      loc_t *loc = loc0;
      loc0 = copy_loc_shallow(loc0);
      if (should_free_loc0)
        free_loc(loc);
      should_free_loc0 = true;
    }
  if (var1 != NULL)
    var1->live = live1;
  if (var2 != NULL)
    var2->live = live2;
  /* note that var0->live may be true here, since var0 may be one of
     var1 or var2; hence, we have to discard var0 first to avoid
     saving it (it is not really live until after the instruction). */
  if (loc0->tag == LOC_FPU_REG)
    disallowed_fpu_reg_for_freeing = loc0->u.fpu_reg; // that's a nasty hack
  discard_var(var0);
  if (var1 != NULL && !var1->live)
    discard_var(var1);
  if (var2 != NULL && !var2->live)
    discard_var(var2);
  disallowed_fpu_reg_for_freeing = -1;
  flush_loc(loc0);
  update_var_loc(var0, loc0);
  var0->live = true;
}
/* This function saves all variables present in `loc' (the location
   where we're going to save the result) and assigns it to loc0. It
   should be called immediately _before_ writing any code. The
   function that all varN variables are set appropriately, and also
   restores their liveness status. */
This function saves all variables present in `loc' (the location
where we're going to save the result) and assigns it to loc0. It
should be called immediately _before_ writing any code. The
function that all varN variables are set appropriately, and also
restores their liveness status.
This function saves all variables present in ` loc ' ( the location where we ' re going to save the result ) and assigns it to loc0 . It should be called immediately _before_ writing any code . The function that all varN variables are set appropriately and also restores their liveness status .
static void update_locations(loc_t *aloc)
{
  loc0 = aloc;
  if (loc1 != NULL)
    {
      loc1 = copy_loc_shallow(loc1);
      should_free_loc1 = true;
    }
  if (loc2 != NULL)
    {
      loc2 = copy_loc_shallow(loc2);
      should_free_loc2 = true;
    }
  if (loc0 != NULL)
    {
      loc_t *loc = loc0;
      loc0 = copy_loc_shallow(loc0);
      if (should_free_loc0)
        free_loc(loc);
      should_free_loc0 = true;
    }
  if (var1 != NULL)
    var1->live = live1;
  if (var2 != NULL)
    var2->live = live2;
  if (loc0->tag == LOC_FPU_REG)
    disallowed_fpu_reg_for_freeing = loc0->u.fpu_reg; 
  discard_var(var0);
  if (var1 != NULL && !var1->live)
    discard_var(var1);
  if (var2 != NULL && !var2->live)
    discard_var(var2);
  disallowed_fpu_reg_for_freeing = -1;
  flush_loc(loc0);
  update_var_loc(var0, loc0);
  var0->live = true;
}
static void update_locations ( loc_t * aloc ) { loc0 = aloc ; if ( loc1 != NULL ) { loc1 = copy_loc_shallow ( loc1 ) ; should_free_loc1 = true ; } if ( loc2 != NULL ) { loc2 = copy_loc_shallow ( loc2 ) ; should_free_loc2 = true ; } if ( loc0 != NULL ) { loc_t * loc = loc0 ; loc0 = copy_loc_shallow ( loc0 ) ; if ( should_free_loc0 ) free_loc ( loc ) ; should_free_loc0 = true ; } if ( var1 != NULL ) var1 -> live = live1 ; if ( var2 != NULL ) var2 -> live = live2 ; if ( loc0 -> tag == LOC_FPU_REG ) disallowed_fpu_reg_for_freeing = loc0 -> u . fpu_reg ; discard_var ( var0 ) ; if ( var1 != NULL && ! var1 -> live ) discard_var ( var1 ) ; if ( var2 != NULL && ! var2 -> live ) discard_var ( var2 ) ; disallowed_fpu_reg_for_freeing = -1 ; flush_loc ( loc0 ) ; update_var_loc ( var0 , loc0 ) ; var0 -> live = true ; }
This function saves all variables present in `loc' (the location
where we're going to save the result) and assigns it to loc0.
This function saves all variables present in ` loc ' ( the location where we ' re going to save the result ) and assigns it to loc0 .
/* note that var0->live may be true here, since var0 may be one of
     var1 or var2; hence, we have to discard var0 first to avoid
     saving it (it is not really live until after the instruction). */ // that's a nasty hack