|
From: <sv...@va...> - 2012-09-30 20:30:27
|
florian 2012-09-30 21:30:17 +0100 (Sun, 30 Sep 2012)
New Revision: 2546
Log:
Make header files compilable by itself to get two benefits:
- never have to worry about order of inclusion
- never have to figure out hidden dependencies in order to be
able to include a file
Modified files:
trunk/priv/guest_amd64_defs.h
trunk/priv/guest_arm_defs.h
trunk/priv/guest_generic_bb_to_IR.h
trunk/priv/guest_mips_defs.h
trunk/priv/guest_ppc_defs.h
trunk/priv/guest_ppc_toIR.c
trunk/priv/guest_s390_defs.h
trunk/priv/guest_s390_toIR.c
trunk/priv/guest_x86_defs.h
trunk/priv/host_amd64_defs.h
trunk/priv/host_arm_defs.h
trunk/priv/host_mips_defs.h
trunk/priv/host_ppc_defs.h
trunk/priv/host_s390_defs.h
trunk/priv/host_x86_defs.h
trunk/pub/libvex_emnote.h
trunk/pub/libvex_guest_amd64.h
trunk/pub/libvex_guest_arm.h
trunk/pub/libvex_guest_mips32.h
trunk/pub/libvex_guest_ppc32.h
trunk/pub/libvex_guest_ppc64.h
trunk/pub/libvex_guest_s390x.h
trunk/pub/libvex_guest_x86.h
Modified: trunk/pub/libvex_guest_amd64.h (+0 -1)
===================================================================
--- trunk/pub/libvex_guest_amd64.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/pub/libvex_guest_amd64.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -37,7 +37,6 @@
#define __LIBVEX_PUB_GUEST_AMD64_H
#include "libvex_basictypes.h"
-#include "libvex_emnote.h"
/*---------------------------------------------------------------*/
Modified: trunk/priv/host_x86_defs.h (+3 -0)
===================================================================
--- trunk/priv/host_x86_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/host_x86_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -36,6 +36,9 @@
#ifndef __VEX_HOST_X86_DEFS_H
#define __VEX_HOST_X86_DEFS_H
+#include "libvex_basictypes.h"
+#include "libvex.h" // VexArch
+#include "host_generic_regs.h" // HReg
/* --------- Registers. --------- */
Modified: trunk/priv/host_arm_defs.h (+4 -0)
===================================================================
--- trunk/priv/host_arm_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/host_arm_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -30,6 +30,10 @@
#ifndef __VEX_HOST_ARM_DEFS_H
#define __VEX_HOST_ARM_DEFS_H
+#include "libvex_basictypes.h"
+#include "libvex.h" // VexArch
+#include "host_generic_regs.h" // HReg
+
extern UInt arm_hwcaps;
Modified: trunk/priv/guest_amd64_defs.h (+4 -0)
===================================================================
--- trunk/priv/guest_amd64_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/guest_amd64_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -38,6 +38,10 @@
#ifndef __VEX_GUEST_AMD64_DEFS_H
#define __VEX_GUEST_AMD64_DEFS_H
+#include "libvex_basictypes.h"
+#include "libvex_emnote.h" // VexEmNote
+#include "libvex_guest_amd64.h" // VexGuestAMD64State
+#include "guest_generic_bb_to_IR.h" // DisResult
/*---------------------------------------------------------*/
/*--- amd64 to IR conversion ---*/
Modified: trunk/pub/libvex_guest_s390x.h (+0 -1)
===================================================================
--- trunk/pub/libvex_guest_s390x.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/pub/libvex_guest_s390x.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -32,7 +32,6 @@
#define __LIBVEX_PUB_GUEST_S390X_H
#include "libvex_basictypes.h"
-#include "libvex_emnote.h"
/*------------------------------------------------------------*/
/*--- Vex's representation of the s390 CPU state. ---*/
Modified: trunk/pub/libvex_guest_ppc32.h (+0 -1)
===================================================================
--- trunk/pub/libvex_guest_ppc32.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/pub/libvex_guest_ppc32.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -37,7 +37,6 @@
#define __LIBVEX_PUB_GUEST_PPC32_H
#include "libvex_basictypes.h"
-#include "libvex_emnote.h"
/*---------------------------------------------------------------*/
Modified: trunk/priv/guest_mips_defs.h (+3 -0)
===================================================================
--- trunk/priv/guest_mips_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/guest_mips_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -33,6 +33,9 @@
#ifndef __VEX_GUEST_MIPS_DEFS_H
#define __VEX_GUEST_MIPS_DEFS_H
+#include "libvex_basictypes.h"
+#include "guest_generic_bb_to_IR.h" // DisResult
+
/*---------------------------------------------------------*/
/*--- mips to IR conversion ---*/
/*---------------------------------------------------------*/
Modified: trunk/pub/libvex_emnote.h (+1 -0)
===================================================================
--- trunk/pub/libvex_emnote.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/pub/libvex_emnote.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -36,6 +36,7 @@
#ifndef __LIBVEX_EMNOTE_H
#define __LIBVEX_EMNOTE_H
+#include "libvex_basictypes.h"
/* VEX can sometimes generate code which returns to the dispatcher
with the guest state pointer set to VEX_TRC_JMP_EMWARN or
Modified: trunk/priv/host_s390_defs.h (+0 -1)
===================================================================
--- trunk/priv/host_s390_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/host_s390_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -35,7 +35,6 @@
#include "libvex_basictypes.h" /* Bool */
#include "libvex.h" /* VexArchInfo */
-#include "main_util.h" /* needed for host_generic_regs.h */
#include "host_generic_regs.h" /* HReg */
/* --------- Registers --------- */
Modified: trunk/pub/libvex_guest_arm.h (+0 -1)
===================================================================
--- trunk/pub/libvex_guest_arm.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/pub/libvex_guest_arm.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -32,7 +32,6 @@
#define __LIBVEX_PUB_GUEST_ARM_H
#include "libvex_basictypes.h"
-#include "libvex_emnote.h"
/*---------------------------------------------------------------*/
Modified: trunk/priv/guest_x86_defs.h (+4 -0)
===================================================================
--- trunk/priv/guest_x86_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/guest_x86_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -38,6 +38,10 @@
#ifndef __VEX_GUEST_X86_DEFS_H
#define __VEX_GUEST_X86_DEFS_H
+#include "libvex_basictypes.h"
+#include "libvex_guest_x86.h" // VexGuestX86State
+#include "libvex_emnote.h" // VexEmNote
+#include "guest_generic_bb_to_IR.h" // DisResult
/*---------------------------------------------------------*/
/*--- x86 to IR conversion ---*/
Modified: trunk/pub/libvex_guest_ppc64.h (+0 -1)
===================================================================
--- trunk/pub/libvex_guest_ppc64.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/pub/libvex_guest_ppc64.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -37,7 +37,6 @@
#define __LIBVEX_PUB_GUEST_PPC64_H
#include "libvex_basictypes.h"
-#include "libvex_emnote.h"
/*
volatile == caller-saved (not preserved across function calls)
Modified: trunk/priv/guest_generic_bb_to_IR.h (+3 -0)
===================================================================
--- trunk/priv/guest_generic_bb_to_IR.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/guest_generic_bb_to_IR.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -36,6 +36,9 @@
#ifndef __VEX_GUEST_GENERIC_BB_TO_IR_H
#define __VEX_GUEST_GENERIC_BB_TO_IR_H
+#include "libvex_basictypes.h"
+#include "libvex_ir.h" // IRJumpKind
+#include "libvex.h" // VexArch
/* This defines stuff needed by the guest insn disassemblers.
It's a bit circular; is imported by
Modified: trunk/priv/guest_s390_toIR.c (+1 -1)
===================================================================
--- trunk/priv/guest_s390_toIR.c 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/guest_s390_toIR.c 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -34,7 +34,7 @@
#include "libvex_basictypes.h"
#include "libvex_ir.h"
-#include "libvex.h" /* needed for bb_to_IR.h */
+#include "libvex_emnote.h"
#include "libvex_s390x_common.h"
#include "main_util.h" /* vassert */
#include "main_globals.h" /* vex_traceflags */
Modified: trunk/priv/guest_s390_defs.h (+0 -2)
===================================================================
--- trunk/priv/guest_s390_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/guest_s390_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -34,8 +34,6 @@
#define __VEX_GUEST_S390_DEFS_H
#include "libvex_basictypes.h" // offsetof
-#include "libvex_ir.h" // IRSB (needed by bb_to_IR.h)
-#include "libvex.h" // VexArch (needed by bb_to_IR.h)
#include "guest_generic_bb_to_IR.h" // DisResult
#include "libvex_guest_s390x.h" // VexGuestS390XState
Modified: trunk/priv/guest_arm_defs.h (+2 -0)
===================================================================
--- trunk/priv/guest_arm_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/guest_arm_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -32,6 +32,8 @@
#ifndef __VEX_GUEST_ARM_DEFS_H
#define __VEX_GUEST_ARM_DEFS_H
+#include "libvex_basictypes.h"
+#include "guest_generic_bb_to_IR.h" // DisResult
/*---------------------------------------------------------*/
/*--- arm to IR conversion ---*/
Modified: trunk/pub/libvex_guest_mips32.h (+0 -1)
===================================================================
--- trunk/pub/libvex_guest_mips32.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/pub/libvex_guest_mips32.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -32,7 +32,6 @@
#define __LIBVEX_PUB_GUEST_MIPS32_H
#include "libvex_basictypes.h"
-#include "libvex_emnote.h"
/*---------------------------------------------------------------*/
Modified: trunk/priv/host_mips_defs.h (+4 -0)
===================================================================
--- trunk/priv/host_mips_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/host_mips_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -31,6 +31,10 @@
#ifndef __VEX_HOST_MIPS_DEFS_H
#define __VEX_HOST_MIPS_DEFS_H
+#include "libvex_basictypes.h"
+#include "libvex.h" // VexArch
+#include "host_generic_regs.h" // HReg
+
/* Num registers used for function calls */
#define MIPS_N_REGPARMS 4
Modified: trunk/priv/host_amd64_defs.h (+3 -0)
===================================================================
--- trunk/priv/host_amd64_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/host_amd64_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -36,6 +36,9 @@
#ifndef __VEX_HOST_AMD64_DEFS_H
#define __VEX_HOST_AMD64_DEFS_H
+#include "libvex_basictypes.h"
+#include "libvex.h" // VexArch
+#include "host_generic_regs.h" // HReg
/* --------- Registers. --------- */
Modified: trunk/pub/libvex_guest_x86.h (+0 -1)
===================================================================
--- trunk/pub/libvex_guest_x86.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/pub/libvex_guest_x86.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -37,7 +37,6 @@
#define __LIBVEX_PUB_GUEST_X86_H
#include "libvex_basictypes.h"
-#include "libvex_emnote.h"
/*---------------------------------------------------------------*/
Modified: trunk/priv/guest_ppc_toIR.c (+1 -0)
===================================================================
--- trunk/priv/guest_ppc_toIR.c 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/guest_ppc_toIR.c 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -128,6 +128,7 @@
#include "libvex_basictypes.h"
#include "libvex_ir.h"
#include "libvex.h"
+#include "libvex_emnote.h"
#include "libvex_guest_ppc32.h"
#include "libvex_guest_ppc64.h"
Modified: trunk/priv/guest_ppc_defs.h (+4 -0)
===================================================================
--- trunk/priv/guest_ppc_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/guest_ppc_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -39,6 +39,10 @@
#ifndef __VEX_GUEST_PPC_DEFS_H
#define __VEX_GUEST_PPC_DEFS_H
+#include "libvex_basictypes.h"
+#include "libvex_guest_ppc32.h" // VexGuestPPC32State
+#include "libvex_guest_ppc64.h" // VexGuestPPC64State
+#include "guest_generic_bb_to_IR.h" // DisResult
/*---------------------------------------------------------*/
/*--- ppc to IR conversion ---*/
Modified: trunk/priv/host_ppc_defs.h (+4 -0)
===================================================================
--- trunk/priv/host_ppc_defs.h 2012-09-29 18:05:46 +01:00 (rev 2545)
+++ trunk/priv/host_ppc_defs.h 2012-09-30 21:30:17 +01:00 (rev 2546)
@@ -36,6 +36,10 @@
#ifndef __VEX_HOST_PPC_DEFS_H
#define __VEX_HOST_PPC_DEFS_H
+#include "libvex_basictypes.h"
+#include "libvex.h" // VexArch
+#include "host_generic_regs.h" // HReg
+
/* Num registers used for function calls */
#define PPC_N_REGPARMS 8
|