18 lines
544 B
ArmAsm
18 lines
544 B
ArmAsm
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
|||
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
||
|
|
|
||
|
|
// movwfp exercises MOVW $c, Fd, the immediate-to-F-register form the
|
||
|
|
// toolchain's optab accepts: the constant is materialised in R30 (ori for
|
||
|
|
// the positive span, addi.w for the negative span) and moved across with
|
||
|
|
// movgr2fr.w. Byte-parity-checked against go tool asm.
|
||
|
|
|
||
|
|
#include "textflag.h"
|
||
|
|
|
||
|
|
TEXT ·movwfp(SB), NOSPLIT, $0
|
||
|
|
MOVW $1, F0
|
||
|
|
MOVW $0x2, F4
|
||
|
|
MOVW $0x7ff, F8
|
||
|
|
MOVW $-1, F12
|
||
|
|
MOVW $-2048, F16
|
||
|
|
RET
|