XFree86 generic.c problem

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

 



hello,linux-mips

   When trying to crossing compile XFree86 server for my linux on mipsel
machine(idt64474,p6032) i find some problems:

1.     In: xc/programs/Xserver/hw/xfree86/int10/generic
        write_w & write_l 
   They use
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
    if (OFF(addr + 3) > 2)
      { V_ADDR_WL(addr, val); }
#endif
    V_ADDR_WB(addr, val);
    V_ADDR_WB(addr + 1, val >> 8);
    V_ADDR_WB(addr + 2, val >> 16);
    V_ADDR_WB(addr + 3, val >> 24);

I think there should be a #else to prevent executing of the WB statement
in little endian machines,am i missing something?

2.in xc/programs/Xserver/hw/xfree86/common/comiler.h
These statements seems wrong:
#define stq_u(v,p)      stl_u(v,p)
#define stl_u(v,p)      (*(unsigned char *)(p)) = (v); \
                        (*(unsigned char *)(p)+1) = ((v) >> 8);  \
                                           ^^^^^
                   Should it be (*((unsigned char*)(p) + 1))?
                        (*(unsigned char *)(p)+2) = ((v) >> 16); \
                        (*(unsigned char *)(p)+3) = ((v) >> 24)

#define stw_u(v,p)      (*(unsigned char *)(p)) = (v); \
                        (*(unsigned char *)(p)+1) = ((v) >> 8)


Mr. Guido Guenther has posted a patch to work around it.But could 
it be right somewhere?Just curious:)
  Thank you in advance.

Regards
            Fuxin Zhang
            fxzhang@ict.ac.cn



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux