Move some files that are identical on i386 and amd64 to an x86 subdirectory
rather than keeping duplicate copies. Discussed with: avg MFC after: 1 week
This commit is contained in:
parent
35010be927
commit
0339a1c2b4
@ -69,9 +69,11 @@ CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \
|
|||||||
#CFLAGS+= -DYYDEBUG
|
#CFLAGS+= -DYYDEBUG
|
||||||
|
|
||||||
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
|
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
|
||||||
|
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/dev/dtrace/x86
|
||||||
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM
|
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM
|
||||||
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/i386
|
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/i386
|
||||||
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH}
|
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH}
|
||||||
|
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/x86
|
||||||
.elif ${MACHINE_CPUARCH} == "sparc64"
|
.elif ${MACHINE_CPUARCH} == "sparc64"
|
||||||
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
|
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
|
||||||
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc
|
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/proc.h>
|
#include <sys/proc.h>
|
||||||
#include <sys/dtrace_bsd.h>
|
#include <sys/dtrace_bsd.h>
|
||||||
#include <cddl/dev/dtrace/i386/regset.h>
|
#include <cddl/dev/dtrace/x86/regset.h>
|
||||||
#include <machine/segments.h>
|
#include <machine/segments.h>
|
||||||
#include <machine/reg.h>
|
#include <machine/reg.h>
|
||||||
#include <machine/pcb.h>
|
#include <machine/pcb.h>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,110 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
|
|
||||||
* Use is subject to license terms.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Copyright (c) 1988 AT&T */
|
|
||||||
/* All Rights Reserved */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _DIS_TABLES_H
|
|
||||||
#define _DIS_TABLES_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Constants and prototypes for the IA32 disassembler backend. See dis_tables.c
|
|
||||||
* for usage information and documentation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* values for cpu mode
|
|
||||||
*/
|
|
||||||
#define SIZE16 1
|
|
||||||
#define SIZE32 2
|
|
||||||
#define SIZE64 3
|
|
||||||
|
|
||||||
#define OPLEN 256
|
|
||||||
#define PFIXLEN 8
|
|
||||||
#define NCPS 20 /* number of chars per symbol */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* data structures that must be provided to dtrace_dis86()
|
|
||||||
*/
|
|
||||||
typedef struct d86opnd {
|
|
||||||
char d86_opnd[OPLEN]; /* symbolic rep of operand */
|
|
||||||
char d86_prefix[PFIXLEN]; /* any prefix string or "" */
|
|
||||||
uint_t d86_mode; /* mode for immediate */
|
|
||||||
uint_t d86_value_size; /* size in bytes of d86_value */
|
|
||||||
uint64_t d86_value; /* immediate value of opnd */
|
|
||||||
} d86opnd_t;
|
|
||||||
|
|
||||||
typedef struct dis86 {
|
|
||||||
uint_t d86_mode;
|
|
||||||
uint_t d86_error;
|
|
||||||
uint_t d86_len; /* instruction length */
|
|
||||||
int d86_rmindex; /* index of modrm byte or -1 */
|
|
||||||
uint_t d86_memsize; /* size of memory referenced */
|
|
||||||
char d86_bytes[16]; /* bytes of instruction */
|
|
||||||
char d86_mnem[OPLEN];
|
|
||||||
uint_t d86_numopnds;
|
|
||||||
uint_t d86_rex_prefix; /* value of REX prefix if !0 */
|
|
||||||
char *d86_seg_prefix; /* segment prefix, if any */
|
|
||||||
uint_t d86_opnd_size;
|
|
||||||
uint_t d86_addr_size;
|
|
||||||
uint_t d86_got_modrm;
|
|
||||||
struct d86opnd d86_opnd[4]; /* up to 4 operands */
|
|
||||||
int (*d86_check_func)(void *);
|
|
||||||
int (*d86_get_byte)(void *);
|
|
||||||
#ifdef DIS_TEXT
|
|
||||||
int (*d86_sym_lookup)(void *, uint64_t, char *, size_t);
|
|
||||||
int (*d86_sprintf_func)(char *, size_t, const char *, ...);
|
|
||||||
int d86_flags;
|
|
||||||
uint_t d86_imm_bytes;
|
|
||||||
#endif
|
|
||||||
void *d86_data;
|
|
||||||
} dis86_t;
|
|
||||||
|
|
||||||
extern int dtrace_disx86(dis86_t *x, uint_t cpu_mode);
|
|
||||||
|
|
||||||
#define DIS_F_OCTAL 0x1 /* Print all numbers in octal */
|
|
||||||
#define DIS_F_NOIMMSYM 0x2 /* Don't print symbols for immediates (.o) */
|
|
||||||
|
|
||||||
#ifdef DIS_TEXT
|
|
||||||
extern void dtrace_disx86_str(dis86_t *x, uint_t cpu_mode, uint64_t pc,
|
|
||||||
char *buf, size_t len);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _DIS_TABLES_H */
|
|
@ -1,127 +0,0 @@
|
|||||||
/*
|
|
||||||
* CDDL HEADER START
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the terms of the
|
|
||||||
* Common Development and Distribution License, Version 1.0 only
|
|
||||||
* (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
|
|
||||||
*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
|
|
||||||
* Use is subject to license terms.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
|
|
||||||
|
|
||||||
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
|
|
||||||
/* All Rights Reserved */
|
|
||||||
|
|
||||||
#ifndef _REGSET_H
|
|
||||||
#define _REGSET_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #pragma ident "@(#)regset.h 1.11 05/06/08 SMI"
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The names and offsets defined here should be specified by the
|
|
||||||
* AMD64 ABI suppl.
|
|
||||||
*
|
|
||||||
* We make fsbase and gsbase part of the lwp context (since they're
|
|
||||||
* the only way to access the full 64-bit address range via the segment
|
|
||||||
* registers) and thus belong here too. However we treat them as
|
|
||||||
* read-only; if %fs or %gs are updated, the results of the descriptor
|
|
||||||
* table lookup that those updates implicitly cause will be reflected
|
|
||||||
* in the corresponding fsbase and/or gsbase values the next time the
|
|
||||||
* context can be inspected. However it is NOT possible to override
|
|
||||||
* the fsbase/gsbase settings via this interface.
|
|
||||||
*
|
|
||||||
* Direct modification of the base registers (thus overriding the
|
|
||||||
* descriptor table base address) can be achieved with _lwp_setprivate.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define REG_GSBASE 27
|
|
||||||
#define REG_FSBASE 26
|
|
||||||
#define REG_DS 25
|
|
||||||
#define REG_ES 24
|
|
||||||
|
|
||||||
#define REG_GS 23
|
|
||||||
#define REG_FS 22
|
|
||||||
#define REG_SS 21
|
|
||||||
#define REG_RSP 20
|
|
||||||
#define REG_RFL 19
|
|
||||||
#define REG_CS 18
|
|
||||||
#define REG_RIP 17
|
|
||||||
#define REG_ERR 16
|
|
||||||
#define REG_TRAPNO 15
|
|
||||||
#define REG_RAX 14
|
|
||||||
#define REG_RCX 13
|
|
||||||
#define REG_RDX 12
|
|
||||||
#define REG_RBX 11
|
|
||||||
#define REG_RBP 10
|
|
||||||
#define REG_RSI 9
|
|
||||||
#define REG_RDI 8
|
|
||||||
#define REG_R8 7
|
|
||||||
#define REG_R9 6
|
|
||||||
#define REG_R10 5
|
|
||||||
#define REG_R11 4
|
|
||||||
#define REG_R12 3
|
|
||||||
#define REG_R13 2
|
|
||||||
#define REG_R14 1
|
|
||||||
#define REG_R15 0
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The names and offsets defined here are specified by i386 ABI suppl.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define SS 18 /* only stored on a privilege transition */
|
|
||||||
#define UESP 17 /* only stored on a privilege transition */
|
|
||||||
#define EFL 16
|
|
||||||
#define CS 15
|
|
||||||
#define EIP 14
|
|
||||||
#define ERR 13
|
|
||||||
#define TRAPNO 12
|
|
||||||
#define EAX 11
|
|
||||||
#define ECX 10
|
|
||||||
#define EDX 9
|
|
||||||
#define EBX 8
|
|
||||||
#define ESP 7
|
|
||||||
#define EBP 6
|
|
||||||
#define ESI 5
|
|
||||||
#define EDI 4
|
|
||||||
#define DS 3
|
|
||||||
#define ES 2
|
|
||||||
#define FS 1
|
|
||||||
#define GS 0
|
|
||||||
|
|
||||||
#define REG_PC EIP
|
|
||||||
#define REG_FP EBP
|
|
||||||
#define REG_SP UESP
|
|
||||||
#define REG_PS EFL
|
|
||||||
#define REG_R0 EAX
|
|
||||||
#define REG_R1 EDX
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _REGSET_H */
|
|
@ -14,9 +14,11 @@ SRCS= dtrace.c \
|
|||||||
dtrace_subr.c
|
dtrace_subr.c
|
||||||
|
|
||||||
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
||||||
|
.PATH: ${.CURDIR}/../../../cddl/dev/dtrace/x86
|
||||||
SRCS+= dis_tables.c \
|
SRCS+= dis_tables.c \
|
||||||
instr_size.c
|
instr_size.c
|
||||||
CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel
|
CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel \
|
||||||
|
-I${.CURDIR}/../../../cddl/dev/dtrace/x86
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
SRCS+= bus_if.h device_if.h vnode_if.h
|
SRCS+= bus_if.h device_if.h vnode_if.h
|
||||||
|
Loading…
Reference in New Issue
Block a user