Path: blob/main/cddl/contrib/opensolaris/lib/libdtrace/common/dt_as.h
39562 views
/*1* CDDL HEADER START2*3* The contents of this file are subject to the terms of the4* Common Development and Distribution License, Version 1.0 only5* (the "License"). You may not use this file except in compliance6* with the License.7*8* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE9* or http://www.opensolaris.org/os/licensing.10* See the License for the specific language governing permissions11* and limitations under the License.12*13* When distributing Covered Code, include this CDDL HEADER in each14* file and include the License file at usr/src/OPENSOLARIS.LICENSE.15* If applicable, add the following below this CDDL HEADER, with the16* fields enclosed by brackets "[]" replaced with your own identifying17* information: Portions Copyright [yyyy] [name of copyright owner]18*19* CDDL HEADER END20*/21/*22* Copyright 2005 Sun Microsystems, Inc. All rights reserved.23* Use is subject to license terms.24*/2526#ifndef _DT_AS_H27#define _DT_AS_H2829#pragma ident "%Z%%M% %I% %E% SMI"3031#include <sys/types.h>32#include <sys/dtrace.h>3334#ifdef __cplusplus35extern "C" {36#endif3738typedef struct dt_irnode {39uint_t di_label; /* label number or DT_LBL_NONE */40dif_instr_t di_instr; /* instruction opcode */41void *di_extern; /* opcode-specific external reference */42struct dt_irnode *di_next; /* next instruction */43} dt_irnode_t;4445#define DT_LBL_NONE 0 /* no label on this instruction */4647typedef struct dt_irlist {48dt_irnode_t *dl_list; /* pointer to first node in list */49dt_irnode_t *dl_last; /* pointer to last node in list */50uint_t dl_len; /* number of valid instructions */51uint_t dl_label; /* next label number to assign */52} dt_irlist_t;5354extern void dt_irlist_create(dt_irlist_t *);55extern void dt_irlist_destroy(dt_irlist_t *);56extern void dt_irlist_append(dt_irlist_t *, dt_irnode_t *);57extern uint_t dt_irlist_label(dt_irlist_t *);5859#ifdef __cplusplus60}61#endif6263#endif /* _DT_AS_H */646566