| 1 |
import py |
| 2 |
from rpython.jit.backend.detect_cpu import getcpuclass |
| 3 |
from rpython.jit.backend.test.runner_test import LLtypeBackendTest,\ |
| 4 |
boxfloat, constfloat |
| 5 |
from rpython.jit.metainterp.history import BasicFailDescr, BasicFinalDescr |
| 6 |
from rpython.jit.metainterp.resoperation import (ResOperation, rop, |
| 7 |
InputArgInt) |
| 8 |
from rpython.jit.tool.oparser import parse |
| 9 |
from rpython.rtyper.lltypesystem import lltype, llmemory |
| 10 |
from rpython.rtyper import rclass |
| 11 |
from rpython.rtyper.annlowlevel import llhelper |
| 12 |
from rpython.jit.codewriter.effectinfo import EffectInfo |
| 13 |
from rpython.jit.metainterp.history import JitCellToken, TargetToken |
| 14 |
from rpython.jit.codewriter import longlong |
| 15 |
|
| 16 |
|
| 17 |
CPU = getcpuclass() |
| 18 |
|
| 19 |
class FakeStats(object): |
| 20 |
pass |
| 21 |
|
| 22 |
|
| 23 |
class TestARM64(LLtypeBackendTest): |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
add_loop_instructions = 'ldr; add; cmp; b.eq; b; brk;' |
| 29 |
bridge_loop_instructions = ('ldr; mov; nop; nop; nop; ' |
| 30 |
'cmp; b.ge; sub; str; mov; (movk; )*' |
| 31 |
'str; mov; (movk; )*blr; ' |
| 32 |
'mov; (movk; )*br; brk;') |
| 33 |
|
| 34 |
def get_cpu(self): |
| 35 |
cpu = CPU(rtyper=None, stats=FakeStats()) |
| 36 |
cpu.setup_once() |
| 37 |
return cpu |