dis_sparc_fmt.h revision a2bb96e7d59f447f59bc306e53b7d00e38594667
/*
* 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
* 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
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2007 Jason King. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef _DIS_SPARC_FMT_H
#define _DIS_SPARC_FMT_H
#ifdef __cplusplus
extern "C" {
#endif
#include "libdisasm.h"
#include "dis_sparc.h"
/* which set of registers are used with an instruction */
/* the size fo the displacement for branches */
#define DISP22 0x00
#define DISP19 0x01
#define DISP16 0x02
#define CONST22 0x03
#define FLG_RD(x) (x)
#define FLG_RD_VAL(x) (x & 0xfL)
/* flags for ALU instructions */
#define FLG_P1(x) (x << 8)
#define FLG_P2(x) (x << 4)
#define FLG_P3(x) (x)
#define FLG_P3_VAL(x) (x & 0xfL)
/* set if the arguments do not contain immediate values */
/* flags for branch instructions */
/* has branch prediction */
#define FLG_RS1(x) (x)
#define FLG_RS1_VAL(x) (x & 0xfL)
#define FLG_DISP(x) (x << 4L)
#ifdef __cplusplus
}
#endif
#endif /* _DIS_SPARC_FMT_H */