| 1 |
import py |
| 2 |
|
| 3 |
from rpython.rlib import rmmap |
| 4 |
from rpython.rtyper.annlowlevel import llhelper |
| 5 |
from rpython.jit.metainterp.history import JitCellToken |
| 6 |
from rpython.jit.backend.test.calling_convention_test import CallingConvTests, parse |
| 7 |
from rpython.rtyper.lltypesystem import lltype |
| 8 |
from rpython.jit.codewriter.effectinfo import EffectInfo |
| 9 |
|
| 10 |
from rpython.jit.backend.aarch64.codebuilder import InstrBuilder |
| 11 |
from rpython.jit.backend.aarch64 import registers as r |
| 12 |
from rpython.jit.backend.aarch64.test.test_runner import boxfloat, constfloat |
| 13 |
from rpython.jit.metainterp.resoperation import rop, InputArgInt, InputArgFloat |
| 14 |
from rpython.jit.metainterp.history import JitCellToken |
| 15 |
|
| 16 |
boxint = InputArgInt |
| 17 |
boxfloat = InputArgFloat.fromfloat |
| 18 |
|
| 19 |
class TestARMCallingConvention(CallingConvTests): |
| 20 |
|
| 21 |
|
| 22 |
def make_function_returning_stack_pointer(self): |
| 23 |
rmmap.enter_assembler_writing() |
| 24 |
try: |
| 25 |
mc = InstrBuilder() |
| 26 |
mc.MOV_rr(r.x0.value, r.sp.value) |
| 27 |
mc.RET_r(r.lr.value) |
| 28 |
return mc.materialize(self.cpu, []) |
| 29 |
finally: |
| 30 |
rmmap.leave_assembler_writing() |
| 31 |
|
| 32 |
def get_alignment_requirements(self): |
| 33 |
return 16 |