\ offsets.in: input file to produce assym.h using the stabs program \ Copyright 2006 Sun Microsystems, Inc. All rights reserved. \ Use is subject to license terms. \ \ CDDL HEADER START \ \ The contents of this file are subject to the terms of the \ Common Development and Distribution License (the "License"). \ You may not use this file except in compliance with the License. \ \ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE \ or http://www.opensolaris.org/os/licensing. \ See the License for the specific language governing permissions \ and limitations under the License. \ \ When distributing Covered Code, include this CDDL HEADER in each \ file and include the License file at usr/src/OPENSOLARIS.LICENSE. \ If applicable, add the following below this CDDL HEADER, with the \ fields enclosed by brackets "[]" replaced with your own identifying \ information: Portions Copyright [yyyy] [name of copyright owner] \ \ CDDL HEADER END \ \ \ \ Guidelines: \ \ A blank line is required between structure/union/intrinsic names. \ \ The general form is: \ \ name size_define [shift_define] \ member_name [offset_define] \ {blank line} \ \ If offset_define is not specified then the member_name is \ converted to all caps and used instead. If the size of an item is \ a power of two then an optional shift count may be output using \ shift_define as the name but only if shift_define was specified. \ \ Arrays cause stabs to automatically output the per-array-item increment \ in addition to the base address: \ \ foo FOO_SIZE \ array FOO_ARRAY \ \ results in: \ \ #define FOO_ARRAY 0x0 \ #define FOO_ARRAY_INCR 0x4 \ \ which allows \#define's to be used to specify array items: \ \ #define FOO_0 (FOO_ARRAY + (0 * FOO_ARRAY_INCR)) \ #define FOO_1 (FOO_ARRAY + (1 * FOO_ARRAY_INCR)) \ ... \ #define FOO_n (FOO_ARRAY + (n * FOO_ARRAY_INCR)) \ \ There are several examples below (search for _INCR). \ \ There is currently no manner in which to identify "anonymous" \ structures or unions so if they are to be used in assembly code \ they must be given names. \ \ When specifying the offsets of nested structures/unions each nested \ structure or union must be listed separately then use the \ "\#define" escapes to add the offsets from the base structure/union \ and all of the nested structures/unions together. See the many \ examples already in this file. #pragma ident "%Z%%M% %I% %E% SMI" #ifndef _GENASSYM #define _GENASSYM #endif #define SIZES 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include greg_t GREGSIZE uintptr_t LWP_ARG_SZ proc PROCSIZE p_link p_next p_child p_sibling p_sig p_wcode p_flag p_tlist p_as p_lockp p_pidp p_fixalignment p_utraps p_brand p_brand_data \#define P_UTRAP4 (UT_ILLTRAP_INSTRUCTION * CPTRSIZE) \#define P_UTRAP7 (UT_FP_DISABLED * CPTRSIZE) \#define P_UTRAP8 (UT_FP_EXCEPTION_IEEE_754 * CPTRSIZE) \#define P_UTRAP10 (UT_TAG_OVERFLOW * CPTRSIZE) \#define P_UTRAP11 (UT_DIVISION_BY_ZERO * CPTRSIZE) \#define P_UTRAP15 (UT_MEM_ADDRESS_NOT_ALIGNED * CPTRSIZE) \#define P_UTRAP16 (UT_PRIVILEGED_ACTION * CPTRSIZE) pid PID_SIZE pid_id PID_PIDID _label_t LABEL_SIZE val LABEL_VAL _kthread THREAD_SIZE t_lock t_lock_flush t_lockp t_oldspl t_pri t_lwp t_procp t_link t_state t_mstate t_stk T_STACK t_swap t_flag T_FLAGS t_ctx t_pcb t_lofault t_onfault t_ontrap t_nomigrate t_cpu t_weakbound_cpu t_lpl t_bound_cpu t_intr t_forw t_back t_sig t_tid t_pre_sys t_preempt t_proc_flag t_startpc t_sysnum _tu._t_post_sys_ast T_POST_SYS_AST _tu._ts._t_astflag T_ASTFLAG _tu._ts._t_sig_check T_SIG_CHECK _tu._ts._t_post_sys T_POST_SYS _tu._ts._t_trapret T_TRAPRET t_preempt_lk t_kpri_req t_lockstat t_pil t_intr_start _tdu._tds._t_dtrace_on T_DTRACE_ON _tdu._tds._t_dtrace_step T_DTRACE_STEP _tdu._tds._t_dtrace_ret T_DTRACE_RET _tdu._tds._t_dtrace_ast T_DTRACE_AST _tdu._t_dtrace_ft T_DTRACE_FT t_dtrace_npc t_copyops \#define L_PC (0 * LABEL_VAL_INCR) \#define L_SP (1 * LABEL_VAL_INCR) \#define T_PC (T_PCB + L_PC) \#define T_SP (T_PCB + L_SP) sysent SYSENT_SIZE SYSENT_SHIFT sy_callc sy_flags as AS_SIZE a_hat a_userlimit hmehash_bucket HMEBUCK_SIZE hmeblkp HMEBUCK_HBLK hmeh_nextpa HMEBUCK_NEXTPA hmeh_listlock HMEBUCK_LOCK tte_t TTE_SIZE ll TTE_LL ism_blk ISMBLK_SIZE iblk_maps IBLK_MAPS iblk_next IBLK_NEXT iblk_nextpa IBLK_NEXTPA ism_map_t ISM_MAP_SZ imap_seg IMAP_SEG imap_vb_shift IMAP_VB_SHIFT imap_hatflags IMAP_HATFLAGS imap_sz_mask IMAP_SZ_MASK imap_ismhat IMAP_ISMHAT tsbe TSBE_SIZE tte_tag TSBE_TAG tte_data TSBE_TTE tsb_tag TSBTAG_SIZE tagints.inthi TSBTAG_INTHI tagints.intlo TSBTAG_INTLO hme_blk HMEBLK_SIZE hblk_next HMEBLK_NEXT hblk_tag HMEBLK_TAG hblk_misc HMEBLK_MISC hblk_hme HMEBLK_HME1 hblk_nextpa HMEBLK_NEXTPA mmu_ctx MMU_CTX_SIZE mmu_gnum MMU_CTX_GNUM mmu_cnum MMU_CTX_CNUM mmu_nctxs MMU_CTX_NCTXS sfmmu_ctx SFMMU_MMU_CTX_SIZE SFMMU_MMU_CTX_SHIFT gnum SFMMU_MMU_GC_NUM user USIZEBYTES u_comm u_signal _klwp LWP_SIZE lwp_thread lwp_regs lwp_fpu lwp_arg lwp_cursig lwp_ru.sysc LWP_RU_SYSC lwp_state lwp_mstate.ms_start LWP_MS_START lwp_mstate.ms_prev LWP_MS_PREV lwp_mstate.ms_state_start LWP_STATE_START lwp_mstate.ms_acct LWP_MS_ACCT lwp_pcb.pcb_flags PCB_FLAGS lwp_pcb.pcb_trap0addr PCB_TRAP0 lwp_pcb.pcb_step PCB_STEP lwp_pcb.pcb_tracepc PCB_TRACEPC mstate MSTATE_SIZE ms_start ms_prev ms_term ms_state_start ms_acct \#define LWP_ACCT_USER (LWP_MS_ACCT + (LMS_USER * LWP_MS_ACCT_INCR)) \#define LWP_ACCT_SYSTEM (LWP_MS_ACCT + (LMS_SYSTEM * LWP_MS_ACCT_INCR)) rwindow32 RWIN32SIZE RWIN32SHIFT rw_local RW32_LOCAL rw_in RW32_IN rwindow64 RWIN64SIZE RWIN64SHIFT rw_local RW64_LOCAL rw_in RW64_IN machpcb MPCBSIZE mpcb_regs mpcb_wbuf mpcb_spbuf mpcb_wbcnt mpcb_rwin mpcb_rsp mpcb_flags mpcb_thread mpcb_wstate mpcb_pa MPCB_PA mpcb_wbuf_pa \#define MPCB_RWIN0 (MPCB_RWIN + (0 * MPCB_RWIN_INCR)) \#define MPCB_RWIN1 (MPCB_RWIN + (1 * MPCB_RWIN_INCR)) \#define MPCB_RSP0 (MPCB_RSP + (0 * MPCB_RSP_INCR)) \#define MPCB_RSP1 (MPCB_RSP + (1 * MPCB_RSP_INCR)) kfpu_t KFPUSIZE fpu_fr.fpu_regs FPU_REGS fpu_fsr fpu_fprs fpu_q fpu_qcnt fpu_en \#define FPU_GSR KFPUSIZE regs REGSIZE r_tstate TSTATE_OFF r_g1 G1_OFF r_g2 G2_OFF r_g3 G3_OFF r_g4 G4_OFF r_g5 G5_OFF r_g6 G6_OFF r_g7 G7_OFF r_o0 O0_OFF r_o1 O1_OFF r_o2 O2_OFF r_o3 O3_OFF r_o4 O4_OFF r_o5 O5_OFF r_o6 O6_OFF r_o7 O7_OFF r_pc PC_OFF r_npc NPC_OFF r_y Y_OFF \ XXX - doesn't preserve case up above \#define nPC_OFF NPC_OFF flushmeter FM_SIZE f_ctx FM_CTX f_usr FM_USR f_region FM_REGION f_segment FM_SEGMENT f_page FM_PAGE f_partial FM_PARTIAL autovec AUTOVECSIZE av_vector av_intarg cpu CPUSIZE cpu_id cpu_flags cpu_thread cpu_thread_lock cpu_kprunrun cpu_lwp cpu_fpowner cpu_idle_thread cpu_intr_thread cpu_intr_actv cpu_base_spl cpu_intr_stack cpu_stats.sys.cpumigrate CPU_STATS_SYS_CPUMIGRATE cpu_stats.sys.intr CPU_STATS_SYS_INTR cpu_stats.sys.intrunpin CPU_STATS_SYS_INTRUNPIN cpu_stats.sys.intrblk CPU_STATS_SYS_INTRBLK cpu_stats.sys.syscall CPU_STATS_SYS_SYSCALL cpu_profile_pc cpu_profile_upc cpu_profile_pil cpu_ftrace.ftd_state CPU_FTRACE_STATE cpu_mstate cpu_intracct cpu_m CPU_MCPU cpu_m.divisor CPU_DIVISOR cpu_m.intrstat CPU_INTRSTAT cpu_m.pil_high_start CPU_PIL_HIGH_START cpu_m.intr_tail INTR_TAIL cpu_m.intr_head INTR_HEAD cpu_m.tl1_hdlr CPU_TL1_HDLR cpu_m.intrcnt CPU_INTRCNT cpu_m.tmp1 CPU_TMP1 cpu_m.tmp2 CPU_TMP2 cpu_m.mpcb CPU_MPCB cpu_m.cpu_private CPU_PRIVATE cpu_m.cpu_mmu_idx CPU_MMU_IDX cpu_m.cpu_mmu_ctxp CPU_MMU_CTXP cpu_m.ptl1_state CPU_PTL1 cpu_core_t CPU_CORE_SIZE CPU_CORE_SHIFT cpuc_dtrace_flags cpuc_dtrace_illval cpuset_t CPUSET_SIZE ptl1_state PTL1_STATE_SIZE ptl1_regs ptl1_entry_count ptl1_stktop ptl1_trapregs ptl1_tl ptl1_tt ptl1_tstate ptl1_tpc ptl1_tnpc lgrp_ld LGRP_LD_SIZE lpl_loadavg lpl_ncpu lpl_lgrpid intr_vec IV_SIZE iv_inum iv_pil iv_flags iv_pad iv_handler iv_arg1 iv_arg2 iv_payload_buf iv_vec_next iv_pil_next dmv_disp DMV_DISP_SIZE DMV_DISP_SHIFT dmv_func dmv_arg spin_mutex SM_SIZE m_spinlock i_ndi_err NDI_ERR_SIZE err_ena err_status err_ontrap ddi_acc_impl DDI_ACC_IMPL_SIZE ahi_common ahi_get8 ahi_get16 ahi_get32 ahi_get64 ahi_put8 ahi_put16 ahi_put32 ahi_put64 ahi_rep_get8 ahi_rep_get16 ahi_rep_get32 ahi_rep_get64 ahi_rep_put8 ahi_rep_put16 ahi_rep_put32 ahi_rep_put64 ahi_fault_check ahi_fault ahi_err stdata STDATA_SIZE sd_lock queue Q_SIZE q_flag q_next q_stream q_syncq q_qinfo qinit QI_SIZE qi_putp syncq SQ_SIZE sq_flags sq_count sq_lock sq_wait sq_exitwait bus_ops BUS_OPS_SIZE bus_dma_map OPS_MAP bus_dma_allochdl OPS_ALLOCHDL bus_dma_freehdl OPS_FREEHDL bus_dma_bindhdl OPS_BINDHDL bus_dma_unbindhdl OPS_UNBINDHDL bus_dma_flush OPS_FLUSH bus_dma_win OPS_WIN bus_dma_ctl OPS_MCTL bus_ctl OPS_CTL dev_ops DEV_OPS_SIZE devo_bus_ops DEVI_BUS_OPS dev_info DEVI_SIZE devi_ops DEVI_DEV_OPS devi_bus_dma_win devi_bus_dma_allochdl devi_bus_dma_freehdl devi_bus_dma_bindhdl devi_bus_dma_unbindhdl devi_bus_dma_flush devi_bus_dma_unbindfunc devi_bus_ctl devi_bus_dma_map devi_bus_dma_ctl kstat_io wtime KSTAT_IO_WTIME wlentime KSTAT_IO_WLENTIME wlastupdate KSTAT_IO_WLASTUPDATE rtime KSTAT_IO_RTIME rlentime KSTAT_IO_RLENTIME rlastupdate KSTAT_IO_RLASTUPDATE wcnt KSTAT_IO_WCNT rcnt KSTAT_IO_RCNT ddi_dma_impl dmai_rflags DMA_HANDLE_RFLAGS dmai_rdip DMA_HANDLE_RDIP on_trap_data ot_prot ot_trap ot_trampoline ot_jmpbuf ot_prev ot_handle ot_pad1 fpustat_kstat FPUSTAT_KSTAT_SIZE fpu_unfinished_traps.value FPUSTAT_UNFIN_KSTAT fpuinfo_kstat FPUINFO_KSTAT_SIZE fpu_sim_fitos.value FPUINFO_FITOS_KSTAT mod_stub_info MODS_SIZE mods_func_adr MODS_INSTFCN mods_errfcn MODS_RETFCN mods_flag MODS_FLAG copyops cp_copyin cp_xcopyin cp_copyout cp_xcopyout cp_copyinstr cp_copyoutstr cp_fuword8 cp_fuword16 cp_fuword32 cp_fuword64 cp_suword8 cp_suword16 cp_suword32 cp_suword64 cp_physio brand BRAND_SIZE b_machops