Files

29 lines
688 B
ArmAsm

// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
// SPDX-License-Identifier: BSD-3-Clause
// Wide MOV immediates that expand past one instruction, each followed by a
// branch to a later label: the displacement is what the two passes must agree
// on, so a size pass that disagrees with the encoder corrupts the branch.
// Byte-parity-checked against go tool asm.
#include "textflag.h"
TEXT ·movimm2(SB), NOSPLIT, $0-24
MOVW $-1, R0
B after1
MOVD $0x0001000200030004, R1
B after2
MOVD $0x0001000200030000, R2
B after3
MOVW $0xFFFFFFFF, R3
after1:
MOVD R0, r0+0(FP)
after2:
MOVD R1, r1+8(FP)
after3:
MOVD R2, r2+16(FP)
RET