| 1 |
from rpython.jit.backend.test.runner_test import LLtypeBackendTest |
| 2 |
from rpython.jit.backend.zarch.runner import CPU_S390_64 |
| 3 |
from rpython.jit.tool.oparser import parse |
| 4 |
from rpython.jit.metainterp.history import (AbstractFailDescr, |
| 5 |
AbstractDescr, |
| 6 |
BasicFailDescr, BasicFinalDescr, |
| 7 |
JitCellToken, TargetToken, |
| 8 |
ConstInt, ConstPtr, |
| 9 |
Const, ConstFloat) |
| 10 |
from rpython.jit.metainterp.resoperation import InputArgInt, InputArgFloat |
| 11 |
from rpython.rtyper.lltypesystem import lltype |
| 12 |
from rpython.jit.metainterp.resoperation import ResOperation, rop |
| 13 |
import py |
| 14 |
|
| 15 |
class FakeStats(object): |
| 16 |
pass |
| 17 |
|
| 18 |
class TestZARCH(LLtypeBackendTest): |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
def get_cpu(self): |
| 23 |
cpu = CPU_S390_64(rtyper=None, stats=FakeStats()) |
| 24 |
cpu.setup_once() |
| 25 |
return cpu |
| 26 |
|
| 27 |
add_loop_instructions = "lg; lgr; larl; agr; cgfi; jge; j;$" |
| 28 |
bridge_loop_instructions = "lg; cgfi; jnl; lghi; " \ |
| 29 |
"(lgfi|iilf);( iihf;)? (lgfi|iilf);( iihf;)? stg; basr; larl; (lgfi|iilf);( iihf;)? br;$" |