Advertisement
Guest User

Untitled

a guest
Aug 28th, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifdef __STDC__
  2. # define __CONCAT(x,y)  x ## y
  3. # define __STRING(x)    #x
  4. #else
  5. # define __CONCAT(x,y)  x/**/y
  6. # define __STRING(x)    "x"
  7. #endif
  8.  
  9. #define SET_CPUVAR(off,reg) \
  10.          mvhi    r25, hi(_C_LABEL(cpu_info_store)) ; \
  11.          ori     r25, r25, lo(_C_LABEL(cpu_info_store)) ; \
  12.          lw      reg, (r25+__CONCAT(CPU_INFO_,off))
  13.  
  14. or
  15.  
  16. .macro set_cpuvar off, reg
  17.         mvhi    r25, hi(_C_LABEL(cpu_info_store))
  18.         ori     r25, r25, lo(_C_LABEL(cpu_info_store))
  19.         lw      \reg, (r25+__CONCAT(CPU_INFO_,\off))
  20. .endm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement