doc: updating
authorDavid Schleef <ds@schleef.org>
Fri, 29 May 2009 01:54:57 +0000 (18:54 -0700)
committerDavid Schleef <ds@schleef.org>
Fri, 29 May 2009 01:54:57 +0000 (18:54 -0700)
doc/orc-docs.sgml
doc/orc-sections.txt
orc/orc.c
orc/orc.h
orc/orcmmx.h
orc/orcprogram-mmx.c
orc/orcprogram.h
orc/orcsse.h

index d3e97b1..78ea262 100644 (file)
@@ -3,9 +3,9 @@
                "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
 <book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
   <bookinfo>
-    <title>orc Reference Manual</title>
+    <title>Orc Reference Manual</title>
     <releaseinfo>
-      for orc [VERSION]
+      for Orc [VERSION]
       The latest version of this documentation can be found on-line at
       <ulink role="online-location" url="http://[SERVER]/orc/index.html">http://[SERVER]/orc/</ulink>.
     </releaseinfo>
index 0701036..6fe16c9 100644 (file)
@@ -229,6 +229,8 @@ orc_x86_do_fixups
 
 <SECTION>
 <FILE>orcsse</FILE>
+OrcSSERegister
+OrcTargetSSEFlags
 ORC_SSE_SHUF
 orc_sse_emit_0f
 orc_sse_emit_660f
@@ -250,6 +252,8 @@ orc_sse_init
 
 <SECTION>
 <FILE>orcmmx</FILE>
+OrcMMXRegister
+OrcTargetMMXFlags
 ORC_MMX_SHUF
 orc_mmx_emit_0f
 orc_mmx_emit_660f
index e55515a..49f8466 100644 (file)
--- a/orc/orc.c
+++ b/orc/orc.c
@@ -7,6 +7,12 @@
 
 #include <orc/orcprogram.h>
 
+/**
+ * SECTION:orc
+ * @title: Orc
+ * @short_description: Library Initialization
+ */
+
 void _orc_debug_init(void);
 
 void
index ec27285..43884ab 100644 (file)
--- a/orc/orc.h
+++ b/orc/orc.h
@@ -3,6 +3,15 @@
 #define _ORC_ORC_H_
 
 #include <orc/orcprogram.h>
+#include <orc-stdint.h>
+#include <orcarm.h>
+#include <orcdebug.h>
+#include <orcmmx.h>
+#include <orcparse.h>
+#include <orcprogram.h>
+#include <orcsse.h>
+#include <orcutils.h>
+#include <orcx86.h>
 
 #endif
 
index ca5152c..e022840 100644 (file)
@@ -4,7 +4,18 @@
 
 #include <orc/orcx86.h>
 
-enum {
+typedef enum {
+  ORC_TARGET_MMX_MMX = (1<<0),
+  ORC_TARGET_MMX_MMXEXT = (1<<1),
+  ORC_TARGET_MMX_3DNOW = (1<<2),
+  ORC_TARGET_MMX_3DNOWEXT = (1<<3),
+  ORC_TARGET_MMX_SSSE3 = (1<<4),
+  ORC_TARGET_MMX_FRAME_POINTER = (1<<7),
+  ORC_TARGET_MMX_SHORT_JUMPS = (1<<8),
+  ORC_TARGET_MMX_64BIT = (1<<9)
+} OrcTargetMMXFlags;
+
+typedef enum {
   X86_MM0 = ORC_VEC_REG_BASE,
   X86_MM1,
   X86_MM2,
@@ -13,7 +24,7 @@ enum {
   X86_MM5,
   X86_MM6,
   X86_MM7
-};
+} OrcMMXRegister;
 
 #define ORC_MMX_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)&3)<<0))
 
index c791055..5628f57 100644 (file)
@@ -76,13 +76,13 @@ orc_compiler_mmx_init (OrcCompiler *compiler)
 {
   int i;
 
-  if (compiler->target_flags & ORC_TARGET_SSE_64BIT) {
+  if (compiler->target_flags & ORC_TARGET_MMX_64BIT) {
     compiler->is_64bit = TRUE;
   }
-  if (compiler->target_flags & ORC_TARGET_SSE_FRAME_POINTER) {
+  if (compiler->target_flags & ORC_TARGET_MMX_FRAME_POINTER) {
     compiler->use_frame_pointer = TRUE;
   }
-  if (!(compiler->target_flags & ORC_TARGET_SSE_SHORT_JUMPS)) {
+  if (!(compiler->target_flags & ORC_TARGET_MMX_SHORT_JUMPS)) {
     compiler->long_jumps = TRUE;
   }
   
index 105fbcc..67f6900 100644 (file)
@@ -73,30 +73,6 @@ enum {
 };
 
 enum {
-  ORC_TARGET_SSE_SSE2 = (1<<0),
-  ORC_TARGET_SSE_SSE3 = (1<<1),
-  ORC_TARGET_SSE_SSSE3 = (1<<2),
-  ORC_TARGET_SSE_SSE4_1 = (1<<3),
-  ORC_TARGET_SSE_SSE4_2 = (1<<4),
-  ORC_TARGET_SSE_SSE4A = (1<<5),
-  ORC_TARGET_SSE_SSE5 = (1<<6),
-  ORC_TARGET_SSE_FRAME_POINTER = (1<<7),
-  ORC_TARGET_SSE_SHORT_JUMPS = (1<<8),
-  ORC_TARGET_SSE_64BIT = (1<<9)
-};
-
-enum {
-  ORC_TARGET_MMX_MMX = (1<<0),
-  ORC_TARGET_MMX_MMXEXT = (1<<1),
-  ORC_TARGET_MMX_3DNOW = (1<<2),
-  ORC_TARGET_MMX_3DNOWEXT = (1<<3),
-  ORC_TARGET_MMX_SSSE3 = (1<<4),
-  ORC_TARGET_MMX_FRAME_POINTER = (1<<7),
-  ORC_TARGET_MMX_SHORT_JUMPS = (1<<8),
-  ORC_TARGET_MMX_64BIT = (1<<9)
-};
-
-enum {
   ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0)
 };
 
@@ -182,6 +158,7 @@ typedef enum {
 #define ORC_COMPILE_RESULT_IS_FATAL(x) ((x) >= 0x200)
 
 struct _OrcVariable {
+  /*< private >*/
   char *name;
 
   int size;
@@ -205,11 +182,13 @@ struct _OrcVariable {
 };
 
 struct _OrcRule {
+  /*< private >*/
   OrcRuleEmitFunc emit;
   void *emit_user;
 };
 
 struct _OrcRuleSet {
+  /*< private >*/
   OrcOpcodeSet *opcode_set;
   int required_target_flags;
 
@@ -218,6 +197,7 @@ struct _OrcRuleSet {
 };
 
 struct _OrcOpcodeSet {
+  /*< private >*/
   int opcode_major;
   char prefix[8];
 
@@ -237,6 +217,7 @@ struct _OrcStaticOpcode {
 };
 
 struct _OrcInstruction {
+  /*< private >*/
   OrcStaticOpcode *opcode;
   int dest_args[ORC_STATIC_OPCODE_N_DEST];
   int src_args[ORC_STATIC_OPCODE_N_SRC];
@@ -245,6 +226,7 @@ struct _OrcInstruction {
 };
 
 struct _OrcConstant {
+  /*< private >*/
   int type;
   int alloc_reg;
   unsigned int value;
@@ -252,17 +234,18 @@ struct _OrcConstant {
 };
 
 struct _OrcFixup {
+  /*< private >*/
   unsigned char *ptr;
   int type;
   int label;
 };
 
 struct _OrcProgram {
+  /*< private >*/
   OrcInstruction insns[ORC_N_INSNS];
   int n_insns;
 
   OrcVariable vars[ORC_N_VARIABLES];
-  //int n_vars;
   int n_src_vars;
   int n_dest_vars;
   int n_param_vars;
@@ -279,6 +262,7 @@ struct _OrcProgram {
 };
 
 struct _OrcCompiler {
+  /*< private >*/
   OrcProgram *program;
   OrcTarget *target;
 
@@ -288,7 +272,6 @@ struct _OrcCompiler {
   int n_insns;
 
   OrcVariable vars[ORC_N_VARIABLES];
-  //int n_vars;
   int n_temp_vars;
 
   unsigned char *codeptr;
@@ -323,11 +306,13 @@ struct _OrcCompiler {
 };
 
 struct _OrcOpcodeExecutor {
+  /*< private >*/
   int src_values[ORC_STATIC_OPCODE_N_SRC];
   int dest_values[ORC_STATIC_OPCODE_N_DEST];
 };
 
 struct _OrcExecutor {
+  /*< private >*/
   OrcProgram *program;
   int n;
   int counter1;
@@ -350,6 +335,8 @@ struct _OrcTarget {
 
   OrcRuleSet rule_sets[ORC_N_RULE_SETS];
   int n_rule_sets;
+
+  void *_unused[10];
 };
 
 
index c6cf594..d09f57a 100644 (file)
@@ -4,7 +4,20 @@
 
 #include <orc/orcx86.h>
 
-enum {
+typedef enum {
+  ORC_TARGET_SSE_SSE2 = (1<<0),
+  ORC_TARGET_SSE_SSE3 = (1<<1),
+  ORC_TARGET_SSE_SSSE3 = (1<<2),
+  ORC_TARGET_SSE_SSE4_1 = (1<<3),
+  ORC_TARGET_SSE_SSE4_2 = (1<<4),
+  ORC_TARGET_SSE_SSE4A = (1<<5),
+  ORC_TARGET_SSE_SSE5 = (1<<6),
+  ORC_TARGET_SSE_FRAME_POINTER = (1<<7),
+  ORC_TARGET_SSE_SHORT_JUMPS = (1<<8),
+  ORC_TARGET_SSE_64BIT = (1<<9)
+}OrcTargetSSEFlags;
+
+typedef enum {
   X86_XMM0 = ORC_VEC_REG_BASE,
   X86_XMM1,
   X86_XMM2,
@@ -21,7 +34,7 @@ enum {
   X86_XMM13,
   X86_XMM14,
   X86_XMM15
-};
+}OrcSSERegister;
 
 #define ORC_SSE_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)&3)<<0))