Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r68767:681802e98b38
Date: 2014-01-19 13:05 -0600
http://bitbucket.org/pypy/pypy/changeset/681802e98b38/
Log: Removed an unused feature of the translater and some long unused PPC
assembler files
diff --git a/rpython/translator/c/extfunc.py b/rpython/translator/c/extfunc.py
--- a/rpython/translator/c/extfunc.py
+++ b/rpython/translator/c/extfunc.py
@@ -1,18 +1,10 @@
import types
+
from rpython.flowspace.model import FunctionGraph
-from rpython.rtyper.lltypesystem import lltype
+from rpython.rtyper.lltypesystem import lltype, rstr, rlist
+from rpython.rtyper.lltypesystem.rstr import STR, mallocstr
from rpython.translator.c.support import cdecl
-from rpython.rtyper.lltypesystem.rstr import STR, mallocstr
-from rpython.rtyper.lltypesystem import rstr
-from rpython.rtyper.lltypesystem import rlist
-# table of functions hand-written in src/ll_*.h
-# Note about *.im_func: The annotator and the rtyper expect direct
-# references to functions, so we cannot insert classmethods here.
-
-EXTERNALS = {'LL_flush_icache': 'LL_flush_icache'}
-
-#______________________________________________________
def find_list_of_str(rtyper):
for r in rtyper.reprs.itervalues():
@@ -80,14 +72,13 @@
return frags[0]
for func, funcobj in db.externalfuncs.items():
- c_name = EXTERNALS[func]
# construct a define LL_NEED_<modname> to make it possible to isolate
in-development externals and headers
- modname = module_name(c_name)
+ modname = module_name(func)
if modname not in modules:
modules[modname] = True
yield 'LL_NEED_%s' % modname.upper(), 1
funcptr = funcobj._as_ptr()
- yield c_name, funcptr
+ yield func, funcptr
def predeclare_exception_data(db, rtyper):
# Exception-related types and constants
diff --git a/rpython/translator/c/node.py b/rpython/translator/c/node.py
--- a/rpython/translator/c/node.py
+++ b/rpython/translator/c/node.py
@@ -916,15 +916,6 @@
return sandbox_stub(fnobj, db)
db.externalfuncs[fnobj._external_name] = fnobj
return []
- elif fnobj._callable in extfunc.EXTERNALS:
- # -- deprecated case --
- # 'fnobj' is one of the ll_xyz() functions with the suggested_primitive
- # flag in rpython.rtyper.module.*. The corresponding C wrappers are
- # written by hand in src/ll_*.h, and declared in extfunc.EXTERNALS.
- if sandbox and not fnobj._name.startswith('ll_stack_'): # XXX!!!
Temporary
- return sandbox_stub(fnobj, db)
- db.externalfuncs[fnobj._callable] = fnobj
- return []
elif hasattr(fnobj, 'graph'):
if sandbox and sandbox != "if_external":
# apply the sandbox transformation
diff --git a/rpython/translator/c/src/asm_ppc.c
b/rpython/translator/c/src/asm_ppc.c
deleted file mode 100644
--- a/rpython/translator/c/src/asm_ppc.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "src/asm_ppc.h"
-
-#define __dcbst(base, index) \
- __asm__ ("dcbst %0, %1" : /*no result*/ : "b%" (index), "r" (base) :
"memory")
-#define __icbi(base, index) \
- __asm__ ("icbi %0, %1" : /*no result*/ : "b%" (index), "r" (base) : "memory")
-#define __sync() __asm__ volatile ("sync")
-#define __isync() \
- __asm__ volatile ("isync")
-
-void
-LL_flush_icache(long base, long size)
-{
- long i;
-
- for (i = 0; i < size; i += 32){
- __dcbst(base, i);
- }
- __sync();
- for (i = 0; i < size; i += 32){
- __icbi(base, i);
- }
- __isync();
-}
diff --git a/rpython/translator/c/src/asm_ppc.h
b/rpython/translator/c/src/asm_ppc.h
deleted file mode 100644
--- a/rpython/translator/c/src/asm_ppc.h
+++ /dev/null
@@ -1,1 +0,0 @@
-void LL_flush_icache(long base, long size);
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit