https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106635

--- Comment #3 from Xiaoguang <xgchenshy at 126 dot com> ---
(In reply to Richard Biener from comment #1)
> Can you provide preprocessed source of the whole translation unit so the
> testcase is compilable?

please see below code:
void CWLCollectReadRegData(u32* dst,u16 reg_start, u32 reg_length,u32*
total_length, addr_t status_data_base_addr)
{
  u32 data_length=0;
  {
    //opcode
    *dst++ = (OPCODE_RREG<<27)|(reg_length<<16)|(reg_start*4);
    data_length++;

    //data
    *dst++ = (u32)status_data_base_addr;
    data_length++;

    if(sizeof(addr_t) == 8) {
      *dst++ = (u32)(((u64)status_data_base_addr)>>32);
      data_length++;
    } else {
      *dst++ = 0;
      data_length++;
    }
    //alignment
    *dst = 0;
    data_length++;

    *total_length = data_length;
  }
}

Reply via email to