cb8abc3ae5
72f7ccd94 oaknut: 1.1.3 0b5745e4e oaknut: Add Windows on Arm support (#1) 5de40335d oaknut: 1.1.2 2952b759f oaknut: Correct MOV (UMOV alias) c90eb31ca oaknut: 1.1.1 7c777a28f oaknut: Fix ADR and ADRP 7470c7611 oaknut: Add ARMv8.2 instructions 9eb7cca88 oaknut: Update README 3fe32849a oaknut: 1.1.0 542128b51 oaknut: Add ARMv8.1 instructions 9acafdcdd oaknut: fpsimd MOV and UMOV corrections 636f91bac oaknut: MOV: Fix MOVN case 9cb332621 oaknut: Implement arranged accessors from DReg and QReg ba2dc2afe oaknut: dx 94bf56b08 oaknut: align aa7a3519f oaknut: Add dw 898f666ec oaknut: Add common system registers git-subtree-dir: externals/oaknut git-subtree-split: 72f7ccd9409dadf6a4ab98bad1fb11fbf0ca4d74
23 lines
733 B
C++
23 lines
733 B
C++
// SPDX-FileCopyrightText: Copyright (c) 2022 merryhime <https://mary.rs>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
void BFC(WReg wd, Imm<5> lsb, Imm<5> width)
|
|
{
|
|
if (width.value() == 0 || width.value() > (32 - lsb.value()))
|
|
throw "invalid width";
|
|
emit<"0011001100rrrrrrssssss11111ddddd", "d", "r", "s">(wd, (-lsb.value()) & 31, width.value() - 1);
|
|
}
|
|
void BFC(XReg xd, Imm<6> lsb, Imm<6> width)
|
|
{
|
|
if (width.value() == 0 || width.value() > (64 - lsb.value()))
|
|
throw "invalid width";
|
|
emit<"1011001101rrrrrrssssss11111ddddd", "d", "r", "s">(xd, (-lsb.value()) & 63, width.value() - 1);
|
|
}
|
|
void ESB()
|
|
{
|
|
emit<"11010101000000110010001000011111">();
|
|
}
|
|
void PSB()
|
|
{
|
|
emit<"11010101000000110010001000111111">();
|
|
}
|