Rename everything to use the "vex" name.
git-svn-id: svn://svn.valgrind.org/vex/trunk@52 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/Makefile b/Makefile
index 9768817..e6a7c16 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,17 @@
-PUB_HEADERS = pub/libjit_basictypes.h \
- pub/libjit_ir.h \
- pub/libjit.h
+PUB_HEADERS = pub/libvex_basictypes.h \
+ pub/libvex_ir.h \
+ pub/libvex.h
PRIV_HEADERS = priv/host-x86/x86h_defs.h \
priv/host-generic/host_regs.h \
- priv/main/jit_globals.h \
+ priv/main/vex_globals.h \
priv/main/vex_util.h
LIB_OBJS = \
priv/ir/ir_defs.o \
- priv/main/jit_main.o \
- priv/main/jit_globals.o \
+ priv/main/vex_main.o \
+ priv/main/vex_globals.o \
priv/main/vex_util.o \
priv/host-x86/x86h_defs.o \
priv/host-x86/isel_x86.o \
@@ -28,15 +28,15 @@
CC = gcc341
CCFLAGS = -g -Wall -Wshadow -O
-all: libjit.a $(APP_OBJS)
- $(CC) $(CCFLAGS) -o vex $(APP_OBJS) libjit.a
+all: libvex.a $(APP_OBJS)
+ $(CC) $(CCFLAGS) -o vex $(APP_OBJS) libvex.a
-libjit.a: $(LIB_OBJS)
- rm -f libjit.a
- ar clq libjit.a $(LIB_OBJS)
+libvex.a: $(LIB_OBJS)
+ rm -f libvex.a
+ ar clq libvex.a $(LIB_OBJS)
clean:
- rm -f $(APP_OBJS) $(LIB_OBJS) libjit.a vex
+ rm -f $(APP_OBJS) $(LIB_OBJS) libvex.a vex
@@ -52,13 +52,13 @@
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/ir/ir_defs.o \
-c priv/ir/ir_defs.c
-priv/main/jit_main.o: $(ALL_HEADERS) priv/main/jit_main.c
- $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/jit_main.o \
- -c priv/main/jit_main.c
+priv/main/vex_main.o: $(ALL_HEADERS) priv/main/vex_main.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_main.o \
+ -c priv/main/vex_main.c
-priv/main/jit_globals.o: $(ALL_HEADERS) priv/main/jit_globals.c
- $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/jit_globals.o \
- -c priv/main/jit_globals.c
+priv/main/vex_globals.o: $(ALL_HEADERS) priv/main/vex_globals.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_globals.o \
+ -c priv/main/vex_globals.c
priv/main/vex_util.o: $(ALL_HEADERS) priv/main/vex_util.c
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/main/vex_util.o \
diff --git a/priv/host-generic/host_regs.h b/priv/host-generic/host_regs.h
index 95a9fba..35fcda0 100644
--- a/priv/host-generic/host_regs.h
+++ b/priv/host-generic/host_regs.h
@@ -9,7 +9,7 @@
#ifndef __HOST_REGS_H
#define __HOST_REGS_H
-#include "libjit_basictypes.h"
+#include "libvex_basictypes.h"
/*---------------------------------------------------------*/
diff --git a/priv/host-x86/isel_x86.c b/priv/host-x86/isel_x86.c
index 0c31efc..c5f755c 100644
--- a/priv/host-x86/isel_x86.c
+++ b/priv/host-x86/isel_x86.c
@@ -6,9 +6,9 @@
/*--- ---*/
/*---------------------------------------------------------------*/
-#include "libjit_basictypes.h"
-#include "libjit_ir.h"
-#include "libjit.h"
+#include "libvex_basictypes.h"
+#include "libvex_ir.h"
+#include "libvex.h"
#include "vex_util.h"
#include "host_regs.h"
@@ -375,3 +375,8 @@
env->code->n_vregs = env->vreg_ctr;
return env->code;
}
+
+
+/*---------------------------------------------------------------*/
+/*--- end isel_x86.c ---*/
+/*---------------------------------------------------------------*/
diff --git a/priv/host-x86/x86h_defs.c b/priv/host-x86/x86h_defs.c
index 7681a04..c3538ae 100644
--- a/priv/host-x86/x86h_defs.c
+++ b/priv/host-x86/x86h_defs.c
@@ -6,8 +6,8 @@
/*--- ---*/
/*---------------------------------------------------------------*/
-#include "libjit_basictypes.h"
-#include "libjit.h"
+#include "libvex_basictypes.h"
+#include "libvex.h"
#include "vex_util.h"
#include "host_regs.h"
diff --git a/priv/host-x86/x86h_defs.h b/priv/host-x86/x86h_defs.h
index 762c7e3..cf847eb 100644
--- a/priv/host-x86/x86h_defs.h
+++ b/priv/host-x86/x86h_defs.h
@@ -6,8 +6,8 @@
/*--- ---*/
/*---------------------------------------------------------------*/
-#ifndef __LIBJIT_X86H_DEFS_H
-#define __LIBJIT_X86H_DEFS_H
+#ifndef __LIBVEX_X86H_DEFS_H
+#define __LIBVEX_X86H_DEFS_H
/* --------- Registers. --------- */
@@ -25,7 +25,7 @@
extern HReg hregX86_ESP ( void );
extern HReg hregX86_EBP ( void );
extern HReg hregX86_ESI ( void );
-extern HReg hregX86_EDIa ( void );
+extern HReg hregX86_EDI ( void );
/* --------- Memory address expressions (amodes). --------- */
@@ -235,4 +235,8 @@
extern void getAllocableRegs_X86 ( Int*, HReg** );
extern HInstrArray* iselBB_X86 ( IRBB* );
-#endif /* ndef __LIBJIT_X86H_DEFS_H */
+#endif /* ndef __LIBVEX_X86H_DEFS_H */
+
+/*---------------------------------------------------------------*/
+/*--- end x86h_defs.h ---*/
+/*---------------------------------------------------------------*/
diff --git a/priv/ir/ir_defs.c b/priv/ir/ir_defs.c
index c1162a8..1dd4c37 100644
--- a/priv/ir/ir_defs.c
+++ b/priv/ir/ir_defs.c
@@ -6,9 +6,9 @@
/*--- ---*/
/*---------------------------------------------------------------*/
-#include "libjit_basictypes.h"
-#include "libjit_ir.h"
-#include "libjit.h"
+#include "libvex_basictypes.h"
+#include "libvex_ir.h"
+#include "libvex.h"
#include "vex_util.h"
@@ -390,3 +390,7 @@
ppIRExpr(e);
vpanic("typeOfIRExpr");
}
+
+/*---------------------------------------------------------------*/
+/*--- end ir_defs.c ---*/
+/*---------------------------------------------------------------*/
diff --git a/priv/main/jit_globals.c b/priv/main/vex_globals.c
similarity index 86%
rename from priv/main/jit_globals.c
rename to priv/main/vex_globals.c
index 54bfb5b..ff4141c 100644
--- a/priv/main/jit_globals.c
+++ b/priv/main/vex_globals.c
@@ -1,12 +1,12 @@
/*---------------------------------------------------------------*/
/*--- ---*/
-/*--- This file (jit_globals.c) is ---*/
+/*--- This file (vex_globals.c) is ---*/
/*--- Copyright (c) 2004 OpenWorks LLP. All rights reserved. ---*/
/*--- ---*/
/*---------------------------------------------------------------*/
-#include "libjit_basictypes.h"
+#include "libvex_basictypes.h"
#include "vex_util.h"
@@ -38,5 +38,5 @@
/*---------------------------------------------------------------*/
-/*--- end jit_globals.c ---*/
+/*--- end vex_globals.c ---*/
/*---------------------------------------------------------------*/
diff --git a/priv/main/jit_globals.h b/priv/main/vex_globals.h
similarity index 76%
rename from priv/main/jit_globals.h
rename to priv/main/vex_globals.h
index f42c46e..2c40e37 100644
--- a/priv/main/jit_globals.h
+++ b/priv/main/vex_globals.h
@@ -1,18 +1,18 @@
/*---------------------------------------------------------------*/
/*--- ---*/
-/*--- This file (jit_globals.h) is ---*/
+/*--- This file (vex_globals.h) is ---*/
/*--- Copyright (c) 2004 OpenWorks LLP. All rights reserved. ---*/
/*--- ---*/
/*---------------------------------------------------------------*/
-#ifndef __JIT_GLOBALS_H
-#define __JIT_GLOBALS_H
+#ifndef __VEX_GLOBALS_H
+#define __VEX_GLOBALS_H
-#include "libjit_basictypes.h"
+#include "libvex_basictypes.h"
-/* Global settings for the JIT library. These are the
+/* Global settings for the VEX library. These are the
only library-wide globals. */
/* Are we started yet? */
@@ -37,8 +37,8 @@
extern Int vex_guest_insns_per_bb;
-#endif /* ndef __JIT_GLOBALS_H */
+#endif /* ndef __VEX_GLOBALS_H */
/*---------------------------------------------------------------*/
-/*--- end jit_globals.h ---*/
+/*--- end vex_globals.h ---*/
/*---------------------------------------------------------------*/
diff --git a/priv/main/jit_main.c b/priv/main/vex_main.c
similarity index 90%
rename from priv/main/jit_main.c
rename to priv/main/vex_main.c
index adfcce0..c9f4b4b 100644
--- a/priv/main/jit_main.c
+++ b/priv/main/vex_main.c
@@ -1,14 +1,14 @@
/*---------------------------------------------------------------*/
/*--- ---*/
-/*--- This file (jit_main.c) is ---*/
+/*--- This file (vex_main.c) is ---*/
/*--- Copyright (c) 2004 OpenWorks LLP. All rights reserved. ---*/
/*--- ---*/
/*---------------------------------------------------------------*/
-#include "libjit.h"
+#include "libvex.h"
-#include "jit_globals.h"
+#include "vex_globals.h"
#include "vex_util.h"
#include "host_regs.h"
#include "x86h_defs.h"
@@ -20,7 +20,7 @@
/* Exported to library client. */
-void LibJIT_Init (
+void LibVEX_Init (
/* failure exit function */
void (*failure_exit) ( void ),
/* logging output function */
@@ -55,7 +55,7 @@
/* Exported to library client. */
-TranslateResult LibJIT_Translate (
+TranslateResult LibVEX_Translate (
/* The instruction sets we are translating from and to. */
InsnSet iset_guest,
InsnSet iset_host,
@@ -91,7 +91,7 @@
HInstrArray* rcode;
vassert(vex_initdone);
- LibJIT_Clear(False);
+ LibVEX_Clear(False);
/* First off, check that the guest and host insn sets
are supported. */
@@ -107,7 +107,7 @@
iselBB = iselBB_X86;
break;
default:
- vpanic("LibJIT_Translate: unsupported target insn set");
+ vpanic("LibVEX_Translate: unsupported target insn set");
}
switch (iset_guest) {
@@ -115,7 +115,7 @@
bbToIR = NULL; //bbToIR_X86Instr;
break;
default:
- vpanic("LibJIT_Translate: unsupported guest insn set");
+ vpanic("LibVEX_Translate: unsupported guest insn set");
}
irbb = bbToIR ( guest_bytes,
@@ -125,7 +125,7 @@
if (irbb == NULL) {
/* Access failure. */
- LibJIT_Clear(False);
+ LibVEX_Clear(False);
return TransAccessFail;
}
@@ -143,7 +143,7 @@
genSpill, genReload );
/* Assemble, etc. */
- LibJIT_Clear(True);
+ LibVEX_Clear(True);
return TransOK;
}
@@ -151,5 +151,5 @@
/*---------------------------------------------------------------*/
-/*--- end jit_main.c ---*/
+/*--- end vex_main.c ---*/
/*---------------------------------------------------------------*/
diff --git a/priv/main/vex_util.c b/priv/main/vex_util.c
index cb048b8..055f1d3 100644
--- a/priv/main/vex_util.c
+++ b/priv/main/vex_util.c
@@ -6,8 +6,8 @@
/*--- ---*/
/*---------------------------------------------------------------*/
-#include "libjit_basictypes.h"
-#include "jit_globals.h"
+#include "libvex_basictypes.h"
+#include "vex_globals.h"
#include "vex_util.h"
@@ -54,7 +54,7 @@
/* Exported to library client. */
-void LibJIT_Clear ( Bool verb )
+void LibVEX_Clear ( Bool verb )
{
vassert(vex_initdone);
storage_bytes_allocd_TOT += (ULong)storage_bytes_allocd;
diff --git a/priv/main/vex_util.h b/priv/main/vex_util.h
index 2cc60e7..bb36f5a 100644
--- a/priv/main/vex_util.h
+++ b/priv/main/vex_util.h
@@ -9,7 +9,7 @@
#ifndef __VEX_UTIL_H
#define __VEX_UTIL_H
-#include "libjit_basictypes.h"
+#include "libvex_basictypes.h"
/* Misc. */
diff --git a/pub/libjit.h b/pub/libvex.h
similarity index 83%
rename from pub/libjit.h
rename to pub/libvex.h
index ed412ec..705f922 100644
--- a/pub/libjit.h
+++ b/pub/libvex.h
@@ -1,17 +1,17 @@
/*---------------------------------------------------------------*/
/*--- ---*/
-/*--- This file (libjit.h) is ---*/
+/*--- This file (libvex.h) is ---*/
/*--- Copyright (c) 2004 OpenWorks LLP. All rights reserved. ---*/
/*--- ---*/
/*---------------------------------------------------------------*/
-#ifndef __LIBJIT_H
-#define __LIBJIT_H
+#ifndef __LIBVEX_H
+#define __LIBVEX_H
-#include "libjit_basictypes.h"
-#include "libjit_ir.h"
+#include "libvex_basictypes.h"
+#include "libvex_ir.h"
/*---------------------------------------------------------------*/
@@ -21,7 +21,7 @@
/* Initialise the translator. */
-extern void LibJIT_Init (
+extern void LibVEX_Init (
/* failure exit function */
void (*failure_exit) ( void ),
/* logging output function */
@@ -39,7 +39,7 @@
/* Storage management: clear the area, and allocate from it. */
-extern void LibJIT_Clear ( Bool show_stats );
+extern void LibVEX_Clear ( Bool show_stats );
extern void* LibVEX_Alloc ( Int nbytes );
@@ -55,7 +55,7 @@
TranslateResult;
extern
-TranslateResult LibJIT_Translate (
+TranslateResult LibVEX_Translate (
/* The instruction sets we are translating from and to. */
InsnSet iset_guest,
InsnSet iset_host,
@@ -78,11 +78,11 @@
/* Show accumulated statistics. */
-extern void LibJIT_ShowStats ( void );
+extern void LibVEX_ShowStats ( void );
-#endif /* ndef __LIBJIT_H */
+#endif /* ndef __LIBVEX_H */
/*---------------------------------------------------------------*/
-/*--- libjit.h ---*/
+/*--- libvex.h ---*/
/*---------------------------------------------------------------*/
diff --git a/pub/libjit_basictypes.h b/pub/libvex_basictypes.h
similarity index 100%
rename from pub/libjit_basictypes.h
rename to pub/libvex_basictypes.h
diff --git a/pub/libjit_ir.h b/pub/libvex_ir.h
similarity index 96%
rename from pub/libjit_ir.h
rename to pub/libvex_ir.h
index 85d5179..26b279a 100644
--- a/pub/libjit_ir.h
+++ b/pub/libvex_ir.h
@@ -1,15 +1,15 @@
/*---------------------------------------------------------------*/
/*--- ---*/
-/*--- This file (libjit_ir.h) is ---*/
+/*--- This file (libvex_ir.h) is ---*/
/*--- Copyright (c) 2004 OpenWorks LLP. All rights reserved. ---*/
/*--- ---*/
/*---------------------------------------------------------------*/
-#ifndef __LIBJIT_IR_H
-#define __LIBJIT_IR_H
+#ifndef __LIBVEX_IR_H
+#define __LIBVEX_IR_H
-#include "libjit_basictypes.h"
+#include "libvex_basictypes.h"
/*---------------------------------------------------------------*/
@@ -267,9 +267,9 @@
extern IRType typeOfIRExpr ( IRTypeEnv*, IRExpr* );
-#endif /* ndef __LIBJIT_IR_H */
+#endif /* ndef __LIBVEX_IR_H */
/*---------------------------------------------------------------*/
-/*--- libjit_ir.h ---*/
+/*--- libvex_ir.h ---*/
/*---------------------------------------------------------------*/
diff --git a/test_main.c b/test_main.c
index 3779d6f..a68f126 100644
--- a/test_main.c
+++ b/test_main.c
@@ -15,8 +15,8 @@
/*--- Test ---*/
/*---------------------------------------------------------------*/
-#include "libjit_basictypes.h"
-#include "libjit.h"
+#include "libvex_basictypes.h"
+#include "libvex.h"
void failure_exit ( void )
{
@@ -33,17 +33,17 @@
{
Int* p;
Int i, j, n = 0;
- LibJIT_Init ( &failure_exit, &log_bytes,
+ LibVEX_Init ( &failure_exit, &log_bytes,
1, 1, False, 10 );
for (j = 0; j < 5000; j++) {
- LibJIT_Clear(False);
+ LibVEX_Clear(False);
for (i = 0; i < 2000; i++) {
n++;
p = LibVEX_Alloc(16);
p[0] = p[1] = p[2] = p[3] = 44;
}
}
- LibJIT_Clear(True);
+ LibVEX_Clear(True);
printf("Did %d allocs\n", n);
return 0;
}
@@ -54,7 +54,7 @@
#if 0
-#include "libjit_basictypes.h"
+#include "libvex_basictypes.h"
#include "ir_defs.h"
#include "host_regs.h"
#include "x86h_defs.h"