Index: MANIFEST
===================================================================
RCS file: /cvs/public/parrot/MANIFEST,v
retrieving revision 1.531
diff -u -r1.531 MANIFEST
--- MANIFEST	8 Jan 2004 15:33:40 -0000	1.531
+++ MANIFEST	24 Jan 2004 03:14:09 -0000
@@ -153,6 +153,9 @@
 config/gen/myconfig/myconfig.in                   []
 config/gen/parrot_include.pl                      []
 config/gen/platform.pl                            []
+config/gen/platform/aix.c                         []
+config/gen/platform/aix.h                         []
+config/gen/platform/aix.s                         []
 config/gen/platform/ansi.c                        []
 config/gen/platform/ansi.h                        []
 config/gen/platform/darwin.c                      []
Index: config/gen/platform.pl
===================================================================
RCS file: /cvs/public/parrot/config/gen/platform.pl,v
retrieving revision 1.5
diff -u -r1.5 platform.pl
--- config/gen/platform.pl	23 Oct 2003 19:54:07 -0000	1.5
+++ config/gen/platform.pl	24 Jan 2004 03:14:09 -0000
@@ -16,6 +16,7 @@
   $platform="generic" unless -e "config/gen/platform/$platform.c";
 
   copy_if_diff("config/gen/platform/$platform.c", "src/platform.c");
+  copy_if_diff("config/gen/platform/$platform.s", "src/platform_asm.s");
   copy_if_diff("config/gen/platform/$platform.h", "include/parrot/platform.h");
   copy_if_diff("config/gen/platform/platform_interface.h",
 		  "include/parrot/platform_interface.h");
Index: config/gen/makefiles/root.in
===================================================================
RCS file: /cvs/public/parrot/config/gen/makefiles/root.in,v
retrieving revision 1.179
diff -u -r1.179 root.in
--- config/gen/makefiles/root.in	11 Jan 2004 11:05:25 -0000	1.179
+++ config/gen/makefiles/root.in	24 Jan 2004 03:14:09 -0000
@@ -110,6 +110,7 @@
     lib/Parrot/Config.pm \
     lib/Parrot/PMC.pm \
     $(SRC)/platform.c \
+    $(SRC)/platform_asm.s \
     $(SRC)/core_pmcs.c \
     CFLAGS imcc/CFLAGS \
     libparrot.def
@@ -251,6 +252,7 @@
     $(SRC)/key$(O) \
     $(SRC)/hash$(O) \
     $(SRC)/core_pmcs$(O) \
+    $(SRC)/platform_asm$(O) \
     $(SRC)/platform$(O) ${jit_o} \
     $(SRC)/rx$(O) \
     $(SRC)/rxstacks$(O) \
@@ -657,6 +659,8 @@
 $(SRC)/resources$(O) : $(GENERAL_H_FILES)
 
 $(SRC)/platform$(O) : $(GENERAL_H_FILES)
+
+$(SRC)/platform_asm$(O) : $(GENERAL_H_FILES)
 
 $(SRC)/core_pmcs$(O) : $(GENERAL_H_FILES)
 
Index: config/init/hints/aix.pl
===================================================================
RCS file: /cvs/public/parrot/config/init/hints/aix.pl,v
retrieving revision 1.1
diff -u -r1.1 aix.pl
--- config/init/hints/aix.pl	3 Oct 2003 08:22:36 -0000	1.1
+++ config/init/hints/aix.pl	24 Jan 2004 03:14:09 -0000
@@ -1,7 +1,4 @@
-my $libs = Configure::Data->get('libs');
-if ( $libs !~ /-lpthreads/ ) {
-    $libs .= ' -lpthreads';
-}
 Configure::Data->set(
-    libs => $libs,
+    cc => 'xlc_r',
+    link => 'xlc_r'
 );
Index: jit/ppc/jit_emit.h
===================================================================
RCS file: /cvs/public/parrot/jit/ppc/jit_emit.h,v
retrieving revision 1.34
diff -u -r1.34 jit_emit.h
--- jit/ppc/jit_emit.h	12 Jan 2004 12:11:45 -0000	1.34
+++ jit/ppc/jit_emit.h	24 Jan 2004 03:14:09 -0000
@@ -10,7 +10,14 @@
 #include <sys/mman.h>
 #include <limits.h>
 #ifndef CACHELINESIZE
-#  define CACHELINESIZE 0x10
+   /* TODO this should be determined by configure */
+#  if PARROT_EXEC_OS_AIX
+     /* for POWER3 */
+#    define CACHELINESIZE 0x80
+#  else
+     /* for PowerPC */
+#    define CACHELINESIZE 0x10
+#  endif
 #endif
 
 typedef enum {
@@ -650,8 +657,14 @@
     _emit_bx(jit_info->native_ptr, 1, 0);
     */
 
+#   if PARROT_EXEC_OS_AIX
+    /* support AIX calling convention using compiler intermediary _ptrgl */
+    jit_emit_mov_ri_i(jit_info->native_ptr, ISR1, (long)
+            *((long*)(interpreter->op_func_table[*(jit_info->cur_op)])));
+#   else
     jit_emit_mov_ri_i(jit_info->native_ptr, ISR1, 
             (long)(interpreter->op_func_table[*(jit_info->cur_op)]));
+#   endif
     jit_emit_mtctr(jit_info->native_ptr, ISR1);
     jit_emit_bctrl(jit_info->native_ptr);
 }
@@ -789,7 +802,11 @@
 #if JIT_EMIT == 0
 
 #  define REQUIRES_CONSTANT_POOL 0
-#  define INT_REGISTERS_TO_MAP 24
+#  ifdef PARROT_EXEC_OS_AIX
+#    define INT_REGISTERS_TO_MAP 23
+#  else
+#    define INT_REGISTERS_TO_MAP 24
+#  endif
 #  define FLOAT_REGISTERS_TO_MAP 29
 
 /* Reserved:
@@ -804,13 +821,43 @@
 
     { r16, r17, r18, r19, r20, r21, r22, r23,
       r24, r25, r26, r27, r28, r29, r30,
+#  ifdef PARROT_EXEC_OS_AIX
+      /* AIX calling convention reserves r2 */
+      r3, r4, r5, r6, r7, r8, r9, r10 };
+#  else
       r2, r3, r4, r5, r6, r7, r8, r9, r10 };
+#  endif
 
 char floatval_map[FLOAT_REGISTERS_TO_MAP] =
     { r13, r14, r15, r16, r17, r18, r19, r20, r21,
       r22, r23, r24, r25, r26, r27, r28, r29, r30,
       r31, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 };
 
+#ifdef __IBMC__
+
+void ppc_dcbf(char *_sync);
+void ppc_sync(void);
+
+#else
+
+void
+ppc_dcbf(char *_sync)
+{
+    __asm__ __volatile__ (
+    "dcbf 0,%0"
+    :
+    : "r" ((long)_sync)
+    );
+}
+
+void
+ppc_sync(void)
+{
+    __asm__ __volatile__ ("sync");
+}
+
+#endif
+
 static void
 ppc_sync_cache (void *_start, void *_end)
 {
@@ -818,16 +865,10 @@
     char *end = (char *)((((int)_end)+CACHELINESIZE-1) &~(CACHELINESIZE - 1));
     char *_sync;
 
-#ifndef __IBMC__
     for (_sync = start; _sync < end; _sync += CACHELINESIZE) {
-        __asm__ __volatile__ (
-        "dcbf 0,%0"
-        :
-        : "r" ((long)_sync)
-        );
+        ppc_dcbf(_sync);
     }
-    __asm__ __volatile__ ("sync");
-#endif /* __IBMC__ */
+    ppc_sync();
 }
 
 #endif /* JIT_EMIT == 0 */
Index: src/interpreter.c
===================================================================
RCS file: /cvs/public/parrot/src/interpreter.c,v
retrieving revision 1.255
diff -u -r1.255 interpreter.c
--- src/interpreter.c	12 Jan 2004 09:50:26 -0000	1.255
+++ src/interpreter.c	24 Jan 2004 03:14:11 -0000
@@ -422,12 +422,30 @@
     }
 }
 
+#ifdef PARROT_EXEC_OS_AIX
+extern void* ppc_get_toc( );
+#endif
+
 static opcode_t *
 runops_jit(struct Parrot_Interp *interpreter, opcode_t *pc)
 {
 #if JIT_CAPABLE
+#  ifdef PARROT_EXEC_OS_AIX
+    /* AIX calling convention requires that function-call-by-ptr be made
+       through the following struct: */
+    struct { jit_f functPtr; void *toc; void *env; } ptrgl_t;
+    ptrgl_t.functPtr = (jit_f) D2FPTR(init_jit(interpreter, pc));
+    ptrgl_t.env = NULL;
+
+    /* $r2 (TOC) needs to point back here so we can return from non-JIT
+       functions */
+    ptrgl_t.toc = ppc_get_toc( );
+
+    ((jit_f) D2FPTR(&ptrgl_t)) (interpreter, pc);
+#  else
     jit_f jit_code = (jit_f) D2FPTR(init_jit(interpreter, pc));
     (jit_code) (interpreter, pc);
+#  endif
 #endif
     return NULL;
 }
@@ -909,7 +927,7 @@
     if (!interpreter->evc_func_table) {
         interpreter->evc_func_table = mem_sys_allocate(sizeof(void *) * n);
         for (i = 0; i < n; ++i)
-            interpreter->evc_func_table[i] =
+            interpreter->evc_func_table[i] = (op_func_t)
                 ((void**)lib->op_func_table)[CORE_OPS_check_events__];
     }
 }
@@ -1500,7 +1518,8 @@
      */
     if ((int)interpreter->run_core == cg_lib->core_type) {
         for (i = n_old; i < n_tot; ++i)
-            interpreter->evc_func_table[i] = ops_addr[CORE_OPS_check_events__];
+            interpreter->evc_func_table[i] =
+                (op_func_t)ops_addr[CORE_OPS_check_events__];
         interpreter->save_func_table = (void *) ops_addr;
     }
     /*
Index: src/jit_debug_xcoff.c
===================================================================
RCS file: /cvs/public/parrot/src/jit_debug_xcoff.c,v
retrieving revision 1.2
diff -u -r1.2 jit_debug_xcoff.c
--- src/jit_debug_xcoff.c	23 Oct 2003 17:48:59 -0000	1.2
+++ src/jit_debug_xcoff.c	24 Jan 2004 03:14:11 -0000
@@ -195,6 +195,8 @@
     int line;
     opcode_t lc;
 
+    return;
+
     if (interpreter->code->cur_cs->debugs) {
         char *ext;
         char *src = interpreter->code->cur_cs->debugs->filename;
--- /dev/null	Fri Jan 23 19:15:48 2004
+++ config/gen/platform/aix.c	Thu Jan 22 18:55:18 2004
@@ -0,0 +1,344 @@
+/*
+** platform.c [generic version]
+*/
+
+#include <time.h>
+#include <sys/time.h>
+
+#include "parrot/parrot.h"
+
+#ifdef PARROT_HAS_HEADER_DLFCN
+#  include <dlfcn.h>
+#endif
+
+#define PARROT_DLOPEN_FLAGS RTLD_LAZY
+
+/*
+** Parrot_intval_time()
+*/
+
+INTVAL
+Parrot_intval_time(void)
+{
+    return time(NULL);
+}
+
+
+/*
+** Parrot_floatval_time()
+*/
+
+FLOATVAL
+Parrot_floatval_time(void)
+{
+    struct timeval t;
+    gettimeofday(&t, NULL);
+    return (FLOATVAL)t.tv_sec + ((FLOATVAL)t.tv_usec / 1000000.0);
+}
+
+
+/*
+** Parrot_sleep()
+*/
+
+void
+Parrot_sleep(unsigned int seconds)
+{
+    sleep(seconds);
+}
+
+
+/*
+** Parrot_setenv()
+*/
+
+void
+Parrot_setenv(const char *name, const char *value)
+{
+#ifdef PARROT_HAS_SETENV
+    setenv(name, value, 1);
+#else
+    int name_len = strlen(name);
+    int val_len = strlen(value);
+
+    char *envs = malloc(name_len + 1 + val_len + 1);
+    if (envs == NULL)
+        return;
+
+    /* Save a bit of time, by using the fact we already have the
+       lengths, avoiding strcat */
+    strcpy(envs, name);
+    strcpy(envs + name_len, "=");
+    strcpy(envs + name_len + 1, value);
+
+    putenv(envs);
+
+    /* The buffer is intentionally not freed! */
+#endif
+}
+
+void
+Parrot_unsetenv(const char *name)
+{
+#ifdef PARROT_HAS_UNSETENV
+    unsetenv(name);
+#else
+    Parrot_setenv(name, "");
+#endif
+}
+
+char *
+Parrot_getenv(const char *name, int *free_it)
+{
+    *free_it = 0;
+    return getenv(name);
+}
+
+/*
+** Parrot_dlopen()
+*/
+
+void *
+Parrot_dlopen(const char *filename)
+{
+#ifdef PARROT_HAS_HEADER_DLFCN
+    return dlopen(filename, PARROT_DLOPEN_FLAGS);
+#else
+    return 0;
+#endif
+}
+
+
+/*
+** Parrot_dlerror()
+*/
+
+const char *
+Parrot_dlerror(void)
+{
+#ifdef PARROT_HAS_HEADER_DLFCN
+    return dlerror();
+#else
+    return 0;
+#endif
+}
+
+
+/*
+** Parrot_dlsym()
+*/
+
+void *
+Parrot_dlsym(void *handle, const char *symbol)
+{
+#ifdef PARROT_HAS_HEADER_DLFCN
+    return dlsym(handle, symbol);
+#else
+    return 0;
+#endif
+}
+
+
+/*
+** Parrot_dlclose()
+*/
+
+int
+Parrot_dlclose(void *handle)
+{
+#ifdef PARROT_HAS_HEADER_DLFCN
+    return dlclose(handle);
+#else
+    return -1;
+#endif
+}
+
+/*
+ * memalign related stuff
+ */
+
+#if defined(PARROT_HAS_POSIX_MEMALIGN)
+#include <stdlib.h>
+
+void *
+Parrot_memalign(size_t align, size_t size)
+{
+    void *p;
+    int i = posix_memalign(&p, align, size);
+    return i == 0 ? p : NULL;
+}
+
+void *
+Parrot_memalign_if_possible(size_t align, size_t size)
+{
+    void *p;
+    int i = posix_memalign(&p, align, size);
+    return i == 0 ? p : NULL;
+}
+
+#elif defined(PARROT_HAS_MEMALIGN)
+
+#if defined(PARROT_HAS_HEADER_MALLOC)
+#include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
+
+void *
+Parrot_memalign(size_t align, size_t size)
+{
+    return memalign(align, size);
+}
+
+void *
+Parrot_memalign_if_possible(size_t align, size_t size)
+{
+    return memalign(align, size);
+}
+
+#endif
+
+void
+Parrot_free_memalign(void *p)
+{
+    free(p);
+}
+
+
+/*
+ * signal handling
+ */
+#ifdef PARROT_HAS_HEADER_SIGNAL
+#include <signal.h>
+/*
+ * for now use signal based functions
+ */
+
+Parrot_sighandler_t
+Parrot_set_sighandler(int signum, Parrot_sighandler_t handler)
+{
+    return signal(signum, handler);
+}
+#endif
+
+/*
+ * itimer stuff
+ */
+
+#ifdef PARROT_HAS_SETITIMER
+
+/*
+ * Start a system timer with the passed value in milli seconds.
+ *
+ * The handle is that, what new_sys_timer_ms() returned.
+ * We could pass ITIMER_REAL in handle, but for now we ignore it
+ * as we are just having one timer.
+ */
+
+void
+start_sys_timer_ms(void *handle, int ms)
+{
+    struct itimerval its;
+    memset(&its, 0, sizeof(its));
+    if (ms) {
+	its.it_interval.tv_sec = its.it_value.tv_sec = ms/1000;
+	its.it_interval.tv_usec = its.it_value.tv_usec = 1000 *(ms%1000);
+    }
+    setitimer(ITIMER_REAL, &its, NULL);
+}
+
+/* Stop the given timer. */
+void
+stop_sys_timer_ms(void *handle)
+{
+    start_sys_timer_ms(handle, 0);
+}
+
+/*
+ * Return the programmed timer interval or 0 if none for the
+ * given timer handle.
+ */
+
+int
+get_sys_timer_ms(void *handle)
+{
+    struct itimerval ots;
+    getitimer(ITIMER_REAL, &ots);
+    return ots.it_interval.tv_sec * 1000 + ots.it_interval.tv_usec/1000;
+}
+
+/*
+ * Create a new system timer with ~ms resolution.
+ * The returned handle is passed to the other timer functions.
+ */
+void *
+new_sys_timer_ms()
+{
+    return 0;
+}
+
+#else
+#endif
+
+#ifdef PARROT_HAS_EXEC_PROTECT
+/*
+ * Allocate executable memory
+ * Round up to page size because the whole page will be marked as
+ *   executable
+ */
+void *
+mem_alloc_executable(size_t size)
+{
+    void *p;
+    size_t pagesize = sysconf(_SC_PAGESIZE);
+    size = (size + pagesize - 1) & ~(pagesize-1);
+    if (posix_memalign(&p, pagesize, size))
+        return NULL;
+    mprotect(p, size, PROT_READ|PROT_WRITE|PROT_EXEC);
+    return p;
+}
+
+void
+mem_free_executable(void *p)
+{
+    free(p);
+}
+
+/*
+ * Reallocate executable memory
+ * Round up to page size because the whole page will be marked as
+ *   executable
+ * The intermediate temp is required because we don't know the old size
+ */
+void *
+mem_realloc_executable(void* old, size_t newsize)
+{
+    void *temp;
+    void *new;
+    size_t pagesize = sysconf(_SC_PAGESIZE);
+    size_t roundup;
+    temp = realloc(old, newsize);
+    if (temp == NULL)
+        return NULL;
+    free(old);
+    roundup = (newsize + pagesize - 1) & ~(pagesize-1);
+    if (posix_memalign(&new, pagesize, roundup))
+        new = NULL;
+    if (new) {
+        mprotect(new, roundup, PROT_READ|PROT_WRITE|PROT_EXEC);
+        memcpy(new, temp, newsize);
+    }
+    free(temp);
+    return new;
+}
+#endif
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+ */
--- /dev/null	Fri Jan 23 19:15:48 2004
+++ config/gen/platform/aix.h	Thu Jan 22 18:55:15 2004
@@ -0,0 +1,71 @@
+#if !defined(PARROT_PLATFORM_H_GUARD)
+#define PARROT_PLATFORM_H_GUARD
+
+/*
+** platform.h [generic version]
+*/
+
+
+/*
+** I/O:
+*/
+
+#define DEFAULT_OPEN_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
+#ifndef S_ISREG
+#  define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
+#endif
+
+/*
+** Miscellaneous:
+*/
+
+
+/*
+** Dynamic Loading:
+*/
+
+#define PARROT_DLOPEN_FLAGS RTLD_LAZY
+
+/*
+ * signal handling
+ */
+
+#if defined(PARROT_HAS_HEADER_SIGNAL) && defined(PARROT_HAS_HEADER_SYSTYPES)
+#  include <signal.h>
+#  include <sys/types.h>
+#  define dumpcore() raise(SIGQUIT)
+#endif
+
+#ifdef PARROT_HAS_HEADER_SIGNAL
+#  undef Parrot_set_sighandler
+#  ifdef PARROT_HAS___SIGHANDLER_T
+    typedef __sighandler_t Parrot_sighandler_t;
+#  else
+    typedef void (*Parrot_sighandler_t) (int);
+#  endif
+
+    Parrot_sighandler_t Parrot_set_sighandler(int s, Parrot_sighandler_t f);
+#endif
+
+#ifdef PARROT_HAS_HEADER_PTHREAD
+#  include "parrot/thr_pthread.h"
+#endif
+
+#ifdef PARROT_HAS_HEADER_UNISTD
+#  include <unistd.h>
+#  ifdef _POSIX_PRIORITY_SCHEDULING
+#    define YIELD sched_yield()
+#  endif
+#endif
+
+#endif
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+ */
--- /dev/null	Fri Jan 23 19:15:48 2004
+++ config/gen/platform/aix.s	Fri Jan 23 17:52:44 2004
@@ -0,0 +1,210 @@
+# Branch hints suppressed.
+.machine "pwr"
+.set r0,0; .set SP,1; .set RTOC,2; .set r3,3; .set r4,4
+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
+.set r30,30; .set r31,31
+.set fp0,0; .set fp1,1; .set fp2,2; .set fp3,3; .set fp4,4
+.set fp5,5; .set fp6,6; .set fp7,7; .set fp8,8; .set fp9,9
+.set fp10,10; .set fp11,11; .set fp12,12; .set fp13,13; .set fp14,14
+.set fp15,15; .set fp16,16; .set fp17,17; .set fp18,18; .set fp19,19
+.set fp20,20; .set fp21,21; .set fp22,22; .set fp23,23; .set fp24,24
+.set fp25,25; .set fp26,26; .set fp27,27; .set fp28,28; .set fp29,29
+.set fp30,30; .set fp31,31
+.set MQ,0; .set XER,1; .set FROM_RTCU,4; .set FROM_RTCL,5; .set FROM_DEC,6
+.set LR,8; .set CTR,9; .set TID,17; .set DSISR,18; .set DAR,19; .set TO_RTCU,20
+.set TO_RTCL,21; .set TO_DEC,22; .set SDR_0,24; .set SDR_1,25; .set SRR_0,26
+.set SRR_1,27
+.set BO_dCTR_NZERO_AND_NOT,0; .set BO_dCTR_NZERO_AND_NOT_1,1
+.set BO_dCTR_ZERO_AND_NOT,2; .set BO_dCTR_ZERO_AND_NOT_1,3
+.set BO_IF_NOT,4; .set BO_IF_NOT_1,5; .set BO_IF_NOT_2,6
+.set BO_IF_NOT_3,7; .set BO_dCTR_NZERO_AND,8; .set BO_dCTR_NZERO_AND_1,9
+.set BO_dCTR_ZERO_AND,10; .set BO_dCTR_ZERO_AND_1,11; .set BO_IF,12
+.set BO_IF_1,13; .set BO_IF_2,14; .set BO_IF_3,15; .set BO_dCTR_NZERO,16
+.set BO_dCTR_NZERO_1,17; .set BO_dCTR_ZERO,18; .set BO_dCTR_ZERO_1,19
+.set BO_ALWAYS,20; .set BO_ALWAYS_1,21; .set BO_ALWAYS_2,22
+.set BO_ALWAYS_3,23; .set BO_dCTR_NZERO_8,24; .set BO_dCTR_NZERO_9,25
+.set BO_dCTR_ZERO_8,26; .set BO_dCTR_ZERO_9,27; .set BO_ALWAYS_8,28
+.set BO_ALWAYS_9,29; .set BO_ALWAYS_10,30; .set BO_ALWAYS_11,31
+.set CR0_LT,0; .set CR0_GT,1; .set CR0_EQ,2; .set CR0_SO,3
+.set CR1_FX,4; .set CR1_FEX,5; .set CR1_VX,6; .set CR1_OX,7
+.set CR2_LT,8; .set CR2_GT,9; .set CR2_EQ,10; .set CR2_SO,11
+.set CR3_LT,12; .set CR3_GT,13; .set CR3_EQ,14; .set CR3_SO,15
+.set CR4_LT,16; .set CR4_GT,17; .set CR4_EQ,18; .set CR4_SO,19
+.set CR5_LT,20; .set CR5_GT,21; .set CR5_EQ,22; .set CR5_SO,23
+.set CR6_LT,24; .set CR6_GT,25; .set CR6_EQ,26; .set CR6_SO,27
+.set CR7_LT,28; .set CR7_GT,29; .set CR7_EQ,30; .set CR7_SO,31
+.set TO_LT,16; .set TO_GT,8; .set TO_EQ,4; .set TO_LLT,2; .set TO_LGT,1
+
+	.rename	H.19.NO_SYMBOL{PR},""
+	.rename	H.51.ppc_get_toc{TC},"ppc_get_toc"
+	.rename	H.55.ppc_sync{TC},"ppc_sync"
+	.rename	H.59.ppc_dcbf{TC},"ppc_dcbf"
+
+	.lglobl	H.19.NO_SYMBOL{PR}      
+	.globl	.ppc_get_toc            
+	.globl	.ppc_sync               
+	.globl	.ppc_dcbf               
+	.globl	ppc_get_toc{DS}         
+	.globl	ppc_sync{DS}            
+	.globl	ppc_dcbf{DS}            
+
+
+# .text section
+	.file	"sync-cache-factored.c" 
+	.stabx	"__default_char:t18=-5",0x00,0x8c,0x0
+	.stabx	":t2=-2",0x00,0x8c,0x0
+	.stabx	":t1=-11",0x00,0x8c,0x0
+	.stabx	":t3=*-2",0x00,0x8c,0x0
+	.stabx	":t4=f-11;",0x00,0x8c,0x0
+	.stabx	":t5=f-11;",0x00,0x8c,0x0
+	.stabx	":t6=*-11",0x00,0x8c,0x0
+	.stabx	":t7=f6;",0x00,0x8c,0x0
+	.stabx	":t19=Z",0x00,0x8c,0x0
+
+
+	.csect	H.19.NO_SYMBOL{PR}      
+.ppc_get_toc:                           # 0x00000000 (H.19.NO_SYMBOL)
+	.stabx	"ppc_get_toc:F6",0x00,0x8e,0x0
+	.function .ppc_get_toc,.ppc_get_toc,2,0
+	stu	SP,-80(SP)
+	.bf	26
+	.stabx	"x:6",0x040,0x81,0x0
+	.line	1
+	st	RTOC,64(SP)
+	.line	2
+	l	r3,64(SP)
+	st	r3,68(SP)
+	b	__L1c
+	.line	3
+__L1c:                                  # 0x0000001c (H.19.NO_SYMBOL+0x1c)
+	cal	SP,80(SP)
+	bcr	BO_ALWAYS,CR0_LT
+	.ef	28
+	.long	0x00000000
+# traceback table
+	.byte	0x00			# VERSION=0
+	.byte	0x00			# LANG=TB_C
+	.byte	0x20			# IS_GL=0,IS_EPROL=0,HAS_TBOFF=1
+					# INT_PROC=0,HAS_CTL=0,TOCLESS=0
+					# FP_PRESENT=0,LOG_ABORT=0
+	.byte	0x40			# INT_HNDL=0,NAME_PRESENT=1
+					# USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND
+					# SAVES_CR=0,SAVES_LR=0
+	.byte	0x80			# STORES_BC=1,FPR_SAVED=0
+	.byte	0x00			# GPR_SAVED=0
+	.byte	0x00			# FIXEDPARMS=0
+	.byte	0x01			# FLOATPARMS=0,PARMSONSTK=1
+	.long	0x00000024		# TB_OFFSET
+	.short	11			# NAME_LEN
+	.byte	"ppc_get_toc"
+	.byte	0			# padding
+	.byte	0			# padding
+	.byte	0			# padding
+# End of traceback table
+.ppc_sync:                              # 0x00000044 (H.19.NO_SYMBOL+0x44)
+	.stabx	"ppc_sync:F-11",0x044,0x8e,0x0
+	.function .ppc_sync,.ppc_sync,2,0
+	.bf	17
+	.line	1
+	dcs
+	bcr	BO_ALWAYS,CR0_LT
+	.ef	21
+	.long	0x00000000
+# traceback table
+	.byte	0x00			# VERSION=0
+	.byte	0x00			# LANG=TB_C
+	.byte	0x20			# IS_GL=0,IS_EPROL=0,HAS_TBOFF=1
+					# INT_PROC=0,HAS_CTL=0,TOCLESS=0
+					# FP_PRESENT=0,LOG_ABORT=0
+	.byte	0x40			# INT_HNDL=0,NAME_PRESENT=1
+					# USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND
+					# SAVES_CR=0,SAVES_LR=0
+	.byte	0x00			# STORES_BC=0,FPR_SAVED=0
+	.byte	0x00			# GPR_SAVED=0
+	.byte	0x00			# FIXEDPARMS=0
+	.byte	0x01			# FLOATPARMS=0,PARMSONSTK=1
+	.long	0x00000010		# TB_OFFSET
+	.short	8			# NAME_LEN
+	.byte	"ppc_sync"
+	.byte	0			# padding
+	.byte	0			# padding
+# End of traceback table
+.ppc_dcbf:                              # 0x00000070 (H.19.NO_SYMBOL+0x70)
+	.stabx	"ppc_dcbf:F-11",0x070,0x8e,0x0
+	.function .ppc_dcbf,.ppc_dcbf,2,0
+	.bf	4
+	.stabx	"_sync:p3",0x058,0x82,0x0
+	.line	1
+    stm 30,-8(1) # *(r1-8)=(r30,r31)
+    stu 1,-48(1) # *(r1-48)=r1, r1-=48
+    mr 30,1 # r30=r1=r1.orig-48
+    st 3,72(30) # *(r30+72==r1.orig+24)=r3
+    l 0,72(30) # r0=*(r30+72)=r3
+    clf 0,0 # clear r3
+    l 1,0(1) # r1=r1
+    lmw 30,-8(1) # (r30,r31)=*(r1-8)
+	bcr	BO_ALWAYS,CR0_LT
+	.ef	12
+	.long	0x00000000
+# traceback table
+	.byte	0x00			# VERSION=0
+	.byte	0x00			# LANG=TB_C
+	.byte	0x20			# IS_GL=0,IS_EPROL=0,HAS_TBOFF=1
+					# INT_PROC=0,HAS_CTL=0,TOCLESS=0
+					# FP_PRESENT=0,LOG_ABORT=0
+	.byte	0x40			# INT_HNDL=0,NAME_PRESENT=1
+					# USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND
+					# SAVES_CR=0,SAVES_LR=0
+	.byte	0x80			# STORES_BC=1,FPR_SAVED=0
+	.byte	0x00			# GPR_SAVED=0
+	.byte	0x01			# FIXEDPARMS=1
+	.byte	0x01			# FLOATPARMS=0,PARMSONSTK=1
+	.long	0x00000000		# 
+	.long	0x0000001c		# TB_OFFSET
+	.short	8			# NAME_LEN
+	.byte	"ppc_dcbf"
+	.byte	0			# padding
+	.byte	0			# padding
+# End of traceback table
+	.long	0x00000000              # "\0\0\0\0"
+# End	csect	H.19.NO_SYMBOL{PR}
+
+# .data section
+
+
+	.toc	                        # 0x000000b0 
+T.51.ppc_get_toc:
+	.tc	H.51.ppc_get_toc{TC},ppc_get_toc{DS}
+T.55.ppc_sync:
+	.tc	H.55.ppc_sync{TC},ppc_sync{DS}
+T.59.ppc_dcbf:
+	.tc	H.59.ppc_dcbf{TC},ppc_dcbf{DS}
+
+
+	.csect	ppc_get_toc{DS}         
+	.long	.ppc_get_toc            # "\0\0\0\0"
+	.long	TOC{TC0}                # "\0\0\0\260"
+	.long	0x00000000              # "\0\0\0\0"
+# End	csect	ppc_get_toc{DS}
+
+
+	.csect	ppc_sync{DS}            
+	.long	.ppc_sync               # "\0\0\0D"
+	.long	TOC{TC0}                # "\0\0\0\260"
+	.long	0x00000000              # "\0\0\0\0"
+# End	csect	ppc_sync{DS}
+
+
+	.csect	ppc_dcbf{DS}            
+	.long	.ppc_dcbf               # "\0\0\0p"
+	.long	TOC{TC0}                # "\0\0\0\260"
+	.long	0x00000000              # "\0\0\0\0"
+# End	csect	ppc_dcbf{DS}
+
+
+
+# .bss section
