# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
from itertools import cycle
Import('*')
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
import os
import sys
import re
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
from micro_asm import MicroAssembler, Combinational_Macroop, Rom_Macroop, Rom
class Bah(object):
let {{
- import six
-
# Make these empty strings so that concatenating onto
# them will always work.
header_output = ""
return cls
- @six.add_metaclass(FpOpMeta)
- class FpUnaryOp(X86Microop):
+ class FpUnaryOp(X86Microop, metaclass=FpOpMeta):
# This class itself doesn't act as a microop
abstract = True
"dataSize" : self.dataSize,
"spm" : self.spm}
- @six.add_metaclass(FpOpMeta)
- class FpBinaryOp(X86Microop):
+ class FpBinaryOp(X86Microop, metaclass=FpOpMeta):
# This class itself doesn't act as a microop
abstract = True
}};
let {{
- import six
- if six.PY3:
- long = int
-
class LimmOp(X86Microop):
def __init__(self, dest, imm, dataSize="env.dataSize"):
self.className = "Limm"
self.mnemonic = "limm"
self.dest = dest
- if isinstance(imm, (int, long)):
+ if isinstance(imm, int):
imm = "ULL(%d)" % imm
self.imm = imm
self.dataSize = dataSize
self.className = "Lfpimm"
self.mnemonic = "lfpimm"
self.dest = dest
- if isinstance(imm, (int, long)):
+ if isinstance(imm, int):
imm = "ULL(%d)" % imm
elif isinstance(imm, float):
imm = "floatToBits64(%.16f)" % imm
return cls
- @six.add_metaclass(MediaOpMeta)
- class MediaOp(X86Microop):
+ class MediaOp(X86Microop, metaclass=MediaOpMeta):
# This class itself doesn't act as a microop
abstract = True
return cls
- @six.add_metaclass(RegOpMeta)
- class RegOp(X86Microop):
+ class RegOp(X86Microop, metaclass=RegOpMeta):
# This class itself doesn't act as a microop
abstract = True
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
import sys
from m5.SimObject import *
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
from m5.defines import buildEnv
from m5.params import *
from m5.proxy import *
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
from m5.defines import buildEnv
from m5.params import *
from m5.proxy import *
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
from m5.defines import buildEnv
from m5.params import *
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from six import string_types
-
from m5.SimObject import *
from m5.params import *
for prio in self._requestor_priorities:
request_port = prio[0]
priority = prio[1]
- if isinstance(request_port, string_types):
+ if isinstance(request_port, str):
self.getCCObject().initRequestorName(
request_port, int(priority))
else:
for prio in self._requestor_scores:
request_port = prio[0]
score = prio[1]
- if isinstance(request_port, string_types):
+ if isinstance(request_port, str):
self.getCCObject().initRequestorName(
request_port, float(score))
else:
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
import os
import sys
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-from six import string_types
-
import os
import sys
class Location(object):
def __init__(self, filename, lineno, no_warning=False):
- if not isinstance(filename, string_types):
+ if not isinstance(filename, str):
raise AttributeError(
"filename must be a string, found {}".format(type(filename)))
if not isinstance(lineno, int):
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
import argparse
import m5
import os
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
import argparse
import collections
import difflib
import os
import re
import subprocess
-import six
import sys
script_path = os.path.abspath(inspect.getfile(inspect.currentframe()))
super(TestPhaseMeta, cls).__init__(name, bases, d)
-@six.add_metaclass(TestPhaseMeta)
-class TestPhaseBase(object):
+class TestPhaseBase(object, metaclass=TestPhaseMeta):
abstract = True
def __init__(self, main_args, *args):
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
import getopt, os, os.path, sys
from os.path import join as joinpath, realpath