Edward Pilatowicz wrote:
- CALC_TABLE_ADDR() a little clunky.  (it has seperate 32 and 64
  versions, it assumes the syscall number is in eax/rax, and it has a
  side effect of munging the syscall number.)  how about defining just one
  version of CALC_TABLE_ADDR() as:
---8<---
#define CALC_TABLE_ADDR(sysnum, rv)                                             
\
        GET_P_BRAND_DATA(%rsp, 1, rv)   /* get p_brand_data ptr */;             
\
        mov     SPD_HANDLER(rv), rv     /* get p_brand_data->spd_handler ptr 
*/;\
        shl     $4, sysnum              /* syscall_num * 16 */;                 
\
        add     sysnum, result          /* calc JMP table address */;           
\
        shr     $4, sysnum              /* syscall_num / 16 */
---8<---


Ed,

I reworked the macros and I think its a lot cleaner now.
Let me know what you think.  The new webrev is at:

http://cr.opensolaris.org/~gjelinek/webrev.6768950/

Thanks,
Jerry
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to