16ff6d951SJohn Birrell /* 26ff6d951SJohn Birrell * CDDL HEADER START 36ff6d951SJohn Birrell * 46ff6d951SJohn Birrell * The contents of this file are subject to the terms of the 56ff6d951SJohn Birrell * Common Development and Distribution License, Version 1.0 only 66ff6d951SJohn Birrell * (the "License"). You may not use this file except in compliance 76ff6d951SJohn Birrell * with the License. 86ff6d951SJohn Birrell * 96ff6d951SJohn Birrell * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 106ff6d951SJohn Birrell * or http://www.opensolaris.org/os/licensing. 116ff6d951SJohn Birrell * See the License for the specific language governing permissions 126ff6d951SJohn Birrell * and limitations under the License. 136ff6d951SJohn Birrell * 146ff6d951SJohn Birrell * When distributing Covered Code, include this CDDL HEADER in each 156ff6d951SJohn Birrell * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 166ff6d951SJohn Birrell * If applicable, add the following below this CDDL HEADER, with the 176ff6d951SJohn Birrell * fields enclosed by brackets "[]" replaced with your own identifying 186ff6d951SJohn Birrell * information: Portions Copyright [yyyy] [name of copyright owner] 196ff6d951SJohn Birrell * 206ff6d951SJohn Birrell * CDDL HEADER END 216ff6d951SJohn Birrell */ 226ff6d951SJohn Birrell /* 236ff6d951SJohn Birrell * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 246ff6d951SJohn Birrell * Use is subject to license terms. 256ff6d951SJohn Birrell */ 266ff6d951SJohn Birrell 276ff6d951SJohn Birrell #ifndef _DT_AS_H 286ff6d951SJohn Birrell #define _DT_AS_H 296ff6d951SJohn Birrell 306ff6d951SJohn Birrell #pragma ident "%Z%%M% %I% %E% SMI" 316ff6d951SJohn Birrell 326ff6d951SJohn Birrell #include <sys/types.h> 336ff6d951SJohn Birrell #include <sys/dtrace.h> 346ff6d951SJohn Birrell 356ff6d951SJohn Birrell #ifdef __cplusplus 366ff6d951SJohn Birrell extern "C" { 376ff6d951SJohn Birrell #endif 386ff6d951SJohn Birrell 396ff6d951SJohn Birrell typedef struct dt_irnode { 406ff6d951SJohn Birrell uint_t di_label; /* label number or DT_LBL_NONE */ 416ff6d951SJohn Birrell dif_instr_t di_instr; /* instruction opcode */ 426ff6d951SJohn Birrell void *di_extern; /* opcode-specific external reference */ 436ff6d951SJohn Birrell struct dt_irnode *di_next; /* next instruction */ 446ff6d951SJohn Birrell } dt_irnode_t; 456ff6d951SJohn Birrell 466ff6d951SJohn Birrell #define DT_LBL_NONE 0 /* no label on this instruction */ 476ff6d951SJohn Birrell 486ff6d951SJohn Birrell typedef struct dt_irlist { 496ff6d951SJohn Birrell dt_irnode_t *dl_list; /* pointer to first node in list */ 506ff6d951SJohn Birrell dt_irnode_t *dl_last; /* pointer to last node in list */ 516ff6d951SJohn Birrell uint_t dl_len; /* number of valid instructions */ 526ff6d951SJohn Birrell uint_t dl_label; /* next label number to assign */ 536ff6d951SJohn Birrell } dt_irlist_t; 546ff6d951SJohn Birrell 556ff6d951SJohn Birrell extern void dt_irlist_create(dt_irlist_t *); 566ff6d951SJohn Birrell extern void dt_irlist_destroy(dt_irlist_t *); 576ff6d951SJohn Birrell extern void dt_irlist_append(dt_irlist_t *, dt_irnode_t *); 586ff6d951SJohn Birrell extern uint_t dt_irlist_label(dt_irlist_t *); 596ff6d951SJohn Birrell 606ff6d951SJohn Birrell #ifdef __cplusplus 616ff6d951SJohn Birrell } 626ff6d951SJohn Birrell #endif 636ff6d951SJohn Birrell 646ff6d951SJohn Birrell #endif /* _DT_AS_H */ 65