[PATCH] Re: thread-local storage: c front end and generic backend patch

David Edelsohn dje@watson.ibm.com
Mon Jul 29 11:36:00 GMT 2002


>>>>> Richard Henderson writes:

>> Any additional change you want me to make, such as localizing this
>> logic in asm_emit_uninitialized, or can I commit the patch as posted?

Richard> Well, you can't really localize the change any more since the
Richard> change to assemble_variable is require in order for
Richard> asm_emit_uninitialized to be called.

Richard> So, the patch is ok as-is.

	Okay.

	Just for clarity, what I suggested is for asm_emit_uninitialized()
to return success or failure instead of assemble_variable() avoiding the
function for cases it cannot handle.  The code currently is

  if ()
    ...
#ifndef ASM_EMIT_BSS
    else if (! DECL_COMMON)
    ; /* skip next test */
#endif
  else if (BSS)
    {
      asm_emit_uninitialized();
      return;
    }
  /* initialized variables and no defined BSS */

It could be reworked as

  if ()
    ...
  else if (BSS)
    {
      if (asm_emit_uninitialized())
        return;
    }

where asm_emit_uninitialized() returns FALSE for decls requiring
ASM_EMIT_BSS if that macro is undefined.

David



More information about the Gcc-patches mailing list