| 1 |
// Copyright 2015, VIXL authors |
| 2 |
// All rights reserved. |
| 3 |
// |
| 4 |
// Redistribution and use in source and binary forms, with or without |
| 5 |
// modification, are permitted provided that the following conditions are met: |
| 6 |
// |
| 7 |
// * Redistributions of source code must retain the above copyright notice, |
| 8 |
// this list of conditions and the following disclaimer. |
| 9 |
// * Redistributions in binary form must reproduce the above copyright notice, |
| 10 |
// this list of conditions and the following disclaimer in the documentation |
| 11 |
// and/or other materials provided with the distribution. |
| 12 |
// * Neither the name of ARM Limited nor the names of its contributors may be |
| 13 |
// used to endorse or promote products derived from this software without |
| 14 |
// specific prior written permission. |
| 15 |
// |
| 16 |
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND |
| 17 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 18 |
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 19 |
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE |
| 20 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 21 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 22 |
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 23 |
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 24 |
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 |
|
| 27 |
#ifndef VIXL_A64_ASSEMBLER_A64_H_ |
| 28 |
#define VIXL_A64_ASSEMBLER_A64_H_ |
| 29 |
|
| 30 |
#include "jit/arm64/vixl/Cpu-vixl.h" |
| 31 |
#include "jit/arm64/vixl/Globals-vixl.h" |
| 32 |
#include "jit/arm64/vixl/Instructions-vixl.h" |
| 33 |
#include "jit/arm64/vixl/MozBaseAssembler-vixl.h" |
| 34 |
#include "jit/arm64/vixl/Utils-vixl.h" |
| 35 |
|
| 36 |
#include "jit/JitSpewer.h" |
| 37 |
|
| 38 |
#include "jit/shared/Assembler-shared.h" |
| 39 |
#include "jit/shared/Disassembler-shared.h" |
| 40 |
#include "jit/shared/IonAssemblerBufferWithConstantPools.h" |
| 41 |
|
| 42 |
#if defined(_M_ARM64) |
| 43 |
#ifdef mvn |
| 44 |
#undef mvn |
| 45 |
#endif |
| 46 |
#endif |
| 47 |
|
| 48 |
namespace vixl { |
| 49 |
|
| 50 |
using js::jit::BufferOffset; |
| 51 |
using js::jit::Label; |
| 52 |
using js::jit::Address; |
| 53 |
using js::jit::BaseIndex; |
| 54 |
using js::jit::DisassemblerSpew; |
| 55 |
|
| 56 |
using LabelDoc = DisassemblerSpew::LabelDoc; |
| 57 |
|
| 58 |
typedef uint64_t RegList; |
| 59 |
static const int kRegListSizeInBits = sizeof(RegList) * 8; |
| 60 |
|
| 61 |
|
| 62 |
// Registers. |
| 63 |
|
| 64 |
// Some CPURegister methods can return Register or VRegister types, so we need |
| 65 |
// to declare them in advance. |
| 66 |
class Register; |
| 67 |
class VRegister; |
| 68 |
|
| 69 |
class CPURegister { |
| 70 |
public: |
| 71 |
enum RegisterType { |
| 72 |
// The kInvalid value is used to detect uninitialized static instances, |
| 73 |
// which are always zero-initialized before any constructors are called. |
| 74 |
kInvalid = 0, |
| 75 |
kRegister, |
| 76 |
kVRegister, |
| 77 |
kFPRegister = kVRegister, |
| 78 |
kNoRegister |
| 79 |
}; |
| 80 |
|
| 81 |
constexpr CPURegister() : code_(0), size_(0), type_(kNoRegister) { |
| 82 |
} |
| 83 |
|
| 84 |
constexpr CPURegister(unsigned code, unsigned size, RegisterType type) |
| 85 |
: code_(code), size_(size), type_(type) { |
| 86 |
} |
| 87 |
|
| 88 |
unsigned code() const { |
| 89 |
VIXL_ASSERT(IsValid()); |
| 90 |
return code_; |
| 91 |
} |
| 92 |
|
| 93 |
RegisterType type() const { |
| 94 |
VIXL_ASSERT(IsValidOrNone()); |
| 95 |
return type_; |
| 96 |
} |
| 97 |
|
| 98 |
RegList Bit() const { |
| 99 |
VIXL_ASSERT(code_ < (sizeof(RegList) * 8)); |
| 100 |
return IsValid() ? (static_cast<RegList>(1) << code_) : 0; |
| 101 |
} |
| 102 |
|
| 103 |
unsigned size() const { |
| 104 |
VIXL_ASSERT(IsValid()); |
| 105 |
return size_; |
| 106 |
} |
| 107 |
|
| 108 |
int SizeInBytes() const { |
| 109 |
VIXL_ASSERT(IsValid()); |
| 110 |
VIXL_ASSERT(size() % 8 == 0); |
| 111 |
return size_ / 8; |
| 112 |
} |
| 113 |
|
| 114 |
int SizeInBits() const { |
| 115 |
VIXL_ASSERT(IsValid()); |
| 116 |
return size_; |
| 117 |
} |
| 118 |
|
| 119 |
bool Is8Bits() const { |
| 120 |
VIXL_ASSERT(IsValid()); |
| 121 |
return size_ == 8; |
| 122 |
} |
| 123 |
|
| 124 |
bool Is16Bits() const { |
| 125 |
VIXL_ASSERT(IsValid()); |
| 126 |
return size_ == 16; |
| 127 |
} |
| 128 |
|
| 129 |
bool Is32Bits() const { |
| 130 |
VIXL_ASSERT(IsValid()); |
| 131 |
return size_ == 32; |
| 132 |
} |
| 133 |
|
| 134 |
bool Is64Bits() const { |
| 135 |
VIXL_ASSERT(IsValid()); |
| 136 |
return size_ == 64; |
| 137 |
} |
| 138 |
|
| 139 |
bool Is128Bits() const { |
| 140 |
VIXL_ASSERT(IsValid()); |
| 141 |
return size_ == 128; |
| 142 |
} |
| 143 |
|
| 144 |
bool IsValid() const { |
| 145 |
if (IsValidRegister() || IsValidVRegister()) { |
| 146 |
VIXL_ASSERT(!IsNone()); |
| 147 |
return true; |
| 148 |
} else { |
| 149 |
// This assert is hit when the register has not been properly initialized. |
| 150 |
// One cause for this can be an initialisation order fiasco. See |
| 151 |
// https://isocpp.org/wiki/faq/ctors#static-init-order for some details. |
| 152 |
VIXL_ASSERT(IsNone()); |
| 153 |
return false; |
| 154 |
} |
| 155 |
} |
| 156 |
|
| 157 |
bool IsValidRegister() const { |
| 158 |
return IsRegister() && |
| 159 |
((size_ == kWRegSize) || (size_ == kXRegSize)) && |
| 160 |
((code_ < kNumberOfRegisters) || (code_ == kSPRegInternalCode)); |
| 161 |
} |
| 162 |
|
| 163 |
bool IsValidVRegister() const { |
| 164 |
return IsVRegister() && |
| 165 |
((size_ == kBRegSize) || (size_ == kHRegSize) || |
| 166 |
(size_ == kSRegSize) || (size_ == kDRegSize) || |
| 167 |
(size_ == kQRegSize)) && |
| 168 |
(code_ < kNumberOfVRegisters); |
| 169 |
} |
| 170 |
|
| 171 |
bool IsValidFPRegister() const { |
| 172 |
return IsFPRegister() && (code_ < kNumberOfVRegisters); |
| 173 |
} |
| 174 |
|
| 175 |
bool IsNone() const { |
| 176 |
// kNoRegister types should always have size 0 and code 0. |
| 177 |
VIXL_ASSERT((type_ != kNoRegister) || (code_ == 0)); |
| 178 |
VIXL_ASSERT((type_ != kNoRegister) || (size_ == 0)); |
| 179 |
|
| 180 |
return type_ == kNoRegister; |
| 181 |
} |
| 182 |
|
| 183 |
bool Aliases(const CPURegister& other) const { |
| 184 |
VIXL_ASSERT(IsValidOrNone() && other.IsValidOrNone()); |
| 185 |
return (code_ == other.code_) && (type_ == other.type_); |
| 186 |
} |
| 187 |
|
| 188 |
bool Is(const CPURegister& other) const { |
| 189 |
VIXL_ASSERT(IsValidOrNone() && other.IsValidOrNone()); |
| 190 |
return Aliases(other) && (size_ == other.size_); |
| 191 |
} |
| 192 |
|
| 193 |
bool IsZero() const { |
| 194 |
VIXL_ASSERT(IsValid()); |
| 195 |
return IsRegister() && (code_ == kZeroRegCode); |
| 196 |
} |
| 197 |
|
| 198 |
bool IsSP() const { |
| 199 |
VIXL_ASSERT(IsValid()); |
| 200 |
return IsRegister() && (code_ == kSPRegInternalCode); |
| 201 |
} |
| 202 |
|
| 203 |
bool IsRegister() const { |
| 204 |
return type_ == kRegister; |
| 205 |
} |
| 206 |
|
| 207 |
bool IsVRegister() const { |
| 208 |
return type_ == kVRegister; |
| 209 |
} |
| 210 |
|
| 211 |
bool IsFPRegister() const { |
| 212 |
return IsS() || IsD(); |
| 213 |
} |
| 214 |
|
| 215 |
bool IsW() const { return IsValidRegister() && Is32Bits(); } |
| 216 |
bool IsX() const { return IsValidRegister() && Is64Bits(); } |
| 217 |
|
| 218 |
// These assertions ensure that the size and type of the register are as |
| 219 |
// described. They do not consider the number of lanes that make up a vector. |
| 220 |
// So, for example, Is8B() implies IsD(), and Is1D() implies IsD, but IsD() |
| 221 |
// does not imply Is1D() or Is8B(). |
| 222 |
// Check the number of lanes, ie. the format of the vector, using methods such |
| 223 |
// as Is8B(), Is1D(), etc. in the VRegister class. |
| 224 |
bool IsV() const { return IsVRegister(); } |
| 225 |
bool IsB() const { return IsV() && Is8Bits(); } |
| 226 |
bool IsH() const { return IsV() && Is16Bits(); } |
| 227 |
bool IsS() const { return IsV() && Is32Bits(); } |
| 228 |
bool IsD() const { return IsV() && Is64Bits(); } |
| 229 |
bool IsQ() const { return IsV() && Is128Bits(); } |
| 230 |
|
| 231 |
const Register& W() const; |
| 232 |
const Register& X() const; |
| 233 |
const VRegister& V() const; |
| 234 |
const VRegister& B() const; |
| 235 |
const VRegister& H() const; |
| 236 |
const VRegister& S() const; |
| 237 |
const VRegister& D() const; |
| 238 |
const VRegister& Q() const; |
| 239 |
|
| 240 |
bool IsSameSizeAndType(const CPURegister& other) const { |
| 241 |
return (size_ == other.size_) && (type_ == other.type_); |
| 242 |
} |
| 243 |
|
| 244 |
protected: |
| 245 |
unsigned code_; |
| 246 |
unsigned size_; |
| 247 |
RegisterType type_; |
| 248 |
|
| 249 |
private: |
| 250 |
bool IsValidOrNone() const { |
| 251 |
return IsValid() || IsNone(); |
| 252 |
} |
| 253 |
}; |
| 254 |
|
| 255 |
|
| 256 |
class Register : public CPURegister { |
| 257 |
public: |
| 258 |
Register() : CPURegister() {} |
| 259 |
explicit Register(const CPURegister& other) |
| 260 |
: CPURegister(other.code(), other.size(), other.type()) { |
| 261 |
VIXL_ASSERT(IsValidRegister()); |
| 262 |
} |
| 263 |
constexpr Register(unsigned code, unsigned size) |
| 264 |
: CPURegister(code, size, kRegister) {} |
| 265 |
|
| 266 |
constexpr Register(js::jit::Register r, unsigned size) |
| 267 |
: CPURegister(r.code(), size, kRegister) {} |
| 268 |
|
| 269 |
bool IsValid() const { |
| 270 |
VIXL_ASSERT(IsRegister() || IsNone()); |
| 271 |
return IsValidRegister(); |
| 272 |
} |
| 273 |
|
| 274 |
js::jit::Register asUnsized() const { |
| 275 |
// asUnsized() is only ever used on temp registers or on registers that |
| 276 |
// are known not to be SP, and there should be no risk of it being |
| 277 |
// applied to SP. Check anyway. |
| 278 |
VIXL_ASSERT(code_ != kSPRegInternalCode); |
| 279 |
return js::jit::Register::FromCode((js::jit::Register::Code)code_); |
| 280 |
} |
| 281 |
|
| 282 |
|
| 283 |
static const Register& WRegFromCode(unsigned code); |
| 284 |
static const Register& XRegFromCode(unsigned code); |
| 285 |
|
| 286 |
private: |
| 287 |
static const Register wregisters[]; |
| 288 |
static const Register xregisters[]; |
| 289 |
}; |
| 290 |
|
| 291 |
|
| 292 |
class VRegister : public CPURegister { |
| 293 |
public: |
| 294 |
VRegister() : CPURegister(), lanes_(1) {} |
| 295 |
explicit VRegister(const CPURegister& other) |
| 296 |
: CPURegister(other.code(), other.size(), other.type()), lanes_(1) { |
| 297 |
VIXL_ASSERT(IsValidVRegister()); |
| 298 |
VIXL_ASSERT(IsPowerOf2(lanes_) && (lanes_ <= 16)); |
| 299 |
} |
| 300 |
constexpr VRegister(unsigned code, unsigned size, unsigned lanes = 1) |
| 301 |
: CPURegister(code, size, kVRegister), lanes_(lanes) { |
| 302 |
// VIXL_ASSERT(IsPowerOf2(lanes_) && (lanes_ <= 16)); |
| 303 |
} |
| 304 |
constexpr VRegister(js::jit::FloatRegister r) |
| 305 |
: CPURegister(r.encoding(), r.size() * 8, kVRegister), lanes_(1) { |
| 306 |
} |
| 307 |
constexpr VRegister(js::jit::FloatRegister r, unsigned size) |
| 308 |
: CPURegister(r.encoding(), size, kVRegister), lanes_(1) { |
| 309 |
} |
| 310 |
VRegister(unsigned code, VectorFormat format) |
| 311 |
: CPURegister(code, RegisterSizeInBitsFromFormat(format), kVRegister), |
| 312 |
lanes_(IsVectorFormat(format) ? LaneCountFromFormat(format) : 1) { |
| 313 |
VIXL_ASSERT(IsPowerOf2(lanes_) && (lanes_ <= 16)); |
| 314 |
} |
| 315 |
|
| 316 |
bool IsValid() const { |
| 317 |
VIXL_ASSERT(IsVRegister() || IsNone()); |
| 318 |
return IsValidVRegister(); |
| 319 |
} |
| 320 |
|
| 321 |
static const VRegister& BRegFromCode(unsigned code); |
| 322 |
static const VRegister& HRegFromCode(unsigned code); |
| 323 |
static const VRegister& SRegFromCode(unsigned code); |
| 324 |
static const VRegister& DRegFromCode(unsigned code); |
| 325 |
static const VRegister& QRegFromCode(unsigned code); |
| 326 |
static const VRegister& VRegFromCode(unsigned code); |
| 327 |
|
| 328 |
VRegister V8B() const { return VRegister(code_, kDRegSize, 8); } |
| 329 |
VRegister V16B() const { return VRegister(code_, kQRegSize, 16); } |
| 330 |
VRegister V4H() const { return VRegister(code_, kDRegSize, 4); } |
| 331 |
VRegister V8H() const { return VRegister(code_, kQRegSize, 8); } |
| 332 |
VRegister V2S() const { return VRegister(code_, kDRegSize, 2); } |
| 333 |
VRegister V4S() const { return VRegister(code_, kQRegSize, 4); } |
| 334 |
VRegister V2D() const { return VRegister(code_, kQRegSize, 2); } |
| 335 |
VRegister V1D() const { return VRegister(code_, kDRegSize, 1); } |
| 336 |
|
| 337 |
bool Is8B() const { return (Is64Bits() && (lanes_ == 8)); } |
| 338 |
bool Is16B() const { return (Is128Bits() && (lanes_ == 16)); } |
| 339 |
bool Is4H() const { return (Is64Bits() && (lanes_ == 4)); } |
| 340 |
bool Is8H() const { return (Is128Bits() && (lanes_ == 8)); } |
| 341 |
bool Is2S() const { return (Is64Bits() && (lanes_ == 2)); } |
| 342 |
bool Is4S() const { return (Is128Bits() && (lanes_ == 4)); } |
| 343 |
bool Is1D() const { return (Is64Bits() && (lanes_ == 1)); } |
| 344 |
bool Is2D() const { return (Is128Bits() && (lanes_ == 2)); } |
| 345 |
|
| 346 |
// For consistency, we assert the number of lanes of these scalar registers, |
| 347 |
// even though there are no vectors of equivalent total size with which they |
| 348 |
// could alias. |
| 349 |
bool Is1B() const { |
| 350 |
VIXL_ASSERT(!(Is8Bits() && IsVector())); |
| 351 |
return Is8Bits(); |
| 352 |
} |
| 353 |
bool Is1H() const { |
| 354 |
VIXL_ASSERT(!(Is16Bits() && IsVector())); |
| 355 |
return Is16Bits(); |
| 356 |
} |
| 357 |
bool Is1S() const { |
| 358 |
VIXL_ASSERT(!(Is32Bits() && IsVector())); |
| 359 |
return Is32Bits(); |
| 360 |
} |
| 361 |
|
| 362 |
bool IsLaneSizeB() const { return LaneSizeInBits() == kBRegSize; } |
| 363 |
bool IsLaneSizeH() const { return LaneSizeInBits() == kHRegSize; } |
| 364 |
bool IsLaneSizeS() const { return LaneSizeInBits() == kSRegSize; } |
| 365 |
bool IsLaneSizeD() const { return LaneSizeInBits() == kDRegSize; } |
| 366 |
|
| 367 |
int lanes() const { |
| 368 |
return lanes_; |
| 369 |
} |
| 370 |
|
| 371 |
bool IsScalar() const { |
| 372 |
return lanes_ == 1; |
| 373 |
} |
| 374 |
|
| 375 |
bool IsVector() const { |
| 376 |
return lanes_ > 1; |
| 377 |
} |
| 378 |
|
| 379 |
bool IsSameFormat(const VRegister& other) const { |
| 380 |
return (size_ == other.size_) && (lanes_ == other.lanes_); |
| 381 |
} |
| 382 |
|
| 383 |
unsigned LaneSizeInBytes() const { |
| 384 |
return SizeInBytes() / lanes_; |
| 385 |
} |
| 386 |
|
| 387 |
unsigned LaneSizeInBits() const { |
| 388 |
return LaneSizeInBytes() * 8; |
| 389 |
} |
| 390 |
|
| 391 |
private: |
| 392 |
static const VRegister bregisters[]; |
| 393 |
static const VRegister hregisters[]; |
| 394 |
static const VRegister sregisters[]; |
| 395 |
static const VRegister dregisters[]; |
| 396 |
static const VRegister qregisters[]; |
| 397 |
static const VRegister vregisters[]; |
| 398 |
int lanes_; |
| 399 |
}; |
| 400 |
|
| 401 |
|
| 402 |
// Backward compatibility for FPRegisters. |
| 403 |
typedef VRegister FPRegister; |
| 404 |
|
| 405 |
// No*Reg is used to indicate an unused argument, or an error case. Note that |
| 406 |
// these all compare equal (using the Is() method). The Register and VRegister |
| 407 |
// variants are provided for convenience. |
| 408 |
const Register NoReg; |
| 409 |
const VRegister NoVReg; |
| 410 |
const FPRegister NoFPReg; // For backward compatibility. |
| 411 |
const CPURegister NoCPUReg; |
| 412 |
|
| 413 |
|
| 414 |
#define DEFINE_REGISTERS(N) \ |
| 415 |
constexpr Register w##N(N, kWRegSize); \ |
| 416 |
constexpr Register x##N(N, kXRegSize); |
| 417 |
REGISTER_CODE_LIST(DEFINE_REGISTERS) |
| 418 |
#undef DEFINE_REGISTERS |
| 419 |
constexpr Register wsp(kSPRegInternalCode, kWRegSize); |
| 420 |
constexpr Register sp(kSPRegInternalCode, kXRegSize); |
| 421 |
|
| 422 |
|
| 423 |
#define DEFINE_VREGISTERS(N) \ |
| 424 |
constexpr VRegister b##N(N, kBRegSize); \ |
| 425 |
constexpr VRegister h##N(N, kHRegSize); \ |
| 426 |
constexpr VRegister s##N(N, kSRegSize); \ |
| 427 |
constexpr VRegister d##N(N, kDRegSize); \ |
| 428 |
constexpr VRegister q##N(N, kQRegSize); \ |
| 429 |
constexpr VRegister v##N(N, kQRegSize); |
| 430 |
REGISTER_CODE_LIST(DEFINE_VREGISTERS) |
| 431 |
#undef DEFINE_VREGISTERS |
| 432 |
|
| 433 |
|
| 434 |
// Registers aliases. |
| 435 |
constexpr Register ip0 = x16; |
| 436 |
constexpr Register ip1 = x17; |
| 437 |
constexpr Register lr = x30; |
| 438 |
constexpr Register xzr = x31; |
| 439 |
constexpr Register wzr = w31; |
| 440 |
|
| 441 |
|
| 442 |
// AreAliased returns true if any of the named registers overlap. Arguments |
| 443 |
// set to NoReg are ignored. The system stack pointer may be specified. |
| 444 |
bool AreAliased(const CPURegister& reg1, |
| 445 |
const CPURegister& reg2, |
| 446 |
const CPURegister& reg3 = NoReg, |
| 447 |
const CPURegister& reg4 = NoReg, |
| 448 |
const CPURegister& reg5 = NoReg, |
| 449 |
const CPURegister& reg6 = NoReg, |
| 450 |
const CPURegister& reg7 = NoReg, |
| 451 |
const CPURegister& reg8 = NoReg); |
| 452 |
|
| 453 |
|
| 454 |
// AreSameSizeAndType returns true if all of the specified registers have the |
| 455 |
// same size, and are of the same type. The system stack pointer may be |
| 456 |
// specified. Arguments set to NoReg are ignored, as are any subsequent |
| 457 |
// arguments. At least one argument (reg1) must be valid (not NoCPUReg). |
| 458 |
bool AreSameSizeAndType(const CPURegister& reg1, |
| 459 |
const CPURegister& reg2, |
| 460 |
const CPURegister& reg3 = NoCPUReg, |
| 461 |
const CPURegister& reg4 = NoCPUReg, |
| 462 |
const CPURegister& reg5 = NoCPUReg, |
| 463 |
const CPURegister& reg6 = NoCPUReg, |
| 464 |
const CPURegister& reg7 = NoCPUReg, |
| 465 |
const CPURegister& reg8 = NoCPUReg); |
| 466 |
|
| 467 |
// AreEven returns true if all of the specified registers have even register |
| 468 |
// indices. Arguments set to NoReg are ignored, as are any subsequent |
| 469 |
// arguments. At least one argument (reg1) must be valid (not NoCPUReg). |
| 470 |
bool AreEven(const CPURegister& reg1, |
| 471 |
const CPURegister& reg2, |
| 472 |
const CPURegister& reg3 = NoReg, |
| 473 |
const CPURegister& reg4 = NoReg, |
| 474 |
const CPURegister& reg5 = NoReg, |
| 475 |
const CPURegister& reg6 = NoReg, |
| 476 |
const CPURegister& reg7 = NoReg, |
| 477 |
const CPURegister& reg8 = NoReg); |
| 478 |
|
| 479 |
// AreConsecutive returns true if all of the specified registers are |
| 480 |
// consecutive in the register file. Arguments set to NoReg are ignored, as are |
| 481 |
// any subsequent arguments. At least one argument (reg1) must be valid |
| 482 |
// (not NoCPUReg). |
| 483 |
bool AreConsecutive(const CPURegister& reg1, |
| 484 |
const CPURegister& reg2, |
| 485 |
const CPURegister& reg3 = NoCPUReg, |
| 486 |
const CPURegister& reg4 = NoCPUReg); |
| 487 |
|
| 488 |
// AreSameFormat returns true if all of the specified VRegisters have the same |
| 489 |
// vector format. Arguments set to NoReg are ignored, as are any subsequent |
| 490 |
// arguments. At least one argument (reg1) must be valid (not NoVReg). |
| 491 |
bool AreSameFormat(const VRegister& reg1, |
| 492 |
const VRegister& reg2, |
| 493 |
const VRegister& reg3 = NoVReg, |
| 494 |
const VRegister& reg4 = NoVReg); |
| 495 |
|
| 496 |
|
| 497 |
// AreConsecutive returns true if all of the specified VRegisters are |
| 498 |
// consecutive in the register file. Arguments set to NoReg are ignored, as are |
| 499 |
// any subsequent arguments. At least one argument (reg1) must be valid |
| 500 |
// (not NoVReg). |
| 501 |
bool AreConsecutive(const VRegister& reg1, |
| 502 |
const VRegister& reg2, |
| 503 |
const VRegister& reg3 = NoVReg, |
| 504 |
const VRegister& reg4 = NoVReg); |
| 505 |
|
| 506 |
|
| 507 |
// Lists of registers. |
| 508 |
class CPURegList { |
| 509 |
public: |
| 510 |
explicit CPURegList(CPURegister reg1, |
| 511 |
CPURegister reg2 = NoCPUReg, |
| 512 |
CPURegister reg3 = NoCPUReg, |
| 513 |
CPURegister reg4 = NoCPUReg) |
| 514 |
: list_(reg1.Bit() | reg2.Bit() | reg3.Bit() | reg4.Bit()), |
| 515 |
size_(reg1.size()), type_(reg1.type()) { |
| 516 |
VIXL_ASSERT(AreSameSizeAndType(reg1, reg2, reg3, reg4)); |
| 517 |
VIXL_ASSERT(IsValid()); |
| 518 |
} |
| 519 |
|
| 520 |
CPURegList(CPURegister::RegisterType type, unsigned size, RegList list) |
| 521 |
: list_(list), size_(size), type_(type) { |
| 522 |
VIXL_ASSERT(IsValid()); |
| 523 |
} |
| 524 |
|
| 525 |
CPURegList(CPURegister::RegisterType type, unsigned size, |
| 526 |
unsigned first_reg, unsigned last_reg) |
| 527 |
: size_(size), type_(type) { |
| 528 |
VIXL_ASSERT(((type == CPURegister::kRegister) && |
| 529 |
(last_reg < kNumberOfRegisters)) || |
| 530 |
((type == CPURegister::kVRegister) && |
| 531 |
(last_reg < kNumberOfVRegisters))); |
| 532 |
VIXL_ASSERT(last_reg >= first_reg); |
| 533 |
list_ = (UINT64_C(1) << (last_reg + 1)) - 1; |
| 534 |
list_ &= ~((UINT64_C(1) << first_reg) - 1); |
| 535 |
VIXL_ASSERT(IsValid()); |
| 536 |
} |
| 537 |
|
| 538 |
CPURegister::RegisterType type() const { |
| 539 |
VIXL_ASSERT(IsValid()); |
| 540 |
return type_; |
| 541 |
} |
| 542 |
|
| 543 |
// Combine another CPURegList into this one. Registers that already exist in |
| 544 |
// this list are left unchanged. The type and size of the registers in the |
| 545 |
// 'other' list must match those in this list. |
| 546 |
void Combine(const CPURegList& other) { |
| 547 |
VIXL_ASSERT(IsValid()); |
| 548 |
VIXL_ASSERT(other.type() == type_); |
| 549 |
VIXL_ASSERT(other.RegisterSizeInBits() == size_); |
| 550 |
list_ |= other.list(); |
| 551 |
} |
| 552 |
|
| 553 |
// Remove every register in the other CPURegList from this one. Registers that |
| 554 |
// do not exist in this list are ignored. The type and size of the registers |
| 555 |
// in the 'other' list must match those in this list. |
| 556 |
void Remove(const CPURegList& other) { |
| 557 |
VIXL_ASSERT(IsValid()); |
| 558 |
VIXL_ASSERT(other.type() == type_); |
| 559 |
VIXL_ASSERT(other.RegisterSizeInBits() == size_); |
| 560 |
list_ &= ~other.list(); |
| 561 |
} |
| 562 |
|
| 563 |
// Variants of Combine and Remove which take a single register. |
| 564 |
void Combine(const CPURegister& other) { |
| 565 |
VIXL_ASSERT(other.type() == type_); |
| 566 |
VIXL_ASSERT(other.size() == size_); |
| 567 |
Combine(other.code()); |
| 568 |
} |
| 569 |
|
| 570 |
void Remove(const CPURegister& other) { |
| 571 |
VIXL_ASSERT(other.type() == type_); |
| 572 |
VIXL_ASSERT(other.size() == size_); |
| 573 |
Remove(other.code()); |
| 574 |
} |
| 575 |
|
| 576 |
// Variants of Combine and Remove which take a single register by its code; |
| 577 |
// the type and size of the register is inferred from this list. |
| 578 |
void Combine(int code) { |
| 579 |
VIXL_ASSERT(IsValid()); |
| 580 |
VIXL_ASSERT(CPURegister(code, size_, type_).IsValid()); |
| 581 |
list_ |= (UINT64_C(1) << code); |
| 582 |
} |
| 583 |
|
| 584 |
void Remove(int code) { |
| 585 |
VIXL_ASSERT(IsValid()); |
| 586 |
VIXL_ASSERT(CPURegister(code, size_, type_).IsValid()); |
| 587 |
list_ &= ~(UINT64_C(1) << code); |
| 588 |
} |
| 589 |
|
| 590 |
static CPURegList Union(const CPURegList& list_1, const CPURegList& list_2) { |
| 591 |
VIXL_ASSERT(list_1.type_ == list_2.type_); |
| 592 |
VIXL_ASSERT(list_1.size_ == list_2.size_); |
| 593 |
return CPURegList(list_1.type_, list_1.size_, list_1.list_ | list_2.list_); |
| 594 |
} |
| 595 |
static CPURegList Union(const CPURegList& list_1, |
| 596 |
const CPURegList& list_2, |
| 597 |
const CPURegList& list_3); |
| 598 |
static CPURegList Union(const CPURegList& list_1, |
| 599 |
const CPURegList& list_2, |
| 600 |
const CPURegList& list_3, |
| 601 |
const CPURegList& list_4); |
| 602 |
|
| 603 |
static CPURegList Intersection(const CPURegList& list_1, |
| 604 |
const CPURegList& list_2) { |
| 605 |
VIXL_ASSERT(list_1.type_ == list_2.type_); |
| 606 |
VIXL_ASSERT(list_1.size_ == list_2.size_); |
| 607 |
return CPURegList(list_1.type_, list_1.size_, list_1.list_ & list_2.list_); |
| 608 |
} |
| 609 |
static CPURegList Intersection(const CPURegList& list_1, |
| 610 |
const CPURegList& list_2, |
| 611 |
const CPURegList& list_3); |
| 612 |
static CPURegList Intersection(const CPURegList& list_1, |
| 613 |
const CPURegList& list_2, |
| 614 |
const CPURegList& list_3, |
| 615 |
const CPURegList& list_4); |
| 616 |
|
| 617 |
bool Overlaps(const CPURegList& other) const { |
| 618 |
return (type_ == other.type_) && ((list_ & other.list_) != 0); |
| 619 |
} |
| 620 |
|
| 621 |
RegList list() const { |
| 622 |
VIXL_ASSERT(IsValid()); |
| 623 |
return list_; |
| 624 |
} |
| 625 |
|
| 626 |
void set_list(RegList new_list) { |
| 627 |
VIXL_ASSERT(IsValid()); |
| 628 |
list_ = new_list; |
| 629 |
} |
| 630 |
|
| 631 |
// Remove all callee-saved registers from the list. This can be useful when |
| 632 |
// preparing registers for an AAPCS64 function call, for example. |
| 633 |
void RemoveCalleeSaved(); |
| 634 |
|
| 635 |
CPURegister PopLowestIndex(); |
| 636 |
CPURegister PopHighestIndex(); |
| 637 |
|
| 638 |
// AAPCS64 callee-saved registers. |
| 639 |
static CPURegList GetCalleeSaved(unsigned size = kXRegSize); |
| 640 |
static CPURegList GetCalleeSavedV(unsigned size = kDRegSize); |
| 641 |
|
| 642 |
// AAPCS64 caller-saved registers. Note that this includes lr. |
| 643 |
// TODO(all): Determine how we handle d8-d15 being callee-saved, but the top |
| 644 |
// 64-bits being caller-saved. |
| 645 |
static CPURegList GetCallerSaved(unsigned size = kXRegSize); |
| 646 |
static CPURegList GetCallerSavedV(unsigned size = kDRegSize); |
| 647 |
|
| 648 |
bool IsEmpty() const { |
| 649 |
VIXL_ASSERT(IsValid()); |
| 650 |
return list_ == 0; |
| 651 |
} |
| 652 |
|
| 653 |
bool IncludesAliasOf(const CPURegister& other) const { |
| 654 |
VIXL_ASSERT(IsValid()); |
| 655 |
return (type_ == other.type()) && ((other.Bit() & list_) != 0); |
| 656 |
} |
| 657 |
|
| 658 |
bool IncludesAliasOf(int code) const { |
| 659 |
VIXL_ASSERT(IsValid()); |
| 660 |
return ((code & list_) != 0); |
| 661 |
} |
| 662 |
|
| 663 |
int Count() const { |
| 664 |
VIXL_ASSERT(IsValid()); |
| 665 |
return CountSetBits(list_); |
| 666 |
} |
| 667 |
|
| 668 |
unsigned RegisterSizeInBits() const { |
| 669 |
VIXL_ASSERT(IsValid()); |
| 670 |
return size_; |
| 671 |
} |
| 672 |
|
| 673 |
unsigned RegisterSizeInBytes() const { |
| 674 |
int size_in_bits = RegisterSizeInBits(); |
| 675 |
VIXL_ASSERT((size_in_bits % 8) == 0); |
| 676 |
return size_in_bits / 8; |
| 677 |
} |
| 678 |
|
| 679 |
unsigned TotalSizeInBytes() const { |
| 680 |
VIXL_ASSERT(IsValid()); |
| 681 |
return RegisterSizeInBytes() * Count(); |
| 682 |
} |
| 683 |
|
| 684 |
private: |
| 685 |
RegList list_; |
| 686 |
unsigned size_; |
| 687 |
CPURegister::RegisterType type_; |
| 688 |
|
| 689 |
bool IsValid() const; |
| 690 |
}; |
| 691 |
|
| 692 |
|
| 693 |
// AAPCS64 callee-saved registers. |
| 694 |
extern const CPURegList kCalleeSaved; |
| 695 |
extern const CPURegList kCalleeSavedV; |
| 696 |
|
| 697 |
|
| 698 |
// AAPCS64 caller-saved registers. Note that this includes lr. |
| 699 |
extern const CPURegList kCallerSaved; |
| 700 |
extern const CPURegList kCallerSavedV; |
| 701 |
|
| 702 |
|
| 703 |
// Operand. |
| 704 |
class Operand { |
| 705 |
public: |
| 706 |
// #<immediate> |
| 707 |
// where <immediate> is int64_t. |
| 708 |
// This is allowed to be an implicit constructor because Operand is |
| 709 |
// a wrapper class that doesn't normally perform any type conversion. |
| 710 |
Operand(int64_t immediate = 0); // NOLINT(runtime/explicit) |
| 711 |
|
| 712 |
// rm, {<shift> #<shift_amount>} |
| 713 |
// where <shift> is one of {LSL, LSR, ASR, ROR}. |
| 714 |
// <shift_amount> is uint6_t. |
| 715 |
// This is allowed to be an implicit constructor because Operand is |
| 716 |
// a wrapper class that doesn't normally perform any type conversion. |
| 717 |
Operand(Register reg, |
| 718 |
Shift shift = LSL, |
| 719 |
unsigned shift_amount = 0); // NOLINT(runtime/explicit) |
| 720 |
|
| 721 |
// rm, {<extend> {#<shift_amount>}} |
| 722 |
// where <extend> is one of {UXTB, UXTH, UXTW, UXTX, SXTB, SXTH, SXTW, SXTX}. |
| 723 |
// <shift_amount> is uint2_t. |
| 724 |
explicit Operand(Register reg, Extend extend, unsigned shift_amount = 0); |
| 725 |
|
| 726 |
bool IsImmediate() const; |
| 727 |
bool IsShiftedRegister() const; |
| 728 |
bool IsExtendedRegister() const; |
| 729 |
bool IsZero() const; |
| 730 |
|
| 731 |
// This returns an LSL shift (<= 4) operand as an equivalent extend operand, |
| 732 |
// which helps in the encoding of instructions that use the stack pointer. |
| 733 |
Operand ToExtendedRegister() const; |
| 734 |
|
| 735 |
int64_t immediate() const { |
| 736 |
VIXL_ASSERT(IsImmediate()); |
| 737 |
return immediate_; |
| 738 |
} |
| 739 |
|
| 740 |
Register reg() const { |
| 741 |
VIXL_ASSERT(IsShiftedRegister() || IsExtendedRegister()); |
| 742 |
return reg_; |
| 743 |
} |
| 744 |
|
| 745 |
CPURegister maybeReg() const { |
| 746 |
if (IsShiftedRegister() || IsExtendedRegister()) |
| 747 |
return reg_; |
| 748 |
return NoCPUReg; |
| 749 |
} |
| 750 |
|
| 751 |
Shift shift() const { |
| 752 |
VIXL_ASSERT(IsShiftedRegister()); |
| 753 |
return shift_; |
| 754 |
} |
| 755 |
|
| 756 |
Extend extend() const { |
| 757 |
VIXL_ASSERT(IsExtendedRegister()); |
| 758 |
return extend_; |
| 759 |
} |
| 760 |
|
| 761 |
unsigned shift_amount() const { |
| 762 |
VIXL_ASSERT(IsShiftedRegister() || IsExtendedRegister()); |
| 763 |
return shift_amount_; |
| 764 |
} |
| 765 |
|
| 766 |
private: |
| 767 |
int64_t immediate_; |
| 768 |
Register reg_; |
| 769 |
Shift shift_; |
| 770 |
Extend extend_; |
| 771 |
unsigned shift_amount_; |
| 772 |
}; |
| 773 |
|
| 774 |
|
| 775 |
// MemOperand represents the addressing mode of a load or store instruction. |
| 776 |
class MemOperand { |
| 777 |
public: |
| 778 |
explicit MemOperand(Register base, |
| 779 |
int64_t offset = 0, |
| 780 |
AddrMode addrmode = Offset); |
| 781 |
MemOperand(Register base, |
| 782 |
Register regoffset, |
| 783 |
Shift shift = LSL, |
| 784 |
unsigned shift_amount = 0); |
| 785 |
MemOperand(Register base, |
| 786 |
Register regoffset, |
| 787 |
Extend extend, |
| 788 |
unsigned shift_amount = 0); |
| 789 |
MemOperand(Register base, |
| 790 |
const Operand& offset, |
| 791 |
AddrMode addrmode = Offset); |
| 792 |
|
| 793 |
// Adapter constructors using C++11 delegating. |
| 794 |
// TODO: If sp == kSPRegInternalCode, the xzr check isn't necessary. |
| 795 |
explicit MemOperand(js::jit::Address addr) |
| 796 |
: MemOperand(IsHiddenSP(addr.base) ? sp : Register(AsRegister(addr.base), 64), |
| 797 |
(ptrdiff_t)addr.offset) { |
| 798 |
} |
| 799 |
|
| 800 |
const Register& base() const { return base_; } |
| 801 |
const Register& regoffset() const { return regoffset_; } |
| 802 |
int64_t offset() const { return offset_; } |
| 803 |
AddrMode addrmode() const { return addrmode_; } |
| 804 |
Shift shift() const { return shift_; } |
| 805 |
Extend extend() const { return extend_; } |
| 806 |
unsigned shift_amount() const { return shift_amount_; } |
| 807 |
bool IsImmediateOffset() const; |
| 808 |
bool IsRegisterOffset() const; |
| 809 |
bool IsPreIndex() const; |
| 810 |
bool IsPostIndex() const; |
| 811 |
|
| 812 |
void AddOffset(int64_t offset); |
| 813 |
|
| 814 |
private: |
| 815 |
Register base_; |
| 816 |
Register regoffset_; |
| 817 |
int64_t offset_; |
| 818 |
AddrMode addrmode_; |
| 819 |
Shift shift_; |
| 820 |
Extend extend_; |
| 821 |
unsigned shift_amount_; |
| 822 |
}; |
| 823 |
|
| 824 |
|
| 825 |
// Control whether or not position-independent code should be emitted. |
| 826 |
enum PositionIndependentCodeOption { |
| 827 |
// All code generated will be position-independent; all branches and |
| 828 |
// references to labels generated with the Label class will use PC-relative |
| 829 |
// addressing. |
| 830 |
PositionIndependentCode, |
| 831 |
|
| 832 |
// Allow VIXL to generate code that refers to absolute addresses. With this |
| 833 |
// option, it will not be possible to copy the code buffer and run it from a |
| 834 |
// different address; code must be generated in its final location. |
| 835 |
PositionDependentCode, |
| 836 |
|
| 837 |
// Allow VIXL to assume that the bottom 12 bits of the address will be |
| 838 |
// constant, but that the top 48 bits may change. This allows `adrp` to |
| 839 |
// function in systems which copy code between pages, but otherwise maintain |
| 840 |
// 4KB page alignment. |
| 841 |
PageOffsetDependentCode |
| 842 |
}; |
| 843 |
|
| 844 |
|
| 845 |
// Control how scaled- and unscaled-offset loads and stores are generated. |
| 846 |
enum LoadStoreScalingOption { |
| 847 |
// Prefer scaled-immediate-offset instructions, but emit unscaled-offset, |
| 848 |
// register-offset, pre-index or post-index instructions if necessary. |
| 849 |
PreferScaledOffset, |
| 850 |
|
| 851 |
// Prefer unscaled-immediate-offset instructions, but emit scaled-offset, |
| 852 |
// register-offset, pre-index or post-index instructions if necessary. |
| 853 |
PreferUnscaledOffset, |
| 854 |
|
| 855 |
// Require scaled-immediate-offset instructions. |
| 856 |
RequireScaledOffset, |
| 857 |
|
| 858 |
// Require unscaled-immediate-offset instructions. |
| 859 |
RequireUnscaledOffset |
| 860 |
}; |
| 861 |
|
| 862 |
|
| 863 |
// Assembler. |
| 864 |
class Assembler : public MozBaseAssembler { |
| 865 |
public: |
| 866 |
Assembler(PositionIndependentCodeOption pic = PositionIndependentCode); |
| 867 |
|
| 868 |
// System functions. |
| 869 |
|
| 870 |
// Finalize a code buffer of generated instructions. This function must be |
| 871 |
// called before executing or copying code from the buffer. |
| 872 |
void FinalizeCode(); |
| 873 |
|
| 874 |
#define COPYENUM(v) static const Condition v = vixl::v |
| 875 |
#define COPYENUM_(v) static const Condition v = vixl::v##_ |
| 876 |
COPYENUM(Equal); |
| 877 |
COPYENUM(Zero); |
| 878 |
COPYENUM(NotEqual); |
| 879 |
COPYENUM(NonZero); |
| 880 |
COPYENUM(AboveOrEqual); |
| 881 |
COPYENUM(CarrySet); |
| 882 |
COPYENUM(Below); |
| 883 |
COPYENUM(CarryClear); |
| 884 |
COPYENUM(Signed); |
| 885 |
COPYENUM(NotSigned); |
| 886 |
COPYENUM(Overflow); |
| 887 |
COPYENUM(NoOverflow); |
| 888 |
COPYENUM(Above); |
| 889 |
COPYENUM(BelowOrEqual); |
| 890 |
COPYENUM_(GreaterThanOrEqual); |
| 891 |
COPYENUM_(LessThan); |
| 892 |
COPYENUM_(GreaterThan); |
| 893 |
COPYENUM_(LessThanOrEqual); |
| 894 |
COPYENUM(Always); |
| 895 |
COPYENUM(Never); |
| 896 |
#undef COPYENUM |
| 897 |
#undef COPYENUM_ |
| 898 |
|
| 899 |
// Bit set when a DoubleCondition does not map to a single ARM condition. |
| 900 |
// The MacroAssembler must special-case these conditions, or else |
| 901 |
// ConditionFromDoubleCondition will complain. |
| 902 |
static const int DoubleConditionBitSpecial = 0x100; |
| 903 |
|
| 904 |
enum DoubleCondition { |
| 905 |
DoubleOrdered = Condition::vc, |
| 906 |
DoubleEqual = Condition::eq, |
| 907 |
DoubleNotEqual = Condition::ne | DoubleConditionBitSpecial, |
| 908 |
DoubleGreaterThan = Condition::gt, |
| 909 |
DoubleGreaterThanOrEqual = Condition::ge, |
| 910 |
DoubleLessThan = Condition::lo, // Could also use Condition::mi. |
| 911 |
DoubleLessThanOrEqual = Condition::ls, |
| 912 |
|
| 913 |
// If either operand is NaN, these conditions always evaluate to true. |
| 914 |
DoubleUnordered = Condition::vs, |
| 915 |
DoubleEqualOrUnordered = Condition::eq | DoubleConditionBitSpecial, |
| 916 |
DoubleNotEqualOrUnordered = Condition::ne, |
| 917 |
DoubleGreaterThanOrUnordered = Condition::hi, |
| 918 |
DoubleGreaterThanOrEqualOrUnordered = Condition::hs, |
| 919 |
DoubleLessThanOrUnordered = Condition::lt, |
| 920 |
DoubleLessThanOrEqualOrUnordered = Condition::le |
| 921 |
}; |
| 922 |
|
| 923 |
static inline Condition InvertCondition(Condition cond) { |
| 924 |
// Conditions al and nv behave identically, as "always true". They can't be |
| 925 |
// inverted, because there is no "always false" condition. |
| 926 |
VIXL_ASSERT((cond != al) && (cond != nv)); |
| 927 |
return static_cast<Condition>(cond ^ 1); |
| 928 |
} |
| 929 |
|
| 930 |
// This is chaging the condition codes for cmp a, b to the same codes for cmp b, a. |
| 931 |
static inline Condition InvertCmpCondition(Condition cond) { |
| 932 |
// Conditions al and nv behave identically, as "always true". They can't be |
| 933 |
// inverted, because there is no "always false" condition. |
| 934 |
switch (cond) { |
| 935 |
case eq: |
| 936 |
case ne: |
| 937 |
return cond; |
| 938 |
case gt: |
| 939 |
return le; |
| 940 |
case le: |
| 941 |
return gt; |
| 942 |
case ge: |
| 943 |
return lt; |
| 944 |
case lt: |
| 945 |
return ge; |
| 946 |
case hi: |
| 947 |
return lo; |
| 948 |
case lo: |
| 949 |
return hi; |
| 950 |
case hs: |
| 951 |
return ls; |
| 952 |
case ls: |
| 953 |
return hs; |
| 954 |
case mi: |
| 955 |
return pl; |
| 956 |
case pl: |
| 957 |
return mi; |
| 958 |
default: |
| 959 |
MOZ_CRASH("TODO: figure this case out."); |
| 960 |
} |
| 961 |
return static_cast<Condition>(cond ^ 1); |
| 962 |
} |
| 963 |
|
| 964 |
static inline DoubleCondition InvertCondition(DoubleCondition cond) { |
| 965 |
switch (cond) { |
| 966 |
case DoubleOrdered: |
| 967 |
return DoubleUnordered; |
| 968 |
case DoubleEqual: |
| 969 |
return DoubleNotEqualOrUnordered; |
| 970 |
case DoubleNotEqual: |
| 971 |
return DoubleEqualOrUnordered; |
| 972 |
case DoubleGreaterThan: |
| 973 |
return DoubleLessThanOrEqualOrUnordered; |
| 974 |
case DoubleGreaterThanOrEqual: |
| 975 |
return DoubleLessThanOrUnordered; |
| 976 |
case DoubleLessThan: |
| 977 |
return DoubleGreaterThanOrEqualOrUnordered; |
| 978 |
case DoubleLessThanOrEqual: |
| 979 |
return DoubleGreaterThanOrUnordered; |
| 980 |
case DoubleUnordered: |
| 981 |
return DoubleOrdered; |
| 982 |
case DoubleEqualOrUnordered: |
| 983 |
return DoubleNotEqual; |
| 984 |
case DoubleNotEqualOrUnordered: |
| 985 |
return DoubleEqual; |
| 986 |
case DoubleGreaterThanOrUnordered: |
| 987 |
return DoubleLessThanOrEqual; |
| 988 |
case DoubleGreaterThanOrEqualOrUnordered: |
| 989 |
return DoubleLessThan; |
| 990 |
case DoubleLessThanOrUnordered: |
| 991 |
return DoubleGreaterThanOrEqual; |
| 992 |
case DoubleLessThanOrEqualOrUnordered: |
| 993 |
return DoubleGreaterThan; |
| 994 |
default: |
| 995 |
MOZ_CRASH("Bad condition"); |
| 996 |
} |
| 997 |
} |
| 998 |
|
| 999 |
static inline Condition ConditionFromDoubleCondition(DoubleCondition cond) { |
| 1000 |
VIXL_ASSERT(!(cond & DoubleConditionBitSpecial)); |
| 1001 |
return static_cast<Condition>(cond); |
| 1002 |
} |
| 1003 |
|
| 1004 |
// Instruction set functions. |
| 1005 |
|
| 1006 |
// Branch / Jump instructions. |
| 1007 |
// Branch to register. |
| 1008 |
void br(const Register& xn); |
| 1009 |
static void br(Instruction* at, const Register& xn); |
| 1010 |
|
| 1011 |
// Branch with link to register. |
| 1012 |
void blr(const Register& xn); |
| 1013 |
static void blr(Instruction* at, const Register& blr); |
| 1014 |
|
| 1015 |
// Branch to register with return hint. |
| 1016 |
void ret(const Register& xn = lr); |
| 1017 |
|
| 1018 |
// Unconditional branch to label. |
| 1019 |
BufferOffset b(Label* label); |
| 1020 |
|
| 1021 |
// Conditional branch to label. |
| 1022 |
BufferOffset b(Label* label, Condition cond); |
| 1023 |
|
| 1024 |
// Unconditional branch to PC offset. |
| 1025 |
BufferOffset b(int imm26, const LabelDoc& doc); |
| 1026 |
static void b(Instruction* at, int imm26); |
| 1027 |
|
| 1028 |
// Conditional branch to PC offset. |
| 1029 |
BufferOffset b(int imm19, Condition cond, const LabelDoc& doc); |
| 1030 |
static void b(Instruction*at, int imm19, Condition cond); |
| 1031 |
|
| 1032 |
// Branch with link to label. |
| 1033 |
void bl(Label* label); |
| 1034 |
|
| 1035 |
// Branch with link to PC offset. |
| 1036 |
void bl(int imm26, const LabelDoc& doc); |
| 1037 |
static void bl(Instruction* at, int imm26); |
| 1038 |
|
| 1039 |
// Compare and branch to label if zero. |
| 1040 |
void cbz(const Register& rt, Label* label); |
| 1041 |
|
| 1042 |
// Compare and branch to PC offset if zero. |
| 1043 |
void cbz(const Register& rt, int imm19, const LabelDoc& doc); |
| 1044 |
static void cbz(Instruction* at, const Register& rt, int imm19); |
| 1045 |
|
| 1046 |
// Compare and branch to label if not zero. |
| 1047 |
void cbnz(const Register& rt, Label* label); |
| 1048 |
|
| 1049 |
// Compare and branch to PC offset if not zero. |
| 1050 |
void cbnz(const Register& rt, int imm19, const LabelDoc& doc); |
| 1051 |
static void cbnz(Instruction* at, const Register& rt, int imm19); |
| 1052 |
|
| 1053 |
// Table lookup from one register. |
| 1054 |
void tbl(const VRegister& vd, |
| 1055 |
const VRegister& vn, |
| 1056 |
const VRegister& vm); |
| 1057 |
|
| 1058 |
// Table lookup from two registers. |
| 1059 |
void tbl(const VRegister& vd, |
| 1060 |
const VRegister& vn, |
| 1061 |
const VRegister& vn2, |
| 1062 |
const VRegister& vm); |
| 1063 |
|
| 1064 |
// Table lookup from three registers. |
| 1065 |
void tbl(const VRegister& vd, |
| 1066 |
const VRegister& vn, |
| 1067 |
const VRegister& vn2, |
| 1068 |
const VRegister& vn3, |
| 1069 |
const VRegister& vm); |
| 1070 |
|
| 1071 |
// Table lookup from four registers. |
| 1072 |
void tbl(const VRegister& vd, |
| 1073 |
const VRegister& vn, |
| 1074 |
const VRegister& vn2, |
| 1075 |
const VRegister& vn3, |
| 1076 |
const VRegister& vn4, |
| 1077 |
const VRegister& vm); |
| 1078 |
|
| 1079 |
// Table lookup extension from one register. |
| 1080 |
void tbx(const VRegister& vd, |
| 1081 |
const VRegister& vn, |
| 1082 |
const VRegister& vm); |
| 1083 |
|
| 1084 |
// Table lookup extension from two registers. |
| 1085 |
void tbx(const VRegister& vd, |
| 1086 |
const VRegister& vn, |
| 1087 |
const VRegister& vn2, |
| 1088 |
const VRegister& vm); |
| 1089 |
|
| 1090 |
// Table lookup extension from three registers. |
| 1091 |
void tbx(const VRegister& vd, |
| 1092 |
const VRegister& vn, |
| 1093 |
const VRegister& vn2, |
| 1094 |
const VRegister& vn3, |
| 1095 |
const VRegister& vm); |
| 1096 |
|
| 1097 |
// Table lookup extension from four registers. |
| 1098 |
void tbx(const VRegister& vd, |
| 1099 |
const VRegister& vn, |
| 1100 |
const VRegister& vn2, |
| 1101 |
const VRegister& vn3, |
| 1102 |
const VRegister& vn4, |
| 1103 |
const VRegister& vm); |
| 1104 |
|
| 1105 |
// Test bit and branch to label if zero. |
| 1106 |
void tbz(const Register& rt, unsigned bit_pos, Label* label); |
| 1107 |
|
| 1108 |
// Test bit and branch to PC offset if zero. |
| 1109 |
void tbz(const Register& rt, unsigned bit_pos, int imm14, const LabelDoc& doc); |
| 1110 |
static void tbz(Instruction* at, const Register& rt, unsigned bit_pos, int imm14); |
| 1111 |
|
| 1112 |
// Test bit and branch to label if not zero. |
| 1113 |
void tbnz(const Register& rt, unsigned bit_pos, Label* label); |
| 1114 |
|
| 1115 |
// Test bit and branch to PC offset if not zero. |
| 1116 |
void tbnz(const Register& rt, unsigned bit_pos, int imm14, const LabelDoc& doc); |
| 1117 |
static void tbnz(Instruction* at, const Register& rt, unsigned bit_pos, int imm14); |
| 1118 |
|
| 1119 |
// Address calculation instructions. |
| 1120 |
// Calculate a PC-relative address. Unlike for branches the offset in adr is |
| 1121 |
// unscaled (i.e. the result can be unaligned). |
| 1122 |
|
| 1123 |
// Calculate the address of a label. |
| 1124 |
void adr(const Register& rd, Label* label); |
| 1125 |
|
| 1126 |
// Calculate the address of a PC offset. |
| 1127 |
void adr(const Register& rd, int imm21, const LabelDoc& doc); |
| 1128 |
static void adr(Instruction* at, const Register& rd, int imm21); |
| 1129 |
|
| 1130 |
// Calculate the page address of a label. |
| 1131 |
void adrp(const Register& rd, Label* label); |
| 1132 |
|
| 1133 |
// Calculate the page address of a PC offset. |
| 1134 |
void adrp(const Register& rd, int imm21, const LabelDoc& doc); |
| 1135 |
static void adrp(Instruction* at, const Register& rd, int imm21); |
| 1136 |
|
| 1137 |
// Data Processing instructions. |
| 1138 |
// Add. |
| 1139 |
void add(const Register& rd, |
| 1140 |
const Register& rn, |
| 1141 |
const Operand& operand); |
| 1142 |
|
| 1143 |
// Add and update status flags. |
| 1144 |
void adds(const Register& rd, |
| 1145 |
const Register& rn, |
| 1146 |
const Operand& operand); |
| 1147 |
|
| 1148 |
// Compare negative. |
| 1149 |
void cmn(const Register& rn, const Operand& operand); |
| 1150 |
|
| 1151 |
// Subtract. |
| 1152 |
void sub(const Register& rd, |
| 1153 |
const Register& rn, |
| 1154 |
const Operand& operand); |
| 1155 |
|
| 1156 |
// Subtract and update status flags. |
| 1157 |
void subs(const Register& rd, |
| 1158 |
const Register& rn, |
| 1159 |
const Operand& operand); |
| 1160 |
|
| 1161 |
// Compare. |
| 1162 |
void cmp(const Register& rn, const Operand& operand); |
| 1163 |
|
| 1164 |
// Negate. |
| 1165 |
void neg(const Register& rd, |
| 1166 |
const Operand& operand); |
| 1167 |
|
| 1168 |
// Negate and update status flags. |
| 1169 |
void negs(const Register& rd, |
| 1170 |
const Operand& operand); |
| 1171 |
|
| 1172 |
// Add with carry bit. |
| 1173 |
void adc(const Register& rd, |
| 1174 |
const Register& rn, |
| 1175 |
const Operand& operand); |
| 1176 |
|
| 1177 |
// Add with carry bit and update status flags. |
| 1178 |
void adcs(const Register& rd, |
| 1179 |
const Register& rn, |
| 1180 |
const Operand& operand); |
| 1181 |
|
| 1182 |
// Subtract with carry bit. |
| 1183 |
void sbc(const Register& rd, |
| 1184 |
const Register& rn, |
| 1185 |
const Operand& operand); |
| 1186 |
|
| 1187 |
// Subtract with carry bit and update status flags. |
| 1188 |
void sbcs(const Register& rd, |
| 1189 |
const Register& rn, |
| 1190 |
const Operand& operand); |
| 1191 |
|
| 1192 |
// Negate with carry bit. |
| 1193 |
void ngc(const Register& rd, |
| 1194 |
const Operand& operand); |
| 1195 |
|
| 1196 |
// Negate with carry bit and update status flags. |
| 1197 |
void ngcs(const Register& rd, |
| 1198 |
const Operand& operand); |
| 1199 |
|
| 1200 |
// Logical instructions. |
| 1201 |
// Bitwise and (A & B). |
| 1202 |
void and_(const Register& rd, |
| 1203 |
const Register& rn, |
| 1204 |
const Operand& operand); |
| 1205 |
|
| 1206 |
// Bitwise and (A & B) and update status flags. |
| 1207 |
BufferOffset ands(const Register& rd, |
| 1208 |
const Register& rn, |
| 1209 |
const Operand& operand); |
| 1210 |
|
| 1211 |
// Bit test and set flags. |
| 1212 |
BufferOffset tst(const Register& rn, const Operand& operand); |
| 1213 |
|
| 1214 |
// Bit clear (A & ~B). |
| 1215 |
void bic(const Register& rd, |
| 1216 |
const Register& rn, |
| 1217 |
const Operand& operand); |
| 1218 |
|
| 1219 |
// Bit clear (A & ~B) and update status flags. |
| 1220 |
void bics(const Register& rd, |
| 1221 |
const Register& rn, |
| 1222 |
const Operand& operand); |
| 1223 |
|
| 1224 |
// Bitwise or (A | B). |
| 1225 |
void orr(const Register& rd, const Register& rn, const Operand& operand); |
| 1226 |
|
| 1227 |
// Bitwise nor (A | ~B). |
| 1228 |
void orn(const Register& rd, const Register& rn, const Operand& operand); |
| 1229 |
|
| 1230 |
// Bitwise eor/xor (A ^ B). |
| 1231 |
void eor(const Register& rd, const Register& rn, const Operand& operand); |
| 1232 |
|
| 1233 |
// Bitwise enor/xnor (A ^ ~B). |
| 1234 |
void eon(const Register& rd, const Register& rn, const Operand& operand); |
| 1235 |
|
| 1236 |
// Logical shift left by variable. |
| 1237 |
void lslv(const Register& rd, const Register& rn, const Register& rm); |
| 1238 |
|
| 1239 |
// Logical shift right by variable. |
| 1240 |
void lsrv(const Register& rd, const Register& rn, const Register& rm); |
| 1241 |
|
| 1242 |
// Arithmetic shift right by variable. |
| 1243 |
void asrv(const Register& rd, const Register& rn, const Register& rm); |
| 1244 |
|
| 1245 |
// Rotate right by variable. |
| 1246 |
void rorv(const Register& rd, const Register& rn, const Register& rm); |
| 1247 |
|
| 1248 |
// Bitfield instructions. |
| 1249 |
// Bitfield move. |
| 1250 |
void bfm(const Register& rd, |
| 1251 |
const Register& rn, |
| 1252 |
unsigned immr, |
| 1253 |
unsigned imms); |
| 1254 |
|
| 1255 |
// Signed bitfield move. |
| 1256 |
void sbfm(const Register& rd, |
| 1257 |
const Register& rn, |
| 1258 |
unsigned immr, |
| 1259 |
unsigned imms); |
| 1260 |
|
| 1261 |
// Unsigned bitfield move. |
| 1262 |
void ubfm(const Register& rd, |
| 1263 |
const Register& rn, |
| 1264 |
unsigned immr, |
| 1265 |
unsigned imms); |
| 1266 |
|
| 1267 |
// Bfm aliases. |
| 1268 |
// Bitfield insert. |
| 1269 |
void bfi(const Register& rd, |
| 1270 |
const Register& rn, |
| 1271 |
unsigned lsb, |
| 1272 |
unsigned width) { |
| 1273 |
VIXL_ASSERT(width >= 1); |
| 1274 |
VIXL_ASSERT(lsb + width <= rn.size()); |
| 1275 |
bfm(rd, rn, (rd.size() - lsb) & (rd.size() - 1), width - 1); |
| 1276 |
} |
| 1277 |
|
| 1278 |
// Bitfield extract and insert low. |
| 1279 |
void bfxil(const Register& rd, |
| 1280 |
const Register& rn, |
| 1281 |
unsigned lsb, |
| 1282 |
unsigned width) { |
| 1283 |
VIXL_ASSERT(width >= 1); |
| 1284 |
VIXL_ASSERT(lsb + width <= rn.size()); |
| 1285 |
bfm(rd, rn, lsb, lsb + width - 1); |
| 1286 |
} |
| 1287 |
|
| 1288 |
// Sbfm aliases. |
| 1289 |
// Arithmetic shift right. |
| 1290 |
void asr(const Register& rd, const Register& rn, unsigned shift) { |
| 1291 |
VIXL_ASSERT(shift < rd.size()); |
| 1292 |
sbfm(rd, rn, shift, rd.size() - 1); |
| 1293 |
} |
| 1294 |
|
| 1295 |
// Signed bitfield insert with zero at right. |
| 1296 |
void sbfiz(const Register& rd, |
| 1297 |
const Register& rn, |
| 1298 |
unsigned lsb, |
| 1299 |
unsigned width) { |
| 1300 |
VIXL_ASSERT(width >= 1); |
| 1301 |
VIXL_ASSERT(lsb + width <= rn.size()); |
| 1302 |
sbfm(rd, rn, (rd.size() - lsb) & (rd.size() - 1), width - 1); |
| 1303 |
} |
| 1304 |
|
| 1305 |
// Signed bitfield extract. |
| 1306 |
void sbfx(const Register& rd, |
| 1307 |
const Register& rn, |
| 1308 |
unsigned lsb, |
| 1309 |
unsigned width) { |
| 1310 |
VIXL_ASSERT(width >= 1); |
| 1311 |
VIXL_ASSERT(lsb + width <= rn.size()); |
| 1312 |
sbfm(rd, rn, lsb, lsb + width - 1); |
| 1313 |
} |
| 1314 |
|
| 1315 |
// Signed extend byte. |
| 1316 |
void sxtb(const Register& rd, const Register& rn) { |
| 1317 |
sbfm(rd, rn, 0, 7); |
| 1318 |
} |
| 1319 |
|
| 1320 |
// Signed extend halfword. |
| 1321 |
void sxth(const Register& rd, const Register& rn) { |
| 1322 |
sbfm(rd, rn, 0, 15); |
| 1323 |
} |
| 1324 |
|
| 1325 |
// Signed extend word. |
| 1326 |
void sxtw(const Register& rd, const Register& rn) { |
| 1327 |
sbfm(rd, rn, 0, 31); |
| 1328 |
} |
| 1329 |
|
| 1330 |
// Ubfm aliases. |
| 1331 |
// Logical shift left. |
| 1332 |
void lsl(const Register& rd, const Register& rn, unsigned shift) { |
| 1333 |
unsigned reg_size = rd.size(); |
| 1334 |
VIXL_ASSERT(shift < reg_size); |
| 1335 |
ubfm(rd, rn, (reg_size - shift) % reg_size, reg_size - shift - 1); |
| 1336 |
} |
| 1337 |
|
| 1338 |
// Logical shift right. |
| 1339 |
void lsr(const Register& rd, const Register& rn, unsigned shift) { |
| 1340 |
VIXL_ASSERT(shift < rd.size()); |
| 1341 |
ubfm(rd, rn, shift, rd.size() - 1); |
| 1342 |
} |
| 1343 |
|
| 1344 |
// Unsigned bitfield insert with zero at right. |
| 1345 |
void ubfiz(const Register& rd, |
| 1346 |
const Register& rn, |
| 1347 |
unsigned lsb, |
| 1348 |
unsigned width) { |
| 1349 |
VIXL_ASSERT(width >= 1); |
| 1350 |
VIXL_ASSERT(lsb + width <= rn.size()); |
| 1351 |
ubfm(rd, rn, (rd.size() - lsb) & (rd.size() - 1), width - 1); |
| 1352 |
} |
| 1353 |
|
| 1354 |
// Unsigned bitfield extract. |
| 1355 |
void ubfx(const Register& rd, |
| 1356 |
const Register& rn, |
| 1357 |
unsigned lsb, |
| 1358 |
unsigned width) { |
| 1359 |
VIXL_ASSERT(width >= 1); |
| 1360 |
VIXL_ASSERT(lsb + width <= rn.size()); |
| 1361 |
ubfm(rd, rn, lsb, lsb + width - 1); |
| 1362 |
} |
| 1363 |
|
| 1364 |
// Unsigned extend byte. |
| 1365 |
void uxtb(const Register& rd, const Register& rn) { |
| 1366 |
ubfm(rd, rn, 0, 7); |
| 1367 |
} |
| 1368 |
|
| 1369 |
// Unsigned extend halfword. |
| 1370 |
void uxth(const Register& rd, const Register& rn) { |
| 1371 |
ubfm(rd, rn, 0, 15); |
| 1372 |
} |
| 1373 |
|
| 1374 |
// Unsigned extend word. |
| 1375 |
void uxtw(const Register& rd, const Register& rn) { |
| 1376 |
ubfm(rd, rn, 0, 31); |
| 1377 |
} |
| 1378 |
|
| 1379 |
// Extract. |
| 1380 |
void extr(const Register& rd, |
| 1381 |
const Register& rn, |
| 1382 |
const Register& rm, |
| 1383 |
unsigned lsb); |
| 1384 |
|
| 1385 |
// Conditional select: rd = cond ? rn : rm. |
| 1386 |
void csel(const Register& rd, |
| 1387 |
const Register& rn, |
| 1388 |
const Register& rm, |
| 1389 |
Condition cond); |
| 1390 |
|
| 1391 |
// Conditional select increment: rd = cond ? rn : rm + 1. |
| 1392 |
void csinc(const Register& rd, |
| 1393 |
const Register& rn, |
| 1394 |
const Register& rm, |
| 1395 |
Condition cond); |
| 1396 |
|
| 1397 |
// Conditional select inversion: rd = cond ? rn : ~rm. |
| 1398 |
void csinv(const Register& rd, |
| 1399 |
const Register& rn, |
| 1400 |
const Register& rm, |
| 1401 |
Condition cond); |
| 1402 |
|
| 1403 |
// Conditional select negation: rd = cond ? rn : -rm. |
| 1404 |
void csneg(const Register& rd, |
| 1405 |
const Register& rn, |
| 1406 |
const Register& rm, |
| 1407 |
Condition cond); |
| 1408 |
|
| 1409 |
// Conditional set: rd = cond ? 1 : 0. |
| 1410 |
void cset(const Register& rd, Condition cond); |
| 1411 |
|
| 1412 |
// Conditional set mask: rd = cond ? -1 : 0. |
| 1413 |
void csetm(const Register& rd, Condition cond); |
| 1414 |
|
| 1415 |
// Conditional increment: rd = cond ? rn + 1 : rn. |
| 1416 |
void cinc(const Register& rd, const Register& rn, Condition cond); |
| 1417 |
|
| 1418 |
// Conditional invert: rd = cond ? ~rn : rn. |
| 1419 |
void cinv(const Register& rd, const Register& rn, Condition cond); |
| 1420 |
|
| 1421 |
// Conditional negate: rd = cond ? -rn : rn. |
| 1422 |
void cneg(const Register& rd, const Register& rn, Condition cond); |
| 1423 |
|
| 1424 |
// Rotate right. |
| 1425 |
void ror(const Register& rd, const Register& rs, unsigned shift) { |
| 1426 |
extr(rd, rs, rs, shift); |
| 1427 |
} |
| 1428 |
|
| 1429 |
// Conditional comparison. |
| 1430 |
// Conditional compare negative. |
| 1431 |
void ccmn(const Register& rn, |
| 1432 |
const Operand& operand, |
| 1433 |
StatusFlags nzcv, |
| 1434 |
Condition cond); |
| 1435 |
|
| 1436 |
// Conditional compare. |
| 1437 |
void ccmp(const Register& rn, |
| 1438 |
const Operand& operand, |
| 1439 |
StatusFlags nzcv, |
| 1440 |
Condition cond); |
| 1441 |
|
| 1442 |
// CRC-32 checksum from byte. |
| 1443 |
void crc32b(const Register& rd, |
| 1444 |
const Register& rn, |
| 1445 |
const Register& rm); |
| 1446 |
|
| 1447 |
// CRC-32 checksum from half-word. |
| 1448 |
void crc32h(const Register& rd, |
| 1449 |
const Register& rn, |
| 1450 |
const Register& rm); |
| 1451 |
|
| 1452 |
// CRC-32 checksum from word. |
| 1453 |
void crc32w(const Register& rd, |
| 1454 |
const Register& rn, |
| 1455 |
const Register& rm); |
| 1456 |
|
| 1457 |
// CRC-32 checksum from double word. |
| 1458 |
void crc32x(const Register& rd, |
| 1459 |
const Register& rn, |
| 1460 |
const Register& rm); |
| 1461 |
|
| 1462 |
// CRC-32 C checksum from byte. |
| 1463 |
void crc32cb(const Register& rd, |
| 1464 |
const Register& rn, |
| 1465 |
const Register& rm); |
| 1466 |
|
| 1467 |
// CRC-32 C checksum from half-word. |
| 1468 |
void crc32ch(const Register& rd, |
| 1469 |
const Register& rn, |
| 1470 |
const Register& rm); |
| 1471 |
|
| 1472 |
// CRC-32 C checksum from word. |
| 1473 |
void crc32cw(const Register& rd, |
| 1474 |
const Register& rn, |
| 1475 |
const Register& rm); |
| 1476 |
|
| 1477 |
// CRC-32C checksum from double word. |
| 1478 |
void crc32cx(const Register& rd, |
| 1479 |
const Register& rn, |
| 1480 |
const Register& rm); |
| 1481 |
|
| 1482 |
// Multiply. |
| 1483 |
void mul(const Register& rd, const Register& rn, const Register& rm); |
| 1484 |
|
| 1485 |
// Negated multiply. |
| 1486 |
void mneg(const Register& rd, const Register& rn, const Register& rm); |
| 1487 |
|
| 1488 |
// Signed long multiply: 32 x 32 -> 64-bit. |
| 1489 |
void smull(const Register& rd, const Register& rn, const Register& rm); |
| 1490 |
|
| 1491 |
// Signed multiply high: 64 x 64 -> 64-bit <127:64>. |
| 1492 |
void smulh(const Register& xd, const Register& xn, const Register& xm); |
| 1493 |
|
| 1494 |
// Multiply and accumulate. |
| 1495 |
void madd(const Register& rd, |
| 1496 |
const Register& rn, |
| 1497 |
const Register& rm, |
| 1498 |
const Register& ra); |
| 1499 |
|
| 1500 |
// Multiply and subtract. |
| 1501 |
void msub(const Register& rd, |
| 1502 |
const Register& rn, |
| 1503 |
const Register& rm, |
| 1504 |
const Register& ra); |
| 1505 |
|
| 1506 |
// Signed long multiply and accumulate: 32 x 32 + 64 -> 64-bit. |
| 1507 |
void smaddl(const Register& rd, |
| 1508 |
const Register& rn, |
| 1509 |
const Register& rm, |
| 1510 |
const Register& ra); |
| 1511 |
|
| 1512 |
// Unsigned long multiply and accumulate: 32 x 32 + 64 -> 64-bit. |
| 1513 |
void umaddl(const Register& rd, |
| 1514 |
const Register& rn, |
| 1515 |
const Register& rm, |
| 1516 |
const Register& ra); |
| 1517 |
|
| 1518 |
// Unsigned long multiply: 32 x 32 -> 64-bit. |
| 1519 |
void umull(const Register& rd, |
| 1520 |
const Register& rn, |
| 1521 |
const Register& rm) { |
| 1522 |
umaddl(rd, rn, rm, xzr); |
| 1523 |
} |
| 1524 |
|
| 1525 |
// Unsigned multiply high: 64 x 64 -> 64-bit <127:64>. |
| 1526 |
void umulh(const Register& xd, |
| 1527 |
const Register& xn, |
| 1528 |
const Register& xm); |
| 1529 |
|
| 1530 |
// Signed long multiply and subtract: 64 - (32 x 32) -> 64-bit. |
| 1531 |
void smsubl(const Register& rd, |
| 1532 |
const Register& rn, |
| 1533 |
const Register& rm, |
| 1534 |
const Register& ra); |
| 1535 |
|
| 1536 |
// Unsigned long multiply and subtract: 64 - (32 x 32) -> 64-bit. |
| 1537 |
void umsubl(const Register& rd, |
| 1538 |
const Register& rn, |
| 1539 |
const Register& rm, |
| 1540 |
const Register& ra); |
| 1541 |
|
| 1542 |
// Signed integer divide. |
| 1543 |
void sdiv(const Register& rd, const Register& rn, const Register& rm); |
| 1544 |
|
| 1545 |
// Unsigned integer divide. |
| 1546 |
void udiv(const Register& rd, const Register& rn, const Register& rm); |
| 1547 |
|
| 1548 |
// Bit reverse. |
| 1549 |
void rbit(const Register& rd, const Register& rn); |
| 1550 |
|
| 1551 |
// Reverse bytes in 16-bit half words. |
| 1552 |
void rev16(const Register& rd, const Register& rn); |
| 1553 |
|
| 1554 |
// Reverse bytes in 32-bit words. |
| 1555 |
void rev32(const Register& rd, const Register& rn); |
| 1556 |
|
| 1557 |
// Reverse bytes. |
| 1558 |
void rev(const Register& rd, const Register& rn); |
| 1559 |
|
| 1560 |
// Count leading zeroes. |
| 1561 |
void clz(const Register& rd, const Register& rn); |
| 1562 |
|
| 1563 |
// Count leading sign bits. |
| 1564 |
void cls(const Register& rd, const Register& rn); |
| 1565 |
|
| 1566 |
// Memory instructions. |
| 1567 |
// Load integer or FP register. |
| 1568 |
void ldr(const CPURegister& rt, const MemOperand& src, |
| 1569 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 1570 |
|
| 1571 |
// Store integer or FP register. |
| 1572 |
void str(const CPURegister& rt, const MemOperand& dst, |
| 1573 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 1574 |
|
| 1575 |
// Load word with sign extension. |
| 1576 |
void ldrsw(const Register& rt, const MemOperand& src, |
| 1577 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 1578 |
|
| 1579 |
// Load byte. |
| 1580 |
void ldrb(const Register& rt, const MemOperand& src, |
| 1581 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 1582 |
|
| 1583 |
// Store byte. |
| 1584 |
void strb(const Register& rt, const MemOperand& dst, |
| 1585 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 1586 |
|
| 1587 |
// Load byte with sign extension. |
| 1588 |
void ldrsb(const Register& rt, const MemOperand& src, |
| 1589 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 1590 |
|
| 1591 |
// Load half-word. |
| 1592 |
void ldrh(const Register& rt, const MemOperand& src, |
| 1593 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 1594 |
|
| 1595 |
// Store half-word. |
| 1596 |
void strh(const Register& rt, const MemOperand& dst, |
| 1597 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 1598 |
|
| 1599 |
// Load half-word with sign extension. |
| 1600 |
void ldrsh(const Register& rt, const MemOperand& src, |
| 1601 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 1602 |
|
| 1603 |
// Load integer or FP register (with unscaled offset). |
| 1604 |
void ldur(const CPURegister& rt, const MemOperand& src, |
| 1605 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 1606 |
|
| 1607 |
// Store integer or FP register (with unscaled offset). |
| 1608 |
void stur(const CPURegister& rt, const MemOperand& src, |
| 1609 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 1610 |
|
| 1611 |
// Load word with sign extension. |
| 1612 |
void ldursw(const Register& rt, const MemOperand& src, |
| 1613 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 1614 |
|
| 1615 |
// Load byte (with unscaled offset). |
| 1616 |
void ldurb(const Register& rt, const MemOperand& src, |
| 1617 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 1618 |
|
| 1619 |
// Store byte (with unscaled offset). |
| 1620 |
void sturb(const Register& rt, const MemOperand& dst, |
| 1621 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 1622 |
|
| 1623 |
// Load byte with sign extension (and unscaled offset). |
| 1624 |
void ldursb(const Register& rt, const MemOperand& src, |
| 1625 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 1626 |
|
| 1627 |
// Load half-word (with unscaled offset). |
| 1628 |
void ldurh(const Register& rt, const MemOperand& src, |
| 1629 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 1630 |
|
| 1631 |
// Store half-word (with unscaled offset). |
| 1632 |
void sturh(const Register& rt, const MemOperand& dst, |
| 1633 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 1634 |
|
| 1635 |
// Load half-word with sign extension (and unscaled offset). |
| 1636 |
void ldursh(const Register& rt, const MemOperand& src, |
| 1637 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 1638 |
|
| 1639 |
// Load integer or FP register pair. |
| 1640 |
void ldp(const CPURegister& rt, const CPURegister& rt2, |
| 1641 |
const MemOperand& src); |
| 1642 |
|
| 1643 |
// Store integer or FP register pair. |
| 1644 |
void stp(const CPURegister& rt, const CPURegister& rt2, |
| 1645 |
const MemOperand& dst); |
| 1646 |
|
| 1647 |
// Load word pair with sign extension. |
| 1648 |
void ldpsw(const Register& rt, const Register& rt2, const MemOperand& src); |
| 1649 |
|
| 1650 |
// Load integer or FP register pair, non-temporal. |
| 1651 |
void ldnp(const CPURegister& rt, const CPURegister& rt2, |
| 1652 |
const MemOperand& src); |
| 1653 |
|
| 1654 |
// Store integer or FP register pair, non-temporal. |
| 1655 |
void stnp(const CPURegister& rt, const CPURegister& rt2, |
| 1656 |
const MemOperand& dst); |
| 1657 |
|
| 1658 |
// Load integer or FP register from pc + imm19 << 2. |
| 1659 |
void ldr(const CPURegister& rt, int imm19); |
| 1660 |
static void ldr(Instruction* at, const CPURegister& rt, int imm19); |
| 1661 |
|
| 1662 |
// Load word with sign extension from pc + imm19 << 2. |
| 1663 |
void ldrsw(const Register& rt, int imm19); |
| 1664 |
static void ldrsw(Instruction* at, const CPURegister& rt, int imm19); |
| 1665 |
|
| 1666 |
// Store exclusive byte. |
| 1667 |
void stxrb(const Register& rs, const Register& rt, const MemOperand& dst); |
| 1668 |
|
| 1669 |
// Store exclusive half-word. |
| 1670 |
void stxrh(const Register& rs, const Register& rt, const MemOperand& dst); |
| 1671 |
|
| 1672 |
// Store exclusive register. |
| 1673 |
void stxr(const Register& rs, const Register& rt, const MemOperand& dst); |
| 1674 |
|
| 1675 |
// Load exclusive byte. |
| 1676 |
void ldxrb(const Register& rt, const MemOperand& src); |
| 1677 |
|
| 1678 |
// Load exclusive half-word. |
| 1679 |
void ldxrh(const Register& rt, const MemOperand& src); |
| 1680 |
|
| 1681 |
// Load exclusive register. |
| 1682 |
void ldxr(const Register& rt, const MemOperand& src); |
| 1683 |
|
| 1684 |
// Store exclusive register pair. |
| 1685 |
void stxp(const Register& rs, |
| 1686 |
const Register& rt, |
| 1687 |
const Register& rt2, |
| 1688 |
const MemOperand& dst); |
| 1689 |
|
| 1690 |
// Load exclusive register pair. |
| 1691 |
void ldxp(const Register& rt, const Register& rt2, const MemOperand& src); |
| 1692 |
|
| 1693 |
// Store-release exclusive byte. |
| 1694 |
void stlxrb(const Register& rs, const Register& rt, const MemOperand& dst); |
| 1695 |
|
| 1696 |
// Store-release exclusive half-word. |
| 1697 |
void stlxrh(const Register& rs, const Register& rt, const MemOperand& dst); |
| 1698 |
|
| 1699 |
// Store-release exclusive register. |
| 1700 |
void stlxr(const Register& rs, const Register& rt, const MemOperand& dst); |
| 1701 |
|
| 1702 |
// Load-acquire exclusive byte. |
| 1703 |
void ldaxrb(const Register& rt, const MemOperand& src); |
| 1704 |
|
| 1705 |
// Load-acquire exclusive half-word. |
| 1706 |
void ldaxrh(const Register& rt, const MemOperand& src); |
| 1707 |
|
| 1708 |
// Load-acquire exclusive register. |
| 1709 |
void ldaxr(const Register& rt, const MemOperand& src); |
| 1710 |
|
| 1711 |
// Store-release exclusive register pair. |
| 1712 |
void stlxp(const Register& rs, |
| 1713 |
const Register& rt, |
| 1714 |
const Register& rt2, |
| 1715 |
const MemOperand& dst); |
| 1716 |
|
| 1717 |
// Load-acquire exclusive register pair. |
| 1718 |
void ldaxp(const Register& rt, const Register& rt2, const MemOperand& src); |
| 1719 |
|
| 1720 |
// Store-release byte. |
| 1721 |
void stlrb(const Register& rt, const MemOperand& dst); |
| 1722 |
|
| 1723 |
// Store-release half-word. |
| 1724 |
void stlrh(const Register& rt, const MemOperand& dst); |
| 1725 |
|
| 1726 |
// Store-release register. |
| 1727 |
void stlr(const Register& rt, const MemOperand& dst); |
| 1728 |
|
| 1729 |
// Load-acquire byte. |
| 1730 |
void ldarb(const Register& rt, const MemOperand& src); |
| 1731 |
|
| 1732 |
// Load-acquire half-word. |
| 1733 |
void ldarh(const Register& rt, const MemOperand& src); |
| 1734 |
|
| 1735 |
// Load-acquire register. |
| 1736 |
void ldar(const Register& rt, const MemOperand& src); |
| 1737 |
|
| 1738 |
// Compare and Swap word or doubleword in memory [Armv8.1]. |
| 1739 |
void cas(const Register& rs, const Register& rt, const MemOperand& src); |
| 1740 |
|
| 1741 |
// Compare and Swap word or doubleword in memory [Armv8.1]. |
| 1742 |
void casa(const Register& rs, const Register& rt, const MemOperand& src); |
| 1743 |
|
| 1744 |
// Compare and Swap word or doubleword in memory [Armv8.1]. |
| 1745 |
void casl(const Register& rs, const Register& rt, const MemOperand& src); |
| 1746 |
|
| 1747 |
// Compare and Swap word or doubleword in memory [Armv8.1]. |
| 1748 |
void casal(const Register& rs, const Register& rt, const MemOperand& src); |
| 1749 |
|
| 1750 |
// Compare and Swap byte in memory [Armv8.1]. |
| 1751 |
void casb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1752 |
|
| 1753 |
// Compare and Swap byte in memory [Armv8.1]. |
| 1754 |
void casab(const Register& rs, const Register& rt, const MemOperand& src); |
| 1755 |
|
| 1756 |
// Compare and Swap byte in memory [Armv8.1]. |
| 1757 |
void caslb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1758 |
|
| 1759 |
// Compare and Swap byte in memory [Armv8.1]. |
| 1760 |
void casalb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1761 |
|
| 1762 |
// Compare and Swap halfword in memory [Armv8.1]. |
| 1763 |
void cash(const Register& rs, const Register& rt, const MemOperand& src); |
| 1764 |
|
| 1765 |
// Compare and Swap halfword in memory [Armv8.1]. |
| 1766 |
void casah(const Register& rs, const Register& rt, const MemOperand& src); |
| 1767 |
|
| 1768 |
// Compare and Swap halfword in memory [Armv8.1]. |
| 1769 |
void caslh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1770 |
|
| 1771 |
// Compare and Swap halfword in memory [Armv8.1]. |
| 1772 |
void casalh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1773 |
|
| 1774 |
// Compare and Swap Pair of words or doublewords in memory [Armv8.1]. |
| 1775 |
void casp(const Register& rs, |
| 1776 |
const Register& rs2, |
| 1777 |
const Register& rt, |
| 1778 |
const Register& rt2, |
| 1779 |
const MemOperand& src); |
| 1780 |
|
| 1781 |
// Compare and Swap Pair of words or doublewords in memory [Armv8.1]. |
| 1782 |
void caspa(const Register& rs, |
| 1783 |
const Register& rs2, |
| 1784 |
const Register& rt, |
| 1785 |
const Register& rt2, |
| 1786 |
const MemOperand& src); |
| 1787 |
|
| 1788 |
// Compare and Swap Pair of words or doublewords in memory [Armv8.1]. |
| 1789 |
void caspl(const Register& rs, |
| 1790 |
const Register& rs2, |
| 1791 |
const Register& rt, |
| 1792 |
const Register& rt2, |
| 1793 |
const MemOperand& src); |
| 1794 |
|
| 1795 |
// Compare and Swap Pair of words or doublewords in memory [Armv8.1]. |
| 1796 |
void caspal(const Register& rs, |
| 1797 |
const Register& rs2, |
| 1798 |
const Register& rt, |
| 1799 |
const Register& rt2, |
| 1800 |
const MemOperand& src); |
| 1801 |
|
| 1802 |
// Atomic add on byte in memory [Armv8.1] |
| 1803 |
void ldaddb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1804 |
|
| 1805 |
// Atomic add on byte in memory, with Load-acquire semantics [Armv8.1] |
| 1806 |
void ldaddab(const Register& rs, const Register& rt, const MemOperand& src); |
| 1807 |
|
| 1808 |
// Atomic add on byte in memory, with Store-release semantics [Armv8.1] |
| 1809 |
void ldaddlb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1810 |
|
| 1811 |
// Atomic add on byte in memory, with Load-acquire and Store-release semantics |
| 1812 |
// [Armv8.1] |
| 1813 |
void ldaddalb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1814 |
|
| 1815 |
// Atomic add on halfword in memory [Armv8.1] |
| 1816 |
void ldaddh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1817 |
|
| 1818 |
// Atomic add on halfword in memory, with Load-acquire semantics [Armv8.1] |
| 1819 |
void ldaddah(const Register& rs, const Register& rt, const MemOperand& src); |
| 1820 |
|
| 1821 |
// Atomic add on halfword in memory, with Store-release semantics [Armv8.1] |
| 1822 |
void ldaddlh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1823 |
|
| 1824 |
// Atomic add on halfword in memory, with Load-acquire and Store-release |
| 1825 |
// semantics [Armv8.1] |
| 1826 |
void ldaddalh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1827 |
|
| 1828 |
// Atomic add on word or doubleword in memory [Armv8.1] |
| 1829 |
void ldadd(const Register& rs, const Register& rt, const MemOperand& src); |
| 1830 |
|
| 1831 |
// Atomic add on word or doubleword in memory, with Load-acquire semantics |
| 1832 |
// [Armv8.1] |
| 1833 |
void ldadda(const Register& rs, const Register& rt, const MemOperand& src); |
| 1834 |
|
| 1835 |
// Atomic add on word or doubleword in memory, with Store-release semantics |
| 1836 |
// [Armv8.1] |
| 1837 |
void ldaddl(const Register& rs, const Register& rt, const MemOperand& src); |
| 1838 |
|
| 1839 |
// Atomic add on word or doubleword in memory, with Load-acquire and |
| 1840 |
// Store-release semantics [Armv8.1] |
| 1841 |
void ldaddal(const Register& rs, const Register& rt, const MemOperand& src); |
| 1842 |
|
| 1843 |
// Atomic bit clear on byte in memory [Armv8.1] |
| 1844 |
void ldclrb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1845 |
|
| 1846 |
// Atomic bit clear on byte in memory, with Load-acquire semantics [Armv8.1] |
| 1847 |
void ldclrab(const Register& rs, const Register& rt, const MemOperand& src); |
| 1848 |
|
| 1849 |
// Atomic bit clear on byte in memory, with Store-release semantics [Armv8.1] |
| 1850 |
void ldclrlb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1851 |
|
| 1852 |
// Atomic bit clear on byte in memory, with Load-acquire and Store-release |
| 1853 |
// semantics [Armv8.1] |
| 1854 |
void ldclralb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1855 |
|
| 1856 |
// Atomic bit clear on halfword in memory [Armv8.1] |
| 1857 |
void ldclrh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1858 |
|
| 1859 |
// Atomic bit clear on halfword in memory, with Load-acquire semantics |
| 1860 |
// [Armv8.1] |
| 1861 |
void ldclrah(const Register& rs, const Register& rt, const MemOperand& src); |
| 1862 |
|
| 1863 |
// Atomic bit clear on halfword in memory, with Store-release semantics |
| 1864 |
// [Armv8.1] |
| 1865 |
void ldclrlh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1866 |
|
| 1867 |
// Atomic bit clear on halfword in memory, with Load-acquire and Store-release |
| 1868 |
// semantics [Armv8.1] |
| 1869 |
void ldclralh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1870 |
|
| 1871 |
// Atomic bit clear on word or doubleword in memory [Armv8.1] |
| 1872 |
void ldclr(const Register& rs, const Register& rt, const MemOperand& src); |
| 1873 |
|
| 1874 |
// Atomic bit clear on word or doubleword in memory, with Load-acquire |
| 1875 |
// semantics [Armv8.1] |
| 1876 |
void ldclra(const Register& rs, const Register& rt, const MemOperand& src); |
| 1877 |
|
| 1878 |
// Atomic bit clear on word or doubleword in memory, with Store-release |
| 1879 |
// semantics [Armv8.1] |
| 1880 |
void ldclrl(const Register& rs, const Register& rt, const MemOperand& src); |
| 1881 |
|
| 1882 |
// Atomic bit clear on word or doubleword in memory, with Load-acquire and |
| 1883 |
// Store-release semantics [Armv8.1] |
| 1884 |
void ldclral(const Register& rs, const Register& rt, const MemOperand& src); |
| 1885 |
|
| 1886 |
// Atomic exclusive OR on byte in memory [Armv8.1] |
| 1887 |
void ldeorb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1888 |
|
| 1889 |
// Atomic exclusive OR on byte in memory, with Load-acquire semantics |
| 1890 |
// [Armv8.1] |
| 1891 |
void ldeorab(const Register& rs, const Register& rt, const MemOperand& src); |
| 1892 |
|
| 1893 |
// Atomic exclusive OR on byte in memory, with Store-release semantics |
| 1894 |
// [Armv8.1] |
| 1895 |
void ldeorlb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1896 |
|
| 1897 |
// Atomic exclusive OR on byte in memory, with Load-acquire and Store-release |
| 1898 |
// semantics [Armv8.1] |
| 1899 |
void ldeoralb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1900 |
|
| 1901 |
// Atomic exclusive OR on halfword in memory [Armv8.1] |
| 1902 |
void ldeorh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1903 |
|
| 1904 |
// Atomic exclusive OR on halfword in memory, with Load-acquire semantics |
| 1905 |
// [Armv8.1] |
| 1906 |
void ldeorah(const Register& rs, const Register& rt, const MemOperand& src); |
| 1907 |
|
| 1908 |
// Atomic exclusive OR on halfword in memory, with Store-release semantics |
| 1909 |
// [Armv8.1] |
| 1910 |
void ldeorlh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1911 |
|
| 1912 |
// Atomic exclusive OR on halfword in memory, with Load-acquire and |
| 1913 |
// Store-release semantics [Armv8.1] |
| 1914 |
void ldeoralh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1915 |
|
| 1916 |
// Atomic exclusive OR on word or doubleword in memory [Armv8.1] |
| 1917 |
void ldeor(const Register& rs, const Register& rt, const MemOperand& src); |
| 1918 |
|
| 1919 |
// Atomic exclusive OR on word or doubleword in memory, with Load-acquire |
| 1920 |
// semantics [Armv8.1] |
| 1921 |
void ldeora(const Register& rs, const Register& rt, const MemOperand& src); |
| 1922 |
|
| 1923 |
// Atomic exclusive OR on word or doubleword in memory, with Store-release |
| 1924 |
// semantics [Armv8.1] |
| 1925 |
void ldeorl(const Register& rs, const Register& rt, const MemOperand& src); |
| 1926 |
|
| 1927 |
// Atomic exclusive OR on word or doubleword in memory, with Load-acquire and |
| 1928 |
// Store-release semantics [Armv8.1] |
| 1929 |
void ldeoral(const Register& rs, const Register& rt, const MemOperand& src); |
| 1930 |
|
| 1931 |
// Atomic bit set on byte in memory [Armv8.1] |
| 1932 |
void ldsetb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1933 |
|
| 1934 |
// Atomic bit set on byte in memory, with Load-acquire semantics [Armv8.1] |
| 1935 |
void ldsetab(const Register& rs, const Register& rt, const MemOperand& src); |
| 1936 |
|
| 1937 |
// Atomic bit set on byte in memory, with Store-release semantics [Armv8.1] |
| 1938 |
void ldsetlb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1939 |
|
| 1940 |
// Atomic bit set on byte in memory, with Load-acquire and Store-release |
| 1941 |
// semantics [Armv8.1] |
| 1942 |
void ldsetalb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1943 |
|
| 1944 |
// Atomic bit set on halfword in memory [Armv8.1] |
| 1945 |
void ldseth(const Register& rs, const Register& rt, const MemOperand& src); |
| 1946 |
|
| 1947 |
// Atomic bit set on halfword in memory, with Load-acquire semantics [Armv8.1] |
| 1948 |
void ldsetah(const Register& rs, const Register& rt, const MemOperand& src); |
| 1949 |
|
| 1950 |
// Atomic bit set on halfword in memory, with Store-release semantics |
| 1951 |
// [Armv8.1] |
| 1952 |
void ldsetlh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1953 |
|
| 1954 |
// Atomic bit set on halfword in memory, with Load-acquire and Store-release |
| 1955 |
// semantics [Armv8.1] |
| 1956 |
void ldsetalh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1957 |
|
| 1958 |
// Atomic bit set on word or doubleword in memory [Armv8.1] |
| 1959 |
void ldset(const Register& rs, const Register& rt, const MemOperand& src); |
| 1960 |
|
| 1961 |
// Atomic bit set on word or doubleword in memory, with Load-acquire semantics |
| 1962 |
// [Armv8.1] |
| 1963 |
void ldseta(const Register& rs, const Register& rt, const MemOperand& src); |
| 1964 |
|
| 1965 |
// Atomic bit set on word or doubleword in memory, with Store-release |
| 1966 |
// semantics [Armv8.1] |
| 1967 |
void ldsetl(const Register& rs, const Register& rt, const MemOperand& src); |
| 1968 |
|
| 1969 |
// Atomic bit set on word or doubleword in memory, with Load-acquire and |
| 1970 |
// Store-release semantics [Armv8.1] |
| 1971 |
void ldsetal(const Register& rs, const Register& rt, const MemOperand& src); |
| 1972 |
|
| 1973 |
// Atomic signed maximum on byte in memory [Armv8.1] |
| 1974 |
void ldsmaxb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1975 |
|
| 1976 |
// Atomic signed maximum on byte in memory, with Load-acquire semantics |
| 1977 |
// [Armv8.1] |
| 1978 |
void ldsmaxab(const Register& rs, const Register& rt, const MemOperand& src); |
| 1979 |
|
| 1980 |
// Atomic signed maximum on byte in memory, with Store-release semantics |
| 1981 |
// [Armv8.1] |
| 1982 |
void ldsmaxlb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1983 |
|
| 1984 |
// Atomic signed maximum on byte in memory, with Load-acquire and |
| 1985 |
// Store-release semantics [Armv8.1] |
| 1986 |
void ldsmaxalb(const Register& rs, const Register& rt, const MemOperand& src); |
| 1987 |
|
| 1988 |
// Atomic signed maximum on halfword in memory [Armv8.1] |
| 1989 |
void ldsmaxh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1990 |
|
| 1991 |
// Atomic signed maximum on halfword in memory, with Load-acquire semantics |
| 1992 |
// [Armv8.1] |
| 1993 |
void ldsmaxah(const Register& rs, const Register& rt, const MemOperand& src); |
| 1994 |
|
| 1995 |
// Atomic signed maximum on halfword in memory, with Store-release semantics |
| 1996 |
// [Armv8.1] |
| 1997 |
void ldsmaxlh(const Register& rs, const Register& rt, const MemOperand& src); |
| 1998 |
|
| 1999 |
// Atomic signed maximum on halfword in memory, with Load-acquire and |
| 2000 |
// Store-release semantics [Armv8.1] |
| 2001 |
void ldsmaxalh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2002 |
|
| 2003 |
// Atomic signed maximum on word or doubleword in memory [Armv8.1] |
| 2004 |
void ldsmax(const Register& rs, const Register& rt, const MemOperand& src); |
| 2005 |
|
| 2006 |
// Atomic signed maximum on word or doubleword in memory, with Load-acquire |
| 2007 |
// semantics [Armv8.1] |
| 2008 |
void ldsmaxa(const Register& rs, const Register& rt, const MemOperand& src); |
| 2009 |
|
| 2010 |
// Atomic signed maximum on word or doubleword in memory, with Store-release |
| 2011 |
// semantics [Armv8.1] |
| 2012 |
void ldsmaxl(const Register& rs, const Register& rt, const MemOperand& src); |
| 2013 |
|
| 2014 |
// Atomic signed maximum on word or doubleword in memory, with Load-acquire |
| 2015 |
// and Store-release semantics [Armv8.1] |
| 2016 |
void ldsmaxal(const Register& rs, const Register& rt, const MemOperand& src); |
| 2017 |
|
| 2018 |
// Atomic signed minimum on byte in memory [Armv8.1] |
| 2019 |
void ldsminb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2020 |
|
| 2021 |
// Atomic signed minimum on byte in memory, with Load-acquire semantics |
| 2022 |
// [Armv8.1] |
| 2023 |
void ldsminab(const Register& rs, const Register& rt, const MemOperand& src); |
| 2024 |
|
| 2025 |
// Atomic signed minimum on byte in memory, with Store-release semantics |
| 2026 |
// [Armv8.1] |
| 2027 |
void ldsminlb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2028 |
|
| 2029 |
// Atomic signed minimum on byte in memory, with Load-acquire and |
| 2030 |
// Store-release semantics [Armv8.1] |
| 2031 |
void ldsminalb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2032 |
|
| 2033 |
// Atomic signed minimum on halfword in memory [Armv8.1] |
| 2034 |
void ldsminh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2035 |
|
| 2036 |
// Atomic signed minimum on halfword in memory, with Load-acquire semantics |
| 2037 |
// [Armv8.1] |
| 2038 |
void ldsminah(const Register& rs, const Register& rt, const MemOperand& src); |
| 2039 |
|
| 2040 |
// Atomic signed minimum on halfword in memory, with Store-release semantics |
| 2041 |
// [Armv8.1] |
| 2042 |
void ldsminlh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2043 |
|
| 2044 |
// Atomic signed minimum on halfword in memory, with Load-acquire and |
| 2045 |
// Store-release semantics [Armv8.1] |
| 2046 |
void ldsminalh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2047 |
|
| 2048 |
// Atomic signed minimum on word or doubleword in memory [Armv8.1] |
| 2049 |
void ldsmin(const Register& rs, const Register& rt, const MemOperand& src); |
| 2050 |
|
| 2051 |
// Atomic signed minimum on word or doubleword in memory, with Load-acquire |
| 2052 |
// semantics [Armv8.1] |
| 2053 |
void ldsmina(const Register& rs, const Register& rt, const MemOperand& src); |
| 2054 |
|
| 2055 |
// Atomic signed minimum on word or doubleword in memory, with Store-release |
| 2056 |
// semantics [Armv8.1] |
| 2057 |
void ldsminl(const Register& rs, const Register& rt, const MemOperand& src); |
| 2058 |
|
| 2059 |
// Atomic signed minimum on word or doubleword in memory, with Load-acquire |
| 2060 |
// and Store-release semantics [Armv8.1] |
| 2061 |
void ldsminal(const Register& rs, const Register& rt, const MemOperand& src); |
| 2062 |
|
| 2063 |
// Atomic unsigned maximum on byte in memory [Armv8.1] |
| 2064 |
void ldumaxb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2065 |
|
| 2066 |
// Atomic unsigned maximum on byte in memory, with Load-acquire semantics |
| 2067 |
// [Armv8.1] |
| 2068 |
void ldumaxab(const Register& rs, const Register& rt, const MemOperand& src); |
| 2069 |
|
| 2070 |
// Atomic unsigned maximum on byte in memory, with Store-release semantics |
| 2071 |
// [Armv8.1] |
| 2072 |
void ldumaxlb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2073 |
|
| 2074 |
// Atomic unsigned maximum on byte in memory, with Load-acquire and |
| 2075 |
// Store-release semantics [Armv8.1] |
| 2076 |
void ldumaxalb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2077 |
|
| 2078 |
// Atomic unsigned maximum on halfword in memory [Armv8.1] |
| 2079 |
void ldumaxh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2080 |
|
| 2081 |
// Atomic unsigned maximum on halfword in memory, with Load-acquire semantics |
| 2082 |
// [Armv8.1] |
| 2083 |
void ldumaxah(const Register& rs, const Register& rt, const MemOperand& src); |
| 2084 |
|
| 2085 |
// Atomic unsigned maximum on halfword in memory, with Store-release semantics |
| 2086 |
// [Armv8.1] |
| 2087 |
void ldumaxlh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2088 |
|
| 2089 |
// Atomic unsigned maximum on halfword in memory, with Load-acquire and |
| 2090 |
// Store-release semantics [Armv8.1] |
| 2091 |
void ldumaxalh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2092 |
|
| 2093 |
// Atomic unsigned maximum on word or doubleword in memory [Armv8.1] |
| 2094 |
void ldumax(const Register& rs, const Register& rt, const MemOperand& src); |
| 2095 |
|
| 2096 |
// Atomic unsigned maximum on word or doubleword in memory, with Load-acquire |
| 2097 |
// semantics [Armv8.1] |
| 2098 |
void ldumaxa(const Register& rs, const Register& rt, const MemOperand& src); |
| 2099 |
|
| 2100 |
// Atomic unsigned maximum on word or doubleword in memory, with Store-release |
| 2101 |
// semantics [Armv8.1] |
| 2102 |
void ldumaxl(const Register& rs, const Register& rt, const MemOperand& src); |
| 2103 |
|
| 2104 |
// Atomic unsigned maximum on word or doubleword in memory, with Load-acquire |
| 2105 |
// and Store-release semantics [Armv8.1] |
| 2106 |
void ldumaxal(const Register& rs, const Register& rt, const MemOperand& src); |
| 2107 |
|
| 2108 |
// Atomic unsigned minimum on byte in memory [Armv8.1] |
| 2109 |
void lduminb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2110 |
|
| 2111 |
// Atomic unsigned minimum on byte in memory, with Load-acquire semantics |
| 2112 |
// [Armv8.1] |
| 2113 |
void lduminab(const Register& rs, const Register& rt, const MemOperand& src); |
| 2114 |
|
| 2115 |
// Atomic unsigned minimum on byte in memory, with Store-release semantics |
| 2116 |
// [Armv8.1] |
| 2117 |
void lduminlb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2118 |
|
| 2119 |
// Atomic unsigned minimum on byte in memory, with Load-acquire and |
| 2120 |
// Store-release semantics [Armv8.1] |
| 2121 |
void lduminalb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2122 |
|
| 2123 |
// Atomic unsigned minimum on halfword in memory [Armv8.1] |
| 2124 |
void lduminh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2125 |
|
| 2126 |
// Atomic unsigned minimum on halfword in memory, with Load-acquire semantics |
| 2127 |
// [Armv8.1] |
| 2128 |
void lduminah(const Register& rs, const Register& rt, const MemOperand& src); |
| 2129 |
|
| 2130 |
// Atomic unsigned minimum on halfword in memory, with Store-release semantics |
| 2131 |
// [Armv8.1] |
| 2132 |
void lduminlh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2133 |
|
| 2134 |
// Atomic unsigned minimum on halfword in memory, with Load-acquire and |
| 2135 |
// Store-release semantics [Armv8.1] |
| 2136 |
void lduminalh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2137 |
|
| 2138 |
// Atomic unsigned minimum on word or doubleword in memory [Armv8.1] |
| 2139 |
void ldumin(const Register& rs, const Register& rt, const MemOperand& src); |
| 2140 |
|
| 2141 |
// Atomic unsigned minimum on word or doubleword in memory, with Load-acquire |
| 2142 |
// semantics [Armv8.1] |
| 2143 |
void ldumina(const Register& rs, const Register& rt, const MemOperand& src); |
| 2144 |
|
| 2145 |
// Atomic unsigned minimum on word or doubleword in memory, with Store-release |
| 2146 |
// semantics [Armv8.1] |
| 2147 |
void lduminl(const Register& rs, const Register& rt, const MemOperand& src); |
| 2148 |
|
| 2149 |
// Atomic unsigned minimum on word or doubleword in memory, with Load-acquire |
| 2150 |
// and Store-release semantics [Armv8.1] |
| 2151 |
void lduminal(const Register& rs, const Register& rt, const MemOperand& src); |
| 2152 |
|
| 2153 |
// Atomic add on byte in memory, without return. [Armv8.1] |
| 2154 |
void staddb(const Register& rs, const MemOperand& src); |
| 2155 |
|
| 2156 |
// Atomic add on byte in memory, with Store-release semantics and without |
| 2157 |
// return. [Armv8.1] |
| 2158 |
void staddlb(const Register& rs, const MemOperand& src); |
| 2159 |
|
| 2160 |
// Atomic add on halfword in memory, without return. [Armv8.1] |
| 2161 |
void staddh(const Register& rs, const MemOperand& src); |
| 2162 |
|
| 2163 |
// Atomic add on halfword in memory, with Store-release semantics and without |
| 2164 |
// return. [Armv8.1] |
| 2165 |
void staddlh(const Register& rs, const MemOperand& src); |
| 2166 |
|
| 2167 |
// Atomic add on word or doubleword in memory, without return. [Armv8.1] |
| 2168 |
void stadd(const Register& rs, const MemOperand& src); |
| 2169 |
|
| 2170 |
// Atomic add on word or doubleword in memory, with Store-release semantics |
| 2171 |
// and without return. [Armv8.1] |
| 2172 |
void staddl(const Register& rs, const MemOperand& src); |
| 2173 |
|
| 2174 |
// Atomic bit clear on byte in memory, without return. [Armv8.1] |
| 2175 |
void stclrb(const Register& rs, const MemOperand& src); |
| 2176 |
|
| 2177 |
// Atomic bit clear on byte in memory, with Store-release semantics and |
| 2178 |
// without return. [Armv8.1] |
| 2179 |
void stclrlb(const Register& rs, const MemOperand& src); |
| 2180 |
|
| 2181 |
// Atomic bit clear on halfword in memory, without return. [Armv8.1] |
| 2182 |
void stclrh(const Register& rs, const MemOperand& src); |
| 2183 |
|
| 2184 |
// Atomic bit clear on halfword in memory, with Store-release semantics and |
| 2185 |
// without return. [Armv8.1] |
| 2186 |
void stclrlh(const Register& rs, const MemOperand& src); |
| 2187 |
|
| 2188 |
// Atomic bit clear on word or doubleword in memory, without return. [Armv8.1] |
| 2189 |
void stclr(const Register& rs, const MemOperand& src); |
| 2190 |
|
| 2191 |
// Atomic bit clear on word or doubleword in memory, with Store-release |
| 2192 |
// semantics and without return. [Armv8.1] |
| 2193 |
void stclrl(const Register& rs, const MemOperand& src); |
| 2194 |
|
| 2195 |
// Atomic exclusive OR on byte in memory, without return. [Armv8.1] |
| 2196 |
void steorb(const Register& rs, const MemOperand& src); |
| 2197 |
|
| 2198 |
// Atomic exclusive OR on byte in memory, with Store-release semantics and |
| 2199 |
// without return. [Armv8.1] |
| 2200 |
void steorlb(const Register& rs, const MemOperand& src); |
| 2201 |
|
| 2202 |
// Atomic exclusive OR on halfword in memory, without return. [Armv8.1] |
| 2203 |
void steorh(const Register& rs, const MemOperand& src); |
| 2204 |
|
| 2205 |
// Atomic exclusive OR on halfword in memory, with Store-release semantics |
| 2206 |
// and without return. [Armv8.1] |
| 2207 |
void steorlh(const Register& rs, const MemOperand& src); |
| 2208 |
|
| 2209 |
// Atomic exclusive OR on word or doubleword in memory, without return. |
| 2210 |
// [Armv8.1] |
| 2211 |
void steor(const Register& rs, const MemOperand& src); |
| 2212 |
|
| 2213 |
// Atomic exclusive OR on word or doubleword in memory, with Store-release |
| 2214 |
// semantics and without return. [Armv8.1] |
| 2215 |
void steorl(const Register& rs, const MemOperand& src); |
| 2216 |
|
| 2217 |
// Atomic bit set on byte in memory, without return. [Armv8.1] |
| 2218 |
void stsetb(const Register& rs, const MemOperand& src); |
| 2219 |
|
| 2220 |
// Atomic bit set on byte in memory, with Store-release semantics and without |
| 2221 |
// return. [Armv8.1] |
| 2222 |
void stsetlb(const Register& rs, const MemOperand& src); |
| 2223 |
|
| 2224 |
// Atomic bit set on halfword in memory, without return. [Armv8.1] |
| 2225 |
void stseth(const Register& rs, const MemOperand& src); |
| 2226 |
|
| 2227 |
// Atomic bit set on halfword in memory, with Store-release semantics and |
| 2228 |
// without return. [Armv8.1] |
| 2229 |
void stsetlh(const Register& rs, const MemOperand& src); |
| 2230 |
|
| 2231 |
// Atomic bit set on word or doubleword in memory, without return. [Armv8.1] |
| 2232 |
void stset(const Register& rs, const MemOperand& src); |
| 2233 |
|
| 2234 |
// Atomic bit set on word or doubleword in memory, with Store-release |
| 2235 |
// semantics and without return. [Armv8.1] |
| 2236 |
void stsetl(const Register& rs, const MemOperand& src); |
| 2237 |
|
| 2238 |
// Atomic signed maximum on byte in memory, without return. [Armv8.1] |
| 2239 |
void stsmaxb(const Register& rs, const MemOperand& src); |
| 2240 |
|
| 2241 |
// Atomic signed maximum on byte in memory, with Store-release semantics and |
| 2242 |
// without return. [Armv8.1] |
| 2243 |
void stsmaxlb(const Register& rs, const MemOperand& src); |
| 2244 |
|
| 2245 |
// Atomic signed maximum on halfword in memory, without return. [Armv8.1] |
| 2246 |
void stsmaxh(const Register& rs, const MemOperand& src); |
| 2247 |
|
| 2248 |
// Atomic signed maximum on halfword in memory, with Store-release semantics |
| 2249 |
// and without return. [Armv8.1] |
| 2250 |
void stsmaxlh(const Register& rs, const MemOperand& src); |
| 2251 |
|
| 2252 |
// Atomic signed maximum on word or doubleword in memory, without return. |
| 2253 |
// [Armv8.1] |
| 2254 |
void stsmax(const Register& rs, const MemOperand& src); |
| 2255 |
|
| 2256 |
// Atomic signed maximum on word or doubleword in memory, with Store-release |
| 2257 |
// semantics and without return. [Armv8.1] |
| 2258 |
void stsmaxl(const Register& rs, const MemOperand& src); |
| 2259 |
|
| 2260 |
// Atomic signed minimum on byte in memory, without return. [Armv8.1] |
| 2261 |
void stsminb(const Register& rs, const MemOperand& src); |
| 2262 |
|
| 2263 |
// Atomic signed minimum on byte in memory, with Store-release semantics and |
| 2264 |
// without return. [Armv8.1] |
| 2265 |
void stsminlb(const Register& rs, const MemOperand& src); |
| 2266 |
|
| 2267 |
// Atomic signed minimum on halfword in memory, without return. [Armv8.1] |
| 2268 |
void stsminh(const Register& rs, const MemOperand& src); |
| 2269 |
|
| 2270 |
// Atomic signed minimum on halfword in memory, with Store-release semantics |
| 2271 |
// and without return. [Armv8.1] |
| 2272 |
void stsminlh(const Register& rs, const MemOperand& src); |
| 2273 |
|
| 2274 |
// Atomic signed minimum on word or doubleword in memory, without return. |
| 2275 |
// [Armv8.1] |
| 2276 |
void stsmin(const Register& rs, const MemOperand& src); |
| 2277 |
|
| 2278 |
// Atomic signed minimum on word or doubleword in memory, with Store-release |
| 2279 |
// semantics and without return. semantics [Armv8.1] |
| 2280 |
void stsminl(const Register& rs, const MemOperand& src); |
| 2281 |
|
| 2282 |
// Atomic unsigned maximum on byte in memory, without return. [Armv8.1] |
| 2283 |
void stumaxb(const Register& rs, const MemOperand& src); |
| 2284 |
|
| 2285 |
// Atomic unsigned maximum on byte in memory, with Store-release semantics and |
| 2286 |
// without return. [Armv8.1] |
| 2287 |
void stumaxlb(const Register& rs, const MemOperand& src); |
| 2288 |
|
| 2289 |
// Atomic unsigned maximum on halfword in memory, without return. [Armv8.1] |
| 2290 |
void stumaxh(const Register& rs, const MemOperand& src); |
| 2291 |
|
| 2292 |
// Atomic unsigned maximum on halfword in memory, with Store-release semantics |
| 2293 |
// and without return. [Armv8.1] |
| 2294 |
void stumaxlh(const Register& rs, const MemOperand& src); |
| 2295 |
|
| 2296 |
// Atomic unsigned maximum on word or doubleword in memory, without return. |
| 2297 |
// [Armv8.1] |
| 2298 |
void stumax(const Register& rs, const MemOperand& src); |
| 2299 |
|
| 2300 |
// Atomic unsigned maximum on word or doubleword in memory, with Store-release |
| 2301 |
// semantics and without return. [Armv8.1] |
| 2302 |
void stumaxl(const Register& rs, const MemOperand& src); |
| 2303 |
|
| 2304 |
// Atomic unsigned minimum on byte in memory, without return. [Armv8.1] |
| 2305 |
void stuminb(const Register& rs, const MemOperand& src); |
| 2306 |
|
| 2307 |
// Atomic unsigned minimum on byte in memory, with Store-release semantics and |
| 2308 |
// without return. [Armv8.1] |
| 2309 |
void stuminlb(const Register& rs, const MemOperand& src); |
| 2310 |
|
| 2311 |
// Atomic unsigned minimum on halfword in memory, without return. [Armv8.1] |
| 2312 |
void stuminh(const Register& rs, const MemOperand& src); |
| 2313 |
|
| 2314 |
// Atomic unsigned minimum on halfword in memory, with Store-release semantics |
| 2315 |
// and without return. [Armv8.1] |
| 2316 |
void stuminlh(const Register& rs, const MemOperand& src); |
| 2317 |
|
| 2318 |
// Atomic unsigned minimum on word or doubleword in memory, without return. |
| 2319 |
// [Armv8.1] |
| 2320 |
void stumin(const Register& rs, const MemOperand& src); |
| 2321 |
|
| 2322 |
// Atomic unsigned minimum on word or doubleword in memory, with Store-release |
| 2323 |
// semantics and without return. [Armv8.1] |
| 2324 |
void stuminl(const Register& rs, const MemOperand& src); |
| 2325 |
|
| 2326 |
// Swap byte in memory [Armv8.1] |
| 2327 |
void swpb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2328 |
|
| 2329 |
// Swap byte in memory, with Load-acquire semantics [Armv8.1] |
| 2330 |
void swpab(const Register& rs, const Register& rt, const MemOperand& src); |
| 2331 |
|
| 2332 |
// Swap byte in memory, with Store-release semantics [Armv8.1] |
| 2333 |
void swplb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2334 |
|
| 2335 |
// Swap byte in memory, with Load-acquire and Store-release semantics |
| 2336 |
// [Armv8.1] |
| 2337 |
void swpalb(const Register& rs, const Register& rt, const MemOperand& src); |
| 2338 |
|
| 2339 |
// Swap halfword in memory [Armv8.1] |
| 2340 |
void swph(const Register& rs, const Register& rt, const MemOperand& src); |
| 2341 |
|
| 2342 |
// Swap halfword in memory, with Load-acquire semantics [Armv8.1] |
| 2343 |
void swpah(const Register& rs, const Register& rt, const MemOperand& src); |
| 2344 |
|
| 2345 |
// Swap halfword in memory, with Store-release semantics [Armv8.1] |
| 2346 |
void swplh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2347 |
|
| 2348 |
// Swap halfword in memory, with Load-acquire and Store-release semantics |
| 2349 |
// [Armv8.1] |
| 2350 |
void swpalh(const Register& rs, const Register& rt, const MemOperand& src); |
| 2351 |
|
| 2352 |
// Swap word or doubleword in memory [Armv8.1] |
| 2353 |
void swp(const Register& rs, const Register& rt, const MemOperand& src); |
| 2354 |
|
| 2355 |
// Swap word or doubleword in memory, with Load-acquire semantics [Armv8.1] |
| 2356 |
void swpa(const Register& rs, const Register& rt, const MemOperand& src); |
| 2357 |
|
| 2358 |
// Swap word or doubleword in memory, with Store-release semantics [Armv8.1] |
| 2359 |
void swpl(const Register& rs, const Register& rt, const MemOperand& src); |
| 2360 |
|
| 2361 |
// Swap word or doubleword in memory, with Load-acquire and Store-release |
| 2362 |
// semantics [Armv8.1] |
| 2363 |
void swpal(const Register& rs, const Register& rt, const MemOperand& src); |
| 2364 |
|
| 2365 |
// Prefetch memory. |
| 2366 |
void prfm(PrefetchOperation op, const MemOperand& addr, |
| 2367 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 2368 |
|
| 2369 |
// Prefetch memory (with unscaled offset). |
| 2370 |
void prfum(PrefetchOperation op, const MemOperand& addr, |
| 2371 |
LoadStoreScalingOption option = PreferUnscaledOffset); |
| 2372 |
|
| 2373 |
// Prefetch from pc + imm19 << 2. |
| 2374 |
void prfm(PrefetchOperation op, int imm19); |
| 2375 |
|
| 2376 |
// Move instructions. The default shift of -1 indicates that the move |
| 2377 |
// instruction will calculate an appropriate 16-bit immediate and left shift |
| 2378 |
// that is equal to the 64-bit immediate argument. If an explicit left shift |
| 2379 |
// is specified (0, 16, 32 or 48), the immediate must be a 16-bit value. |
| 2380 |
// |
| 2381 |
// For movk, an explicit shift can be used to indicate which half word should |
| 2382 |
// be overwritten, eg. movk(x0, 0, 0) will overwrite the least-significant |
| 2383 |
// half word with zero, whereas movk(x0, 0, 48) will overwrite the |
| 2384 |
// most-significant. |
| 2385 |
|
| 2386 |
// Move immediate and keep. |
| 2387 |
void movk(const Register& rd, uint64_t imm, int shift = -1) { |
| 2388 |
MoveWide(rd, imm, shift, MOVK); |
| 2389 |
} |
| 2390 |
|
| 2391 |
// Move inverted immediate. |
| 2392 |
void movn(const Register& rd, uint64_t imm, int shift = -1) { |
| 2393 |
MoveWide(rd, imm, shift, MOVN); |
| 2394 |
} |
| 2395 |
|
| 2396 |
// Move immediate. |
| 2397 |
void movz(const Register& rd, uint64_t imm, int shift = -1) { |
| 2398 |
MoveWide(rd, imm, shift, MOVZ); |
| 2399 |
} |
| 2400 |
|
| 2401 |
// Misc instructions. |
| 2402 |
// Monitor debug-mode breakpoint. |
| 2403 |
void brk(int code); |
| 2404 |
|
| 2405 |
// Halting debug-mode breakpoint. |
| 2406 |
void hlt(int code); |
| 2407 |
|
| 2408 |
// Generate exception targeting EL1. |
| 2409 |
void svc(int code); |
| 2410 |
static void svc(Instruction* at, int code); |
| 2411 |
|
| 2412 |
// Move register to register. |
| 2413 |
void mov(const Register& rd, const Register& rn); |
| 2414 |
|
| 2415 |
// Move inverted operand to register. |
| 2416 |
void mvn(const Register& rd, const Operand& operand); |
| 2417 |
|
| 2418 |
// System instructions. |
| 2419 |
// Move to register from system register. |
| 2420 |
void mrs(const Register& rt, SystemRegister sysreg); |
| 2421 |
|
| 2422 |
// Move from register to system register. |
| 2423 |
void msr(SystemRegister sysreg, const Register& rt); |
| 2424 |
|
| 2425 |
// System instruction. |
| 2426 |
void sys(int op1, int crn, int crm, int op2, const Register& rt = xzr); |
| 2427 |
|
| 2428 |
// System instruction with pre-encoded op (op1:crn:crm:op2). |
| 2429 |
void sys(int op, const Register& rt = xzr); |
| 2430 |
|
| 2431 |
// System data cache operation. |
| 2432 |
void dc(DataCacheOp op, const Register& rt); |
| 2433 |
|
| 2434 |
// System instruction cache operation. |
| 2435 |
void ic(InstructionCacheOp op, const Register& rt); |
| 2436 |
|
| 2437 |
// System hint. |
| 2438 |
BufferOffset hint(SystemHint code); |
| 2439 |
static void hint(Instruction* at, SystemHint code); |
| 2440 |
|
| 2441 |
// Clear exclusive monitor. |
| 2442 |
void clrex(int imm4 = 0xf); |
| 2443 |
|
| 2444 |
// Data memory barrier. |
| 2445 |
void dmb(BarrierDomain domain, BarrierType type); |
| 2446 |
|
| 2447 |
// Data synchronization barrier. |
| 2448 |
void dsb(BarrierDomain domain, BarrierType type); |
| 2449 |
|
| 2450 |
// Instruction synchronization barrier. |
| 2451 |
void isb(); |
| 2452 |
|
| 2453 |
// Alias for system instructions. |
| 2454 |
// No-op. |
| 2455 |
BufferOffset nop() { |
| 2456 |
return hint(NOP); |
| 2457 |
} |
| 2458 |
static void nop(Instruction* at); |
| 2459 |
|
| 2460 |
// Alias for system instructions. |
| 2461 |
// Conditional speculation barrier. |
| 2462 |
BufferOffset csdb() { |
| 2463 |
return hint(CSDB); |
| 2464 |
} |
| 2465 |
static void csdb(Instruction* at); |
| 2466 |
|
| 2467 |
// FP and NEON instructions. |
| 2468 |
// Move double precision immediate to FP register. |
| 2469 |
void fmov(const VRegister& vd, double imm); |
| 2470 |
|
| 2471 |
// Move single precision immediate to FP register. |
| 2472 |
void fmov(const VRegister& vd, float imm); |
| 2473 |
|
| 2474 |
// Move FP register to register. |
| 2475 |
void fmov(const Register& rd, const VRegister& fn); |
| 2476 |
|
| 2477 |
// Move register to FP register. |
| 2478 |
void fmov(const VRegister& vd, const Register& rn); |
| 2479 |
|
| 2480 |
// Move FP register to FP register. |
| 2481 |
void fmov(const VRegister& vd, const VRegister& fn); |
| 2482 |
|
| 2483 |
// Move 64-bit register to top half of 128-bit FP register. |
| 2484 |
void fmov(const VRegister& vd, int index, const Register& rn); |
| 2485 |
|
| 2486 |
// Move top half of 128-bit FP register to 64-bit register. |
| 2487 |
void fmov(const Register& rd, const VRegister& vn, int index); |
| 2488 |
|
| 2489 |
// FP add. |
| 2490 |
void fadd(const VRegister& vd, const VRegister& vn, const VRegister& vm); |
| 2491 |
|
| 2492 |
// FP subtract. |
| 2493 |
void fsub(const VRegister& vd, const VRegister& vn, const VRegister& vm); |
| 2494 |
|
| 2495 |
// FP multiply. |
| 2496 |
void fmul(const VRegister& vd, const VRegister& vn, const VRegister& vm); |
| 2497 |
|
| 2498 |
// FP fused multiply-add. |
| 2499 |
void fmadd(const VRegister& vd, |
| 2500 |
const VRegister& vn, |
| 2501 |
const VRegister& vm, |
| 2502 |
const VRegister& va); |
| 2503 |
|
| 2504 |
// FP fused multiply-subtract. |
| 2505 |
void fmsub(const VRegister& vd, |
| 2506 |
const VRegister& vn, |
| 2507 |
const VRegister& vm, |
| 2508 |
const VRegister& va); |
| 2509 |
|
| 2510 |
// FP fused multiply-add and negate. |
| 2511 |
void fnmadd(const VRegister& vd, |
| 2512 |
const VRegister& vn, |
| 2513 |
const VRegister& vm, |
| 2514 |
const VRegister& va); |
| 2515 |
|
| 2516 |
// FP fused multiply-subtract and negate. |
| 2517 |
void fnmsub(const VRegister& vd, |
| 2518 |
const VRegister& vn, |
| 2519 |
const VRegister& vm, |
| 2520 |
const VRegister& va); |
| 2521 |
|
| 2522 |
// FP multiply-negate scalar. |
| 2523 |
void fnmul(const VRegister& vd, |
| 2524 |
const VRegister& vn, |
| 2525 |
const VRegister& vm); |
| 2526 |
|
| 2527 |
// FP reciprocal exponent scalar. |
| 2528 |
void frecpx(const VRegister& vd, |
| 2529 |
const VRegister& vn); |
| 2530 |
|
| 2531 |
// FP divide. |
| 2532 |
void fdiv(const VRegister& vd, const VRegister& fn, const VRegister& vm); |
| 2533 |
|
| 2534 |
// FP maximum. |
| 2535 |
void fmax(const VRegister& vd, const VRegister& fn, const VRegister& vm); |
| 2536 |
|
| 2537 |
// FP minimum. |
| 2538 |
void fmin(const VRegister& vd, const VRegister& fn, const VRegister& vm); |
| 2539 |
|
| 2540 |
// FP maximum number. |
| 2541 |
void fmaxnm(const VRegister& vd, const VRegister& fn, const VRegister& vm); |
| 2542 |
|
| 2543 |
// FP minimum number. |
| 2544 |
void fminnm(const VRegister& vd, const VRegister& fn, const VRegister& vm); |
| 2545 |
|
| 2546 |
// FP absolute. |
| 2547 |
void fabs(const VRegister& vd, const VRegister& vn); |
| 2548 |
|
| 2549 |
// FP negate. |
| 2550 |
void fneg(const VRegister& vd, const VRegister& vn); |
| 2551 |
|
| 2552 |
// FP square root. |
| 2553 |
void fsqrt(const VRegister& vd, const VRegister& vn); |
| 2554 |
|
| 2555 |
// FP round to integer, nearest with ties to away. |
| 2556 |
void frinta(const VRegister& vd, const VRegister& vn); |
| 2557 |
|
| 2558 |
// FP round to integer, implicit rounding. |
| 2559 |
void frinti(const VRegister& vd, const VRegister& vn); |
| 2560 |
|
| 2561 |
// FP round to integer, toward minus infinity. |
| 2562 |
void frintm(const VRegister& vd, const VRegister& vn); |
| 2563 |
|
| 2564 |
// FP round to integer, nearest with ties to even. |
| 2565 |
void frintn(const VRegister& vd, const VRegister& vn); |
| 2566 |
|
| 2567 |
// FP round to integer, toward plus infinity. |
| 2568 |
void frintp(const VRegister& vd, const VRegister& vn); |
| 2569 |
|
| 2570 |
// FP round to integer, exact, implicit rounding. |
| 2571 |
void frintx(const VRegister& vd, const VRegister& vn); |
| 2572 |
|
| 2573 |
// FP round to integer, towards zero. |
| 2574 |
void frintz(const VRegister& vd, const VRegister& vn); |
| 2575 |
|
| 2576 |
void FPCompareMacro(const VRegister& vn, |
| 2577 |
double value, |
| 2578 |
FPTrapFlags trap); |
| 2579 |
|
| 2580 |
void FPCompareMacro(const VRegister& vn, |
| 2581 |
const VRegister& vm, |
| 2582 |
FPTrapFlags trap); |
| 2583 |
|
| 2584 |
// FP compare registers. |
| 2585 |
void fcmp(const VRegister& vn, const VRegister& vm); |
| 2586 |
|
| 2587 |
// FP compare immediate. |
| 2588 |
void fcmp(const VRegister& vn, double value); |
| 2589 |
|
| 2590 |
void FPCCompareMacro(const VRegister& vn, |
| 2591 |
const VRegister& vm, |
| 2592 |
StatusFlags nzcv, |
| 2593 |
Condition cond, |
| 2594 |
FPTrapFlags trap); |
| 2595 |
|
| 2596 |
// FP conditional compare. |
| 2597 |
void fccmp(const VRegister& vn, |
| 2598 |
const VRegister& vm, |
| 2599 |
StatusFlags nzcv, |
| 2600 |
Condition cond); |
| 2601 |
|
| 2602 |
// FP signaling compare registers. |
| 2603 |
void fcmpe(const VRegister& vn, const VRegister& vm); |
| 2604 |
|
| 2605 |
// FP signaling compare immediate. |
| 2606 |
void fcmpe(const VRegister& vn, double value); |
| 2607 |
|
| 2608 |
// FP conditional signaling compare. |
| 2609 |
void fccmpe(const VRegister& vn, |
| 2610 |
const VRegister& vm, |
| 2611 |
StatusFlags nzcv, |
| 2612 |
Condition cond); |
| 2613 |
|
| 2614 |
// FP conditional select. |
| 2615 |
void fcsel(const VRegister& vd, |
| 2616 |
const VRegister& vn, |
| 2617 |
const VRegister& vm, |
| 2618 |
Condition cond); |
| 2619 |
|
| 2620 |
// Common FP Convert functions. |
| 2621 |
void NEONFPConvertToInt(const Register& rd, |
| 2622 |
const VRegister& vn, |
| 2623 |
Instr op); |
| 2624 |
void NEONFPConvertToInt(const VRegister& vd, |
| 2625 |
const VRegister& vn, |
| 2626 |
Instr op); |
| 2627 |
|
| 2628 |
// FP convert between precisions. |
| 2629 |
void fcvt(const VRegister& vd, const VRegister& vn); |
| 2630 |
|
| 2631 |
// FP convert to higher precision. |
| 2632 |
void fcvtl(const VRegister& vd, const VRegister& vn); |
| 2633 |
|
| 2634 |
// FP convert to higher precision (second part). |
| 2635 |
void fcvtl2(const VRegister& vd, const VRegister& vn); |
| 2636 |
|
| 2637 |
// FP convert to lower precision. |
| 2638 |
void fcvtn(const VRegister& vd, const VRegister& vn); |
| 2639 |
|
| 2640 |
// FP convert to lower prevision (second part). |
| 2641 |
void fcvtn2(const VRegister& vd, const VRegister& vn); |
| 2642 |
|
| 2643 |
// FP convert to lower precision, rounding to odd. |
| 2644 |
void fcvtxn(const VRegister& vd, const VRegister& vn); |
| 2645 |
|
| 2646 |
// FP convert to lower precision, rounding to odd (second part). |
| 2647 |
void fcvtxn2(const VRegister& vd, const VRegister& vn); |
| 2648 |
|
| 2649 |
// FP convert to signed integer, nearest with ties to away. |
| 2650 |
void fcvtas(const Register& rd, const VRegister& vn); |
| 2651 |
|
| 2652 |
// FP convert to unsigned integer, nearest with ties to away. |
| 2653 |
void fcvtau(const Register& rd, const VRegister& vn); |
| 2654 |
|
| 2655 |
// FP convert to signed integer, nearest with ties to away. |
| 2656 |
void fcvtas(const VRegister& vd, const VRegister& vn); |
| 2657 |
|
| 2658 |
// FP convert to unsigned integer, nearest with ties to away. |
| 2659 |
void fcvtau(const VRegister& vd, const VRegister& vn); |
| 2660 |
|
| 2661 |
// FP convert to signed integer, round towards -infinity. |
| 2662 |
void fcvtms(const Register& rd, const VRegister& vn); |
| 2663 |
|
| 2664 |
// FP convert to unsigned integer, round towards -infinity. |
| 2665 |
void fcvtmu(const Register& rd, const VRegister& vn); |
| 2666 |
|
| 2667 |
// FP convert to signed integer, round towards -infinity. |
| 2668 |
void fcvtms(const VRegister& vd, const VRegister& vn); |
| 2669 |
|
| 2670 |
// FP convert to unsigned integer, round towards -infinity. |
| 2671 |
void fcvtmu(const VRegister& vd, const VRegister& vn); |
| 2672 |
|
| 2673 |
// FP convert to signed integer, nearest with ties to even. |
| 2674 |
void fcvtns(const Register& rd, const VRegister& vn); |
| 2675 |
|
| 2676 |
// FP convert to unsigned integer, nearest with ties to even. |
| 2677 |
void fcvtnu(const Register& rd, const VRegister& vn); |
| 2678 |
|
| 2679 |
// FP convert to signed integer, nearest with ties to even. |
| 2680 |
void fcvtns(const VRegister& rd, const VRegister& vn); |
| 2681 |
|
| 2682 |
// FP JavaScript convert to signed integer, rounding toward zero [Armv8.3]. |
| 2683 |
void fjcvtzs(const Register& rd, const VRegister& vn); |
| 2684 |
|
| 2685 |
// FP convert to unsigned integer, nearest with ties to even. |
| 2686 |
void fcvtnu(const VRegister& rd, const VRegister& vn); |
| 2687 |
|
| 2688 |
// FP convert to signed integer or fixed-point, round towards zero. |
| 2689 |
void fcvtzs(const Register& rd, const VRegister& vn, int fbits = 0); |
| 2690 |
|
| 2691 |
// FP convert to unsigned integer or fixed-point, round towards zero. |
| 2692 |
void fcvtzu(const Register& rd, const VRegister& vn, int fbits = 0); |
| 2693 |
|
| 2694 |
// FP convert to signed integer or fixed-point, round towards zero. |
| 2695 |
void fcvtzs(const VRegister& vd, const VRegister& vn, int fbits = 0); |
| 2696 |
|
| 2697 |
// FP convert to unsigned integer or fixed-point, round towards zero. |
| 2698 |
void fcvtzu(const VRegister& vd, const VRegister& vn, int fbits = 0); |
| 2699 |
|
| 2700 |
// FP convert to signed integer, round towards +infinity. |
| 2701 |
void fcvtps(const Register& rd, const VRegister& vn); |
| 2702 |
|
| 2703 |
// FP convert to unsigned integer, round towards +infinity. |
| 2704 |
void fcvtpu(const Register& rd, const VRegister& vn); |
| 2705 |
|
| 2706 |
// FP convert to signed integer, round towards +infinity. |
| 2707 |
void fcvtps(const VRegister& vd, const VRegister& vn); |
| 2708 |
|
| 2709 |
// FP convert to unsigned integer, round towards +infinity. |
| 2710 |
void fcvtpu(const VRegister& vd, const VRegister& vn); |
| 2711 |
|
| 2712 |
// Convert signed integer or fixed point to FP. |
| 2713 |
void scvtf(const VRegister& fd, const Register& rn, int fbits = 0); |
| 2714 |
|
| 2715 |
// Convert unsigned integer or fixed point to FP. |
| 2716 |
void ucvtf(const VRegister& fd, const Register& rn, int fbits = 0); |
| 2717 |
|
| 2718 |
// Convert signed integer or fixed-point to FP. |
| 2719 |
void scvtf(const VRegister& fd, const VRegister& vn, int fbits = 0); |
| 2720 |
|
| 2721 |
// Convert unsigned integer or fixed-point to FP. |
| 2722 |
void ucvtf(const VRegister& fd, const VRegister& vn, int fbits = 0); |
| 2723 |
|
| 2724 |
// Unsigned absolute difference. |
| 2725 |
void uabd(const VRegister& vd, |
| 2726 |
const VRegister& vn, |
| 2727 |
const VRegister& vm); |
| 2728 |
|
| 2729 |
// Signed absolute difference. |
| 2730 |
void sabd(const VRegister& vd, |
| 2731 |
const VRegister& vn, |
| 2732 |
const VRegister& vm); |
| 2733 |
|
| 2734 |
// Unsigned absolute difference and accumulate. |
| 2735 |
void uaba(const VRegister& vd, |
| 2736 |
const VRegister& vn, |
| 2737 |
const VRegister& vm); |
| 2738 |
|
| 2739 |
// Signed absolute difference and accumulate. |
| 2740 |
void saba(const VRegister& vd, |
| 2741 |
const VRegister& vn, |
| 2742 |
const VRegister& vm); |
| 2743 |
|
| 2744 |
// Add. |
| 2745 |
void add(const VRegister& vd, |
| 2746 |
const VRegister& vn, |
| 2747 |
const VRegister& vm); |
| 2748 |
|
| 2749 |
// Subtract. |
| 2750 |
void sub(const VRegister& vd, |
| 2751 |
const VRegister& vn, |
| 2752 |
const VRegister& vm); |
| 2753 |
|
| 2754 |
// Unsigned halving add. |
| 2755 |
void uhadd(const VRegister& vd, |
| 2756 |
const VRegister& vn, |
| 2757 |
const VRegister& vm); |
| 2758 |
|
| 2759 |
// Signed halving add. |
| 2760 |
void shadd(const VRegister& vd, |
| 2761 |
const VRegister& vn, |
| 2762 |
const VRegister& vm); |
| 2763 |
|
| 2764 |
// Unsigned rounding halving add. |
| 2765 |
void urhadd(const VRegister& vd, |
| 2766 |
const VRegister& vn, |
| 2767 |
const VRegister& vm); |
| 2768 |
|
| 2769 |
// Signed rounding halving add. |
| 2770 |
void srhadd(const VRegister& vd, |
| 2771 |
const VRegister& vn, |
| 2772 |
const VRegister& vm); |
| 2773 |
|
| 2774 |
// Unsigned halving sub. |
| 2775 |
void uhsub(const VRegister& vd, |
| 2776 |
const VRegister& vn, |
| 2777 |
const VRegister& vm); |
| 2778 |
|
| 2779 |
// Signed halving sub. |
| 2780 |
void shsub(const VRegister& vd, |
| 2781 |
const VRegister& vn, |
| 2782 |
const VRegister& vm); |
| 2783 |
|
| 2784 |
// Unsigned saturating add. |
| 2785 |
void uqadd(const VRegister& vd, |
| 2786 |
const VRegister& vn, |
| 2787 |
const VRegister& vm); |
| 2788 |
|
| 2789 |
// Signed saturating add. |
| 2790 |
void sqadd(const VRegister& vd, |
| 2791 |
const VRegister& vn, |
| 2792 |
const VRegister& vm); |
| 2793 |
|
| 2794 |
// Unsigned saturating subtract. |
| 2795 |
void uqsub(const VRegister& vd, |
| 2796 |
const VRegister& vn, |
| 2797 |
const VRegister& vm); |
| 2798 |
|
| 2799 |
// Signed saturating subtract. |
| 2800 |
void sqsub(const VRegister& vd, |
| 2801 |
const VRegister& vn, |
| 2802 |
const VRegister& vm); |
| 2803 |
|
| 2804 |
// Add pairwise. |
| 2805 |
void addp(const VRegister& vd, |
| 2806 |
const VRegister& vn, |
| 2807 |
const VRegister& vm); |
| 2808 |
|
| 2809 |
// Add pair of elements scalar. |
| 2810 |
void addp(const VRegister& vd, |
| 2811 |
const VRegister& vn); |
| 2812 |
|
| 2813 |
// Multiply-add to accumulator. |
| 2814 |
void mla(const VRegister& vd, |
| 2815 |
const VRegister& vn, |
| 2816 |
const VRegister& vm); |
| 2817 |
|
| 2818 |
// Multiply-subtract to accumulator. |
| 2819 |
void mls(const VRegister& vd, |
| 2820 |
const VRegister& vn, |
| 2821 |
const VRegister& vm); |
| 2822 |
|
| 2823 |
// Multiply. |
| 2824 |
void mul(const VRegister& vd, |
| 2825 |
const VRegister& vn, |
| 2826 |
const VRegister& vm); |
| 2827 |
|
| 2828 |
// Multiply by scalar element. |
| 2829 |
void mul(const VRegister& vd, |
| 2830 |
const VRegister& vn, |
| 2831 |
const VRegister& vm, |
| 2832 |
int vm_index); |
| 2833 |
|
| 2834 |
// Multiply-add by scalar element. |
| 2835 |
void mla(const VRegister& vd, |
| 2836 |
const VRegister& vn, |
| 2837 |
const VRegister& vm, |
| 2838 |
int vm_index); |
| 2839 |
|
| 2840 |
// Multiply-subtract by scalar element. |
| 2841 |
void mls(const VRegister& vd, |
| 2842 |
const VRegister& vn, |
| 2843 |
const VRegister& vm, |
| 2844 |
int vm_index); |
| 2845 |
|
| 2846 |
// Signed long multiply-add by scalar element. |
| 2847 |
void smlal(const VRegister& vd, |
| 2848 |
const VRegister& vn, |
| 2849 |
const VRegister& vm, |
| 2850 |
int vm_index); |
| 2851 |
|
| 2852 |
// Signed long multiply-add by scalar element (second part). |
| 2853 |
void smlal2(const VRegister& vd, |
| 2854 |
const VRegister& vn, |
| 2855 |
const VRegister& vm, |
| 2856 |
int vm_index); |
| 2857 |
|
| 2858 |
// Unsigned long multiply-add by scalar element. |
| 2859 |
void umlal(const VRegister& vd, |
| 2860 |
const VRegister& vn, |
| 2861 |
const VRegister& vm, |
| 2862 |
int vm_index); |
| 2863 |
|
| 2864 |
// Unsigned long multiply-add by scalar element (second part). |
| 2865 |
void umlal2(const VRegister& vd, |
| 2866 |
const VRegister& vn, |
| 2867 |
const VRegister& vm, |
| 2868 |
int vm_index); |
| 2869 |
|
| 2870 |
// Signed long multiply-sub by scalar element. |
| 2871 |
void smlsl(const VRegister& vd, |
| 2872 |
const VRegister& vn, |
| 2873 |
const VRegister& vm, |
| 2874 |
int vm_index); |
| 2875 |
|
| 2876 |
// Signed long multiply-sub by scalar element (second part). |
| 2877 |
void smlsl2(const VRegister& vd, |
| 2878 |
const VRegister& vn, |
| 2879 |
const VRegister& vm, |
| 2880 |
int vm_index); |
| 2881 |
|
| 2882 |
// Unsigned long multiply-sub by scalar element. |
| 2883 |
void umlsl(const VRegister& vd, |
| 2884 |
const VRegister& vn, |
| 2885 |
const VRegister& vm, |
| 2886 |
int vm_index); |
| 2887 |
|
| 2888 |
// Unsigned long multiply-sub by scalar element (second part). |
| 2889 |
void umlsl2(const VRegister& vd, |
| 2890 |
const VRegister& vn, |
| 2891 |
const VRegister& vm, |
| 2892 |
int vm_index); |
| 2893 |
|
| 2894 |
// Signed long multiply by scalar element. |
| 2895 |
void smull(const VRegister& vd, |
| 2896 |
const VRegister& vn, |
| 2897 |
const VRegister& vm, |
| 2898 |
int vm_index); |
| 2899 |
|
| 2900 |
// Signed long multiply by scalar element (second part). |
| 2901 |
void smull2(const VRegister& vd, |
| 2902 |
const VRegister& vn, |
| 2903 |
const VRegister& vm, |
| 2904 |
int vm_index); |
| 2905 |
|
| 2906 |
// Unsigned long multiply by scalar element. |
| 2907 |
void umull(const VRegister& vd, |
| 2908 |
const VRegister& vn, |
| 2909 |
const VRegister& vm, |
| 2910 |
int vm_index); |
| 2911 |
|
| 2912 |
// Unsigned long multiply by scalar element (second part). |
| 2913 |
void umull2(const VRegister& vd, |
| 2914 |
const VRegister& vn, |
| 2915 |
const VRegister& vm, |
| 2916 |
int vm_index); |
| 2917 |
|
| 2918 |
// Signed saturating double long multiply by element. |
| 2919 |
void sqdmull(const VRegister& vd, |
| 2920 |
const VRegister& vn, |
| 2921 |
const VRegister& vm, |
| 2922 |
int vm_index); |
| 2923 |
|
| 2924 |
// Signed saturating double long multiply by element (second part). |
| 2925 |
void sqdmull2(const VRegister& vd, |
| 2926 |
const VRegister& vn, |
| 2927 |
const VRegister& vm, |
| 2928 |
int vm_index); |
| 2929 |
|
| 2930 |
// Signed saturating doubling long multiply-add by element. |
| 2931 |
void sqdmlal(const VRegister& vd, |
| 2932 |
const VRegister& vn, |
| 2933 |
const VRegister& vm, |
| 2934 |
int vm_index); |
| 2935 |
|
| 2936 |
// Signed saturating doubling long multiply-add by element (second part). |
| 2937 |
void sqdmlal2(const VRegister& vd, |
| 2938 |
const VRegister& vn, |
| 2939 |
const VRegister& vm, |
| 2940 |
int vm_index); |
| 2941 |
|
| 2942 |
// Signed saturating doubling long multiply-sub by element. |
| 2943 |
void sqdmlsl(const VRegister& vd, |
| 2944 |
const VRegister& vn, |
| 2945 |
const VRegister& vm, |
| 2946 |
int vm_index); |
| 2947 |
|
| 2948 |
// Signed saturating doubling long multiply-sub by element (second part). |
| 2949 |
void sqdmlsl2(const VRegister& vd, |
| 2950 |
const VRegister& vn, |
| 2951 |
const VRegister& vm, |
| 2952 |
int vm_index); |
| 2953 |
|
| 2954 |
// Compare equal. |
| 2955 |
void cmeq(const VRegister& vd, |
| 2956 |
const VRegister& vn, |
| 2957 |
const VRegister& vm); |
| 2958 |
|
| 2959 |
// Compare signed greater than or equal. |
| 2960 |
void cmge(const VRegister& vd, |
| 2961 |
const VRegister& vn, |
| 2962 |
const VRegister& vm); |
| 2963 |
|
| 2964 |
// Compare signed greater than. |
| 2965 |
void cmgt(const VRegister& vd, |
| 2966 |
const VRegister& vn, |
| 2967 |
const VRegister& vm); |
| 2968 |
|
| 2969 |
// Compare unsigned higher. |
| 2970 |
void cmhi(const VRegister& vd, |
| 2971 |
const VRegister& vn, |
| 2972 |
const VRegister& vm); |
| 2973 |
|
| 2974 |
// Compare unsigned higher or same. |
| 2975 |
void cmhs(const VRegister& vd, |
| 2976 |
const VRegister& vn, |
| 2977 |
const VRegister& vm); |
| 2978 |
|
| 2979 |
// Compare bitwise test bits nonzero. |
| 2980 |
void cmtst(const VRegister& vd, |
| 2981 |
const VRegister& vn, |
| 2982 |
const VRegister& vm); |
| 2983 |
|
| 2984 |
// Compare bitwise to zero. |
| 2985 |
void cmeq(const VRegister& vd, |
| 2986 |
const VRegister& vn, |
| 2987 |
int value); |
| 2988 |
|
| 2989 |
// Compare signed greater than or equal to zero. |
| 2990 |
void cmge(const VRegister& vd, |
| 2991 |
const VRegister& vn, |
| 2992 |
int value); |
| 2993 |
|
| 2994 |
// Compare signed greater than zero. |
| 2995 |
void cmgt(const VRegister& vd, |
| 2996 |
const VRegister& vn, |
| 2997 |
int value); |
| 2998 |
|
| 2999 |
// Compare signed less than or equal to zero. |
| 3000 |
void cmle(const VRegister& vd, |
| 3001 |
const VRegister& vn, |
| 3002 |
int value); |
| 3003 |
|
| 3004 |
// Compare signed less than zero. |
| 3005 |
void cmlt(const VRegister& vd, |
| 3006 |
const VRegister& vn, |
| 3007 |
int value); |
| 3008 |
|
| 3009 |
// Signed shift left by register. |
| 3010 |
void sshl(const VRegister& vd, |
| 3011 |
const VRegister& vn, |
| 3012 |
const VRegister& vm); |
| 3013 |
|
| 3014 |
// Unsigned shift left by register. |
| 3015 |
void ushl(const VRegister& vd, |
| 3016 |
const VRegister& vn, |
| 3017 |
const VRegister& vm); |
| 3018 |
|
| 3019 |
// Signed saturating shift left by register. |
| 3020 |
void sqshl(const VRegister& vd, |
| 3021 |
const VRegister& vn, |
| 3022 |
const VRegister& vm); |
| 3023 |
|
| 3024 |
// Unsigned saturating shift left by register. |
| 3025 |
void uqshl(const VRegister& vd, |
| 3026 |
const VRegister& vn, |
| 3027 |
const VRegister& vm); |
| 3028 |
|
| 3029 |
// Signed rounding shift left by register. |
| 3030 |
void srshl(const VRegister& vd, |
| 3031 |
const VRegister& vn, |
| 3032 |
const VRegister& vm); |
| 3033 |
|
| 3034 |
// Unsigned rounding shift left by register. |
| 3035 |
void urshl(const VRegister& vd, |
| 3036 |
const VRegister& vn, |
| 3037 |
const VRegister& vm); |
| 3038 |
|
| 3039 |
// Signed saturating rounding shift left by register. |
| 3040 |
void sqrshl(const VRegister& vd, |
| 3041 |
const VRegister& vn, |
| 3042 |
const VRegister& vm); |
| 3043 |
|
| 3044 |
// Unsigned saturating rounding shift left by register. |
| 3045 |
void uqrshl(const VRegister& vd, |
| 3046 |
const VRegister& vn, |
| 3047 |
const VRegister& vm); |
| 3048 |
|
| 3049 |
// Bitwise and. |
| 3050 |
void and_(const VRegister& vd, |
| 3051 |
const VRegister& vn, |
| 3052 |
const VRegister& vm); |
| 3053 |
|
| 3054 |
// Bitwise or. |
| 3055 |
void orr(const VRegister& vd, |
| 3056 |
const VRegister& vn, |
| 3057 |
const VRegister& vm); |
| 3058 |
|
| 3059 |
// Bitwise or immediate. |
| 3060 |
void orr(const VRegister& vd, |
| 3061 |
const int imm8, |
| 3062 |
const int left_shift = 0); |
| 3063 |
|
| 3064 |
// Move register to register. |
| 3065 |
void mov(const VRegister& vd, |
| 3066 |
const VRegister& vn); |
| 3067 |
|
| 3068 |
// Bitwise orn. |
| 3069 |
void orn(const VRegister& vd, |
| 3070 |
const VRegister& vn, |
| 3071 |
const VRegister& vm); |
| 3072 |
|
| 3073 |
// Bitwise eor. |
| 3074 |
void eor(const VRegister& vd, |
| 3075 |
const VRegister& vn, |
| 3076 |
const VRegister& vm); |
| 3077 |
|
| 3078 |
// Bit clear immediate. |
| 3079 |
void bic(const VRegister& vd, |
| 3080 |
const int imm8, |
| 3081 |
const int left_shift = 0); |
| 3082 |
|
| 3083 |
// Bit clear. |
| 3084 |
void bic(const VRegister& vd, |
| 3085 |
const VRegister& vn, |
| 3086 |
const VRegister& vm); |
| 3087 |
|
| 3088 |
// Bitwise insert if false. |
| 3089 |
void bif(const VRegister& vd, |
| 3090 |
const VRegister& vn, |
| 3091 |
const VRegister& vm); |
| 3092 |
|
| 3093 |
// Bitwise insert if true. |
| 3094 |
void bit(const VRegister& vd, |
| 3095 |
const VRegister& vn, |
| 3096 |
const VRegister& vm); |
| 3097 |
|
| 3098 |
// Bitwise select. |
| 3099 |
void bsl(const VRegister& vd, |
| 3100 |
const VRegister& vn, |
| 3101 |
const VRegister& vm); |
| 3102 |
|
| 3103 |
// Polynomial multiply. |
| 3104 |
void pmul(const VRegister& vd, |
| 3105 |
const VRegister& vn, |
| 3106 |
const VRegister& vm); |
| 3107 |
|
| 3108 |
// Vector move immediate. |
| 3109 |
void movi(const VRegister& vd, |
| 3110 |
const uint64_t imm, |
| 3111 |
Shift shift = LSL, |
| 3112 |
const int shift_amount = 0); |
| 3113 |
|
| 3114 |
// Bitwise not. |
| 3115 |
void mvn(const VRegister& vd, |
| 3116 |
const VRegister& vn); |
| 3117 |
|
| 3118 |
// Vector move inverted immediate. |
| 3119 |
void mvni(const VRegister& vd, |
| 3120 |
const int imm8, |
| 3121 |
Shift shift = LSL, |
| 3122 |
const int shift_amount = 0); |
| 3123 |
|
| 3124 |
// Signed saturating accumulate of unsigned value. |
| 3125 |
void suqadd(const VRegister& vd, |
| 3126 |
const VRegister& vn); |
| 3127 |
|
| 3128 |
// Unsigned saturating accumulate of signed value. |
| 3129 |
void usqadd(const VRegister& vd, |
| 3130 |
const VRegister& vn); |
| 3131 |
|
| 3132 |
// Absolute value. |
| 3133 |
void abs(const VRegister& vd, |
| 3134 |
const VRegister& vn); |
| 3135 |
|
| 3136 |
// Signed saturating absolute value. |
| 3137 |
void sqabs(const VRegister& vd, |
| 3138 |
const VRegister& vn); |
| 3139 |
|
| 3140 |
// Negate. |
| 3141 |
void neg(const VRegister& vd, |
| 3142 |
const VRegister& vn); |
| 3143 |
|
| 3144 |
// Signed saturating negate. |
| 3145 |
void sqneg(const VRegister& vd, |
| 3146 |
const VRegister& vn); |
| 3147 |
|
| 3148 |
// Bitwise not. |
| 3149 |
void not_(const VRegister& vd, |
| 3150 |
const VRegister& vn); |
| 3151 |
|
| 3152 |
// Extract narrow. |
| 3153 |
void xtn(const VRegister& vd, |
| 3154 |
const VRegister& vn); |
| 3155 |
|
| 3156 |
// Extract narrow (second part). |
| 3157 |
void xtn2(const VRegister& vd, |
| 3158 |
const VRegister& vn); |
| 3159 |
|
| 3160 |
// Signed saturating extract narrow. |
| 3161 |
void sqxtn(const VRegister& vd, |
| 3162 |
const VRegister& vn); |
| 3163 |
|
| 3164 |
// Signed saturating extract narrow (second part). |
| 3165 |
void sqxtn2(const VRegister& vd, |
| 3166 |
const VRegister& vn); |
| 3167 |
|
| 3168 |
// Unsigned saturating extract narrow. |
| 3169 |
void uqxtn(const VRegister& vd, |
| 3170 |
const VRegister& vn); |
| 3171 |
|
| 3172 |
// Unsigned saturating extract narrow (second part). |
| 3173 |
void uqxtn2(const VRegister& vd, |
| 3174 |
const VRegister& vn); |
| 3175 |
|
| 3176 |
// Signed saturating extract unsigned narrow. |
| 3177 |
void sqxtun(const VRegister& vd, |
| 3178 |
const VRegister& vn); |
| 3179 |
|
| 3180 |
// Signed saturating extract unsigned narrow (second part). |
| 3181 |
void sqxtun2(const VRegister& vd, |
| 3182 |
const VRegister& vn); |
| 3183 |
|
| 3184 |
// Extract vector from pair of vectors. |
| 3185 |
void ext(const VRegister& vd, |
| 3186 |
const VRegister& vn, |
| 3187 |
const VRegister& vm, |
| 3188 |
int index); |
| 3189 |
|
| 3190 |
// Duplicate vector element to vector or scalar. |
| 3191 |
void dup(const VRegister& vd, |
| 3192 |
const VRegister& vn, |
| 3193 |
int vn_index); |
| 3194 |
|
| 3195 |
// Move vector element to scalar. |
| 3196 |
void mov(const VRegister& vd, |
| 3197 |
const VRegister& vn, |
| 3198 |
int vn_index); |
| 3199 |
|
| 3200 |
// Duplicate general-purpose register to vector. |
| 3201 |
void dup(const VRegister& vd, |
| 3202 |
const Register& rn); |
| 3203 |
|
| 3204 |
// Insert vector element from another vector element. |
| 3205 |
void ins(const VRegister& vd, |
| 3206 |
int vd_index, |
| 3207 |
const VRegister& vn, |
| 3208 |
int vn_index); |
| 3209 |
|
| 3210 |
// Move vector element to another vector element. |
| 3211 |
void mov(const VRegister& vd, |
| 3212 |
int vd_index, |
| 3213 |
const VRegister& vn, |
| 3214 |
int vn_index); |
| 3215 |
|
| 3216 |
// Insert vector element from general-purpose register. |
| 3217 |
void ins(const VRegister& vd, |
| 3218 |
int vd_index, |
| 3219 |
const Register& rn); |
| 3220 |
|
| 3221 |
// Move general-purpose register to a vector element. |
| 3222 |
void mov(const VRegister& vd, |
| 3223 |
int vd_index, |
| 3224 |
const Register& rn); |
| 3225 |
|
| 3226 |
// Unsigned move vector element to general-purpose register. |
| 3227 |
void umov(const Register& rd, |
| 3228 |
const VRegister& vn, |
| 3229 |
int vn_index); |
| 3230 |
|
| 3231 |
// Move vector element to general-purpose register. |
| 3232 |
void mov(const Register& rd, |
| 3233 |
const VRegister& vn, |
| 3234 |
int vn_index); |
| 3235 |
|
| 3236 |
// Signed move vector element to general-purpose register. |
| 3237 |
void smov(const Register& rd, |
| 3238 |
const VRegister& vn, |
| 3239 |
int vn_index); |
| 3240 |
|
| 3241 |
// One-element structure load to one register. |
| 3242 |
void ld1(const VRegister& vt, |
| 3243 |
const MemOperand& src); |
| 3244 |
|
| 3245 |
// One-element structure load to two registers. |
| 3246 |
void ld1(const VRegister& vt, |
| 3247 |
const VRegister& vt2, |
| 3248 |
const MemOperand& src); |
| 3249 |
|
| 3250 |
// One-element structure load to three registers. |
| 3251 |
void ld1(const VRegister& vt, |
| 3252 |
const VRegister& vt2, |
| 3253 |
const VRegister& vt3, |
| 3254 |
const MemOperand& src); |
| 3255 |
|
| 3256 |
// One-element structure load to four registers. |
| 3257 |
void ld1(const VRegister& vt, |
| 3258 |
const VRegister& vt2, |
| 3259 |
const VRegister& vt3, |
| 3260 |
const VRegister& vt4, |
| 3261 |
const MemOperand& src); |
| 3262 |
|
| 3263 |
// One-element single structure load to one lane. |
| 3264 |
void ld1(const VRegister& vt, |
| 3265 |
int lane, |
| 3266 |
const MemOperand& src); |
| 3267 |
|
| 3268 |
// One-element single structure load to all lanes. |
| 3269 |
void ld1r(const VRegister& vt, |
| 3270 |
const MemOperand& src); |
| 3271 |
|
| 3272 |
// Two-element structure load. |
| 3273 |
void ld2(const VRegister& vt, |
| 3274 |
const VRegister& vt2, |
| 3275 |
const MemOperand& src); |
| 3276 |
|
| 3277 |
// Two-element single structure load to one lane. |
| 3278 |
void ld2(const VRegister& vt, |
| 3279 |
const VRegister& vt2, |
| 3280 |
int lane, |
| 3281 |
const MemOperand& src); |
| 3282 |
|
| 3283 |
// Two-element single structure load to all lanes. |
| 3284 |
void ld2r(const VRegister& vt, |
| 3285 |
const VRegister& vt2, |
| 3286 |
const MemOperand& src); |
| 3287 |
|
| 3288 |
// Three-element structure load. |
| 3289 |
void ld3(const VRegister& vt, |
| 3290 |
const VRegister& vt2, |
| 3291 |
const VRegister& vt3, |
| 3292 |
const MemOperand& src); |
| 3293 |
|
| 3294 |
// Three-element single structure load to one lane. |
| 3295 |
void ld3(const VRegister& vt, |
| 3296 |
const VRegister& vt2, |
| 3297 |
const VRegister& vt3, |
| 3298 |
int lane, |
| 3299 |
const MemOperand& src); |
| 3300 |
|
| 3301 |
// Three-element single structure load to all lanes. |
| 3302 |
void ld3r(const VRegister& vt, |
| 3303 |
const VRegister& vt2, |
| 3304 |
const VRegister& vt3, |
| 3305 |
const MemOperand& src); |
| 3306 |
|
| 3307 |
// Four-element structure load. |
| 3308 |
void ld4(const VRegister& vt, |
| 3309 |
const VRegister& vt2, |
| 3310 |
const VRegister& vt3, |
| 3311 |
const VRegister& vt4, |
| 3312 |
const MemOperand& src); |
| 3313 |
|
| 3314 |
// Four-element single structure load to one lane. |
| 3315 |
void ld4(const VRegister& vt, |
| 3316 |
const VRegister& vt2, |
| 3317 |
const VRegister& vt3, |
| 3318 |
const VRegister& vt4, |
| 3319 |
int lane, |
| 3320 |
const MemOperand& src); |
| 3321 |
|
| 3322 |
// Four-element single structure load to all lanes. |
| 3323 |
void ld4r(const VRegister& vt, |
| 3324 |
const VRegister& vt2, |
| 3325 |
const VRegister& vt3, |
| 3326 |
const VRegister& vt4, |
| 3327 |
const MemOperand& src); |
| 3328 |
|
| 3329 |
// Count leading sign bits. |
| 3330 |
void cls(const VRegister& vd, |
| 3331 |
const VRegister& vn); |
| 3332 |
|
| 3333 |
// Count leading zero bits (vector). |
| 3334 |
void clz(const VRegister& vd, |
| 3335 |
const VRegister& vn); |
| 3336 |
|
| 3337 |
// Population count per byte. |
| 3338 |
void cnt(const VRegister& vd, |
| 3339 |
const VRegister& vn); |
| 3340 |
|
| 3341 |
// Reverse bit order. |
| 3342 |
void rbit(const VRegister& vd, |
| 3343 |
const VRegister& vn); |
| 3344 |
|
| 3345 |
// Reverse elements in 16-bit halfwords. |
| 3346 |
void rev16(const VRegister& vd, |
| 3347 |
const VRegister& vn); |
| 3348 |
|
| 3349 |
// Reverse elements in 32-bit words. |
| 3350 |
void rev32(const VRegister& vd, |
| 3351 |
const VRegister& vn); |
| 3352 |
|
| 3353 |
// Reverse elements in 64-bit doublewords. |
| 3354 |
void rev64(const VRegister& vd, |
| 3355 |
const VRegister& vn); |
| 3356 |
|
| 3357 |
// Unsigned reciprocal square root estimate. |
| 3358 |
void ursqrte(const VRegister& vd, |
| 3359 |
const VRegister& vn); |
| 3360 |
|
| 3361 |
// Unsigned reciprocal estimate. |
| 3362 |
void urecpe(const VRegister& vd, |
| 3363 |
const VRegister& vn); |
| 3364 |
|
| 3365 |
// Signed pairwise long add. |
| 3366 |
void saddlp(const VRegister& vd, |
| 3367 |
const VRegister& vn); |
| 3368 |
|
| 3369 |
// Unsigned pairwise long add. |
| 3370 |
void uaddlp(const VRegister& vd, |
| 3371 |
const VRegister& vn); |
| 3372 |
|
| 3373 |
// Signed pairwise long add and accumulate. |
| 3374 |
void sadalp(const VRegister& vd, |
| 3375 |
const VRegister& vn); |
| 3376 |
|
| 3377 |
// Unsigned pairwise long add and accumulate. |
| 3378 |
void uadalp(const VRegister& vd, |
| 3379 |
const VRegister& vn); |
| 3380 |
|
| 3381 |
// Shift left by immediate. |
| 3382 |
void shl(const VRegister& vd, |
| 3383 |
const VRegister& vn, |
| 3384 |
int shift); |
| 3385 |
|
| 3386 |
// Signed saturating shift left by immediate. |
| 3387 |
void sqshl(const VRegister& vd, |
| 3388 |
const VRegister& vn, |
| 3389 |
int shift); |
| 3390 |
|
| 3391 |
// Signed saturating shift left unsigned by immediate. |
| 3392 |
void sqshlu(const VRegister& vd, |
| 3393 |
const VRegister& vn, |
| 3394 |
int shift); |
| 3395 |
|
| 3396 |
// Unsigned saturating shift left by immediate. |
| 3397 |
void uqshl(const VRegister& vd, |
| 3398 |
const VRegister& vn, |
| 3399 |
int shift); |
| 3400 |
|
| 3401 |
// Signed shift left long by immediate. |
| 3402 |
void sshll(const VRegister& vd, |
| 3403 |
const VRegister& vn, |
| 3404 |
int shift); |
| 3405 |
|
| 3406 |
// Signed shift left long by immediate (second part). |
| 3407 |
void sshll2(const VRegister& vd, |
| 3408 |
const VRegister& vn, |
| 3409 |
int shift); |
| 3410 |
|
| 3411 |
// Signed extend long. |
| 3412 |
void sxtl(const VRegister& vd, |
| 3413 |
const VRegister& vn); |
| 3414 |
|
| 3415 |
// Signed extend long (second part). |
| 3416 |
void sxtl2(const VRegister& vd, |
| 3417 |
const VRegister& vn); |
| 3418 |
|
| 3419 |
// Unsigned shift left long by immediate. |
| 3420 |
void ushll(const VRegister& vd, |
| 3421 |
const VRegister& vn, |
| 3422 |
int shift); |
| 3423 |
|
| 3424 |
// Unsigned shift left long by immediate (second part). |
| 3425 |
void ushll2(const VRegister& vd, |
| 3426 |
const VRegister& vn, |
| 3427 |
int shift); |
| 3428 |
|
| 3429 |
// Shift left long by element size. |
| 3430 |
void shll(const VRegister& vd, |
| 3431 |
const VRegister& vn, |
| 3432 |
int shift); |
| 3433 |
|
| 3434 |
// Shift left long by element size (second part). |
| 3435 |
void shll2(const VRegister& vd, |
| 3436 |
const VRegister& vn, |
| 3437 |
int shift); |
| 3438 |
|
| 3439 |
// Unsigned extend long. |
| 3440 |
void uxtl(const VRegister& vd, |
| 3441 |
const VRegister& vn); |
| 3442 |
|
| 3443 |
// Unsigned extend long (second part). |
| 3444 |
void uxtl2(const VRegister& vd, |
| 3445 |
const VRegister& vn); |
| 3446 |
|
| 3447 |
// Shift left by immediate and insert. |
| 3448 |
void sli(const VRegister& vd, |
| 3449 |
const VRegister& vn, |
| 3450 |
int shift); |
| 3451 |
|
| 3452 |
// Shift right by immediate and insert. |
| 3453 |
void sri(const VRegister& vd, |
| 3454 |
const VRegister& vn, |
| 3455 |
int shift); |
| 3456 |
|
| 3457 |
// Signed maximum. |
| 3458 |
void smax(const VRegister& vd, |
| 3459 |
const VRegister& vn, |
| 3460 |
const VRegister& vm); |
| 3461 |
|
| 3462 |
// Signed pairwise maximum. |
| 3463 |
void smaxp(const VRegister& vd, |
| 3464 |
const VRegister& vn, |
| 3465 |
const VRegister& vm); |
| 3466 |
|
| 3467 |
// Add across vector. |
| 3468 |
void addv(const VRegister& vd, |
| 3469 |
const VRegister& vn); |
| 3470 |
|
| 3471 |
// Signed add long across vector. |
| 3472 |
void saddlv(const VRegister& vd, |
| 3473 |
const VRegister& vn); |
| 3474 |
|
| 3475 |
// Unsigned add long across vector. |
| 3476 |
void uaddlv(const VRegister& vd, |
| 3477 |
const VRegister& vn); |
| 3478 |
|
| 3479 |
// FP maximum number across vector. |
| 3480 |
void fmaxnmv(const VRegister& vd, |
| 3481 |
const VRegister& vn); |
| 3482 |
|
| 3483 |
// FP maximum across vector. |
| 3484 |
void fmaxv(const VRegister& vd, |
| 3485 |
const VRegister& vn); |
| 3486 |
|
| 3487 |
// FP minimum number across vector. |
| 3488 |
void fminnmv(const VRegister& vd, |
| 3489 |
const VRegister& vn); |
| 3490 |
|
| 3491 |
// FP minimum across vector. |
| 3492 |
void fminv(const VRegister& vd, |
| 3493 |
const VRegister& vn); |
| 3494 |
|
| 3495 |
// Signed maximum across vector. |
| 3496 |
void smaxv(const VRegister& vd, |
| 3497 |
const VRegister& vn); |
| 3498 |
|
| 3499 |
// Signed minimum. |
| 3500 |
void smin(const VRegister& vd, |
| 3501 |
const VRegister& vn, |
| 3502 |
const VRegister& vm); |
| 3503 |
|
| 3504 |
// Signed minimum pairwise. |
| 3505 |
void sminp(const VRegister& vd, |
| 3506 |
const VRegister& vn, |
| 3507 |
const VRegister& vm); |
| 3508 |
|
| 3509 |
// Signed minimum across vector. |
| 3510 |
void sminv(const VRegister& vd, |
| 3511 |
const VRegister& vn); |
| 3512 |
|
| 3513 |
// One-element structure store from one register. |
| 3514 |
void st1(const VRegister& vt, |
| 3515 |
const MemOperand& src); |
| 3516 |
|
| 3517 |
// One-element structure store from two registers. |
| 3518 |
void st1(const VRegister& vt, |
| 3519 |
const VRegister& vt2, |
| 3520 |
const MemOperand& src); |
| 3521 |
|
| 3522 |
// One-element structure store from three registers. |
| 3523 |
void st1(const VRegister& vt, |
| 3524 |
const VRegister& vt2, |
| 3525 |
const VRegister& vt3, |
| 3526 |
const MemOperand& src); |
| 3527 |
|
| 3528 |
// One-element structure store from four registers. |
| 3529 |
void st1(const VRegister& vt, |
| 3530 |
const VRegister& vt2, |
| 3531 |
const VRegister& vt3, |
| 3532 |
const VRegister& vt4, |
| 3533 |
const MemOperand& src); |
| 3534 |
|
| 3535 |
// One-element single structure store from one lane. |
| 3536 |
void st1(const VRegister& vt, |
| 3537 |
int lane, |
| 3538 |
const MemOperand& src); |
| 3539 |
|
| 3540 |
// Two-element structure store from two registers. |
| 3541 |
void st2(const VRegister& vt, |
| 3542 |
const VRegister& vt2, |
| 3543 |
const MemOperand& src); |
| 3544 |
|
| 3545 |
// Two-element single structure store from two lanes. |
| 3546 |
void st2(const VRegister& vt, |
| 3547 |
const VRegister& vt2, |
| 3548 |
int lane, |
| 3549 |
const MemOperand& src); |
| 3550 |
|
| 3551 |
// Three-element structure store from three registers. |
| 3552 |
void st3(const VRegister& vt, |
| 3553 |
const VRegister& vt2, |
| 3554 |
const VRegister& vt3, |
| 3555 |
const MemOperand& src); |
| 3556 |
|
| 3557 |
// Three-element single structure store from three lanes. |
| 3558 |
void st3(const VRegister& vt, |
| 3559 |
const VRegister& vt2, |
| 3560 |
const VRegister& vt3, |
| 3561 |
int lane, |
| 3562 |
const MemOperand& src); |
| 3563 |
|
| 3564 |
// Four-element structure store from four registers. |
| 3565 |
void st4(const VRegister& vt, |
| 3566 |
const VRegister& vt2, |
| 3567 |
const VRegister& vt3, |
| 3568 |
const VRegister& vt4, |
| 3569 |
const MemOperand& src); |
| 3570 |
|
| 3571 |
// Four-element single structure store from four lanes. |
| 3572 |
void st4(const VRegister& vt, |
| 3573 |
const VRegister& vt2, |
| 3574 |
const VRegister& vt3, |
| 3575 |
const VRegister& vt4, |
| 3576 |
int lane, |
| 3577 |
const MemOperand& src); |
| 3578 |
|
| 3579 |
// Unsigned add long. |
| 3580 |
void uaddl(const VRegister& vd, |
| 3581 |
const VRegister& vn, |
| 3582 |
const VRegister& vm); |
| 3583 |
|
| 3584 |
// Unsigned add long (second part). |
| 3585 |
void uaddl2(const VRegister& vd, |
| 3586 |
const VRegister& vn, |
| 3587 |
const VRegister& vm); |
| 3588 |
|
| 3589 |
// Unsigned add wide. |
| 3590 |
void uaddw(const VRegister& vd, |
| 3591 |
const VRegister& vn, |
| 3592 |
const VRegister& vm); |
| 3593 |
|
| 3594 |
// Unsigned add wide (second part). |
| 3595 |
void uaddw2(const VRegister& vd, |
| 3596 |
const VRegister& vn, |
| 3597 |
const VRegister& vm); |
| 3598 |
|
| 3599 |
// Signed add long. |
| 3600 |
void saddl(const VRegister& vd, |
| 3601 |
const VRegister& vn, |
| 3602 |
const VRegister& vm); |
| 3603 |
|
| 3604 |
// Signed add long (second part). |
| 3605 |
void saddl2(const VRegister& vd, |
| 3606 |
const VRegister& vn, |
| 3607 |
const VRegister& vm); |
| 3608 |
|
| 3609 |
// Signed add wide. |
| 3610 |
void saddw(const VRegister& vd, |
| 3611 |
const VRegister& vn, |
| 3612 |
const VRegister& vm); |
| 3613 |
|
| 3614 |
// Signed add wide (second part). |
| 3615 |
void saddw2(const VRegister& vd, |
| 3616 |
const VRegister& vn, |
| 3617 |
const VRegister& vm); |
| 3618 |
|
| 3619 |
// Unsigned subtract long. |
| 3620 |
void usubl(const VRegister& vd, |
| 3621 |
const VRegister& vn, |
| 3622 |
const VRegister& vm); |
| 3623 |
|
| 3624 |
// Unsigned subtract long (second part). |
| 3625 |
void usubl2(const VRegister& vd, |
| 3626 |
const VRegister& vn, |
| 3627 |
const VRegister& vm); |
| 3628 |
|
| 3629 |
// Unsigned subtract wide. |
| 3630 |
void usubw(const VRegister& vd, |
| 3631 |
const VRegister& vn, |
| 3632 |
const VRegister& vm); |
| 3633 |
|
| 3634 |
// Unsigned subtract wide (second part). |
| 3635 |
void usubw2(const VRegister& vd, |
| 3636 |
const VRegister& vn, |
| 3637 |
const VRegister& vm); |
| 3638 |
|
| 3639 |
// Signed subtract long. |
| 3640 |
void ssubl(const VRegister& vd, |
| 3641 |
const VRegister& vn, |
| 3642 |
const VRegister& vm); |
| 3643 |
|
| 3644 |
// Signed subtract long (second part). |
| 3645 |
void ssubl2(const VRegister& vd, |
| 3646 |
const VRegister& vn, |
| 3647 |
const VRegister& vm); |
| 3648 |
|
| 3649 |
// Signed integer subtract wide. |
| 3650 |
void ssubw(const VRegister& vd, |
| 3651 |
const VRegister& vn, |
| 3652 |
const VRegister& vm); |
| 3653 |
|
| 3654 |
// Signed integer subtract wide (second part). |
| 3655 |
void ssubw2(const VRegister& vd, |
| 3656 |
const VRegister& vn, |
| 3657 |
const VRegister& vm); |
| 3658 |
|
| 3659 |
// Unsigned maximum. |
| 3660 |
void umax(const VRegister& vd, |
| 3661 |
const VRegister& vn, |
| 3662 |
const VRegister& vm); |
| 3663 |
|
| 3664 |
// Unsigned pairwise maximum. |
| 3665 |
void umaxp(const VRegister& vd, |
| 3666 |
const VRegister& vn, |
| 3667 |
const VRegister& vm); |
| 3668 |
|
| 3669 |
// Unsigned maximum across vector. |
| 3670 |
void umaxv(const VRegister& vd, |
| 3671 |
const VRegister& vn); |
| 3672 |
|
| 3673 |
// Unsigned minimum. |
| 3674 |
void umin(const VRegister& vd, |
| 3675 |
const VRegister& vn, |
| 3676 |
const VRegister& vm); |
| 3677 |
|
| 3678 |
// Unsigned pairwise minimum. |
| 3679 |
void uminp(const VRegister& vd, |
| 3680 |
const VRegister& vn, |
| 3681 |
const VRegister& vm); |
| 3682 |
|
| 3683 |
// Unsigned minimum across vector. |
| 3684 |
void uminv(const VRegister& vd, |
| 3685 |
const VRegister& vn); |
| 3686 |
|
| 3687 |
// Transpose vectors (primary). |
| 3688 |
void trn1(const VRegister& vd, |
| 3689 |
const VRegister& vn, |
| 3690 |
const VRegister& vm); |
| 3691 |
|
| 3692 |
// Transpose vectors (secondary). |
| 3693 |
void trn2(const VRegister& vd, |
| 3694 |
const VRegister& vn, |
| 3695 |
const VRegister& vm); |
| 3696 |
|
| 3697 |
// Unzip vectors (primary). |
| 3698 |
void uzp1(const VRegister& vd, |
| 3699 |
const VRegister& vn, |
| 3700 |
const VRegister& vm); |
| 3701 |
|
| 3702 |
// Unzip vectors (secondary). |
| 3703 |
void uzp2(const VRegister& vd, |
| 3704 |
const VRegister& vn, |
| 3705 |
const VRegister& vm); |
| 3706 |
|
| 3707 |
// Zip vectors (primary). |
| 3708 |
void zip1(const VRegister& vd, |
| 3709 |
const VRegister& vn, |
| 3710 |
const VRegister& vm); |
| 3711 |
|
| 3712 |
// Zip vectors (secondary). |
| 3713 |
void zip2(const VRegister& vd, |
| 3714 |
const VRegister& vn, |
| 3715 |
const VRegister& vm); |
| 3716 |
|
| 3717 |
// Signed shift right by immediate. |
| 3718 |
void sshr(const VRegister& vd, |
| 3719 |
const VRegister& vn, |
| 3720 |
int shift); |
| 3721 |
|
| 3722 |
// Unsigned shift right by immediate. |
| 3723 |
void ushr(const VRegister& vd, |
| 3724 |
const VRegister& vn, |
| 3725 |
int shift); |
| 3726 |
|
| 3727 |
// Signed rounding shift right by immediate. |
| 3728 |
void srshr(const VRegister& vd, |
| 3729 |
const VRegister& vn, |
| 3730 |
int shift); |
| 3731 |
|
| 3732 |
// Unsigned rounding shift right by immediate. |
| 3733 |
void urshr(const VRegister& vd, |
| 3734 |
const VRegister& vn, |
| 3735 |
int shift); |
| 3736 |
|
| 3737 |
// Signed shift right by immediate and accumulate. |
| 3738 |
void ssra(const VRegister& vd, |
| 3739 |
const VRegister& vn, |
| 3740 |
int shift); |
| 3741 |
|
| 3742 |
// Unsigned shift right by immediate and accumulate. |
| 3743 |
void usra(const VRegister& vd, |
| 3744 |
const VRegister& vn, |
| 3745 |
int shift); |
| 3746 |
|
| 3747 |
// Signed rounding shift right by immediate and accumulate. |
| 3748 |
void srsra(const VRegister& vd, |
| 3749 |
const VRegister& vn, |
| 3750 |
int shift); |
| 3751 |
|
| 3752 |
// Unsigned rounding shift right by immediate and accumulate. |
| 3753 |
void ursra(const VRegister& vd, |
| 3754 |
const VRegister& vn, |
| 3755 |
int shift); |
| 3756 |
|
| 3757 |
// Shift right narrow by immediate. |
| 3758 |
void shrn(const VRegister& vd, |
| 3759 |
const VRegister& vn, |
| 3760 |
int shift); |
| 3761 |
|
| 3762 |
// Shift right narrow by immediate (second part). |
| 3763 |
void shrn2(const VRegister& vd, |
| 3764 |
const VRegister& vn, |
| 3765 |
int shift); |
| 3766 |
|
| 3767 |
// Rounding shift right narrow by immediate. |
| 3768 |
void rshrn(const VRegister& vd, |
| 3769 |
const VRegister& vn, |
| 3770 |
int shift); |
| 3771 |
|
| 3772 |
// Rounding shift right narrow by immediate (second part). |
| 3773 |
void rshrn2(const VRegister& vd, |
| 3774 |
const VRegister& vn, |
| 3775 |
int shift); |
| 3776 |
|
| 3777 |
// Unsigned saturating shift right narrow by immediate. |
| 3778 |
void uqshrn(const VRegister& vd, |
| 3779 |
const VRegister& vn, |
| 3780 |
int shift); |
| 3781 |
|
| 3782 |
// Unsigned saturating shift right narrow by immediate (second part). |
| 3783 |
void uqshrn2(const VRegister& vd, |
| 3784 |
const VRegister& vn, |
| 3785 |
int shift); |
| 3786 |
|
| 3787 |
// Unsigned saturating rounding shift right narrow by immediate. |
| 3788 |
void uqrshrn(const VRegister& vd, |
| 3789 |
const VRegister& vn, |
| 3790 |
int shift); |
| 3791 |
|
| 3792 |
// Unsigned saturating rounding shift right narrow by immediate (second part). |
| 3793 |
void uqrshrn2(const VRegister& vd, |
| 3794 |
const VRegister& vn, |
| 3795 |
int shift); |
| 3796 |
|
| 3797 |
// Signed saturating shift right narrow by immediate. |
| 3798 |
void sqshrn(const VRegister& vd, |
| 3799 |
const VRegister& vn, |
| 3800 |
int shift); |
| 3801 |
|
| 3802 |
// Signed saturating shift right narrow by immediate (second part). |
| 3803 |
void sqshrn2(const VRegister& vd, |
| 3804 |
const VRegister& vn, |
| 3805 |
int shift); |
| 3806 |
|
| 3807 |
// Signed saturating rounded shift right narrow by immediate. |
| 3808 |
void sqrshrn(const VRegister& vd, |
| 3809 |
const VRegister& vn, |
| 3810 |
int shift); |
| 3811 |
|
| 3812 |
// Signed saturating rounded shift right narrow by immediate (second part). |
| 3813 |
void sqrshrn2(const VRegister& vd, |
| 3814 |
const VRegister& vn, |
| 3815 |
int shift); |
| 3816 |
|
| 3817 |
// Signed saturating shift right unsigned narrow by immediate. |
| 3818 |
void sqshrun(const VRegister& vd, |
| 3819 |
const VRegister& vn, |
| 3820 |
int shift); |
| 3821 |
|
| 3822 |
// Signed saturating shift right unsigned narrow by immediate (second part). |
| 3823 |
void sqshrun2(const VRegister& vd, |
| 3824 |
const VRegister& vn, |
| 3825 |
int shift); |
| 3826 |
|
| 3827 |
// Signed sat rounded shift right unsigned narrow by immediate. |
| 3828 |
void sqrshrun(const VRegister& vd, |
| 3829 |
const VRegister& vn, |
| 3830 |
int shift); |
| 3831 |
|
| 3832 |
// Signed sat rounded shift right unsigned narrow by immediate (second part). |
| 3833 |
void sqrshrun2(const VRegister& vd, |
| 3834 |
const VRegister& vn, |
| 3835 |
int shift); |
| 3836 |
|
| 3837 |
// FP reciprocal step. |
| 3838 |
void frecps(const VRegister& vd, |
| 3839 |
const VRegister& vn, |
| 3840 |
const VRegister& vm); |
| 3841 |
|
| 3842 |
// FP reciprocal estimate. |
| 3843 |
void frecpe(const VRegister& vd, |
| 3844 |
const VRegister& vn); |
| 3845 |
|
| 3846 |
// FP reciprocal square root estimate. |
| 3847 |
void frsqrte(const VRegister& vd, |
| 3848 |
const VRegister& vn); |
| 3849 |
|
| 3850 |
// FP reciprocal square root step. |
| 3851 |
void frsqrts(const VRegister& vd, |
| 3852 |
const VRegister& vn, |
| 3853 |
const VRegister& vm); |
| 3854 |
|
| 3855 |
// Signed absolute difference and accumulate long. |
| 3856 |
void sabal(const VRegister& vd, |
| 3857 |
const VRegister& vn, |
| 3858 |
const VRegister& vm); |
| 3859 |
|
| 3860 |
// Signed absolute difference and accumulate long (second part). |
| 3861 |
void sabal2(const VRegister& vd, |
| 3862 |
const VRegister& vn, |
| 3863 |
const VRegister& vm); |
| 3864 |
|
| 3865 |
// Unsigned absolute difference and accumulate long. |
| 3866 |
void uabal(const VRegister& vd, |
| 3867 |
const VRegister& vn, |
| 3868 |
const VRegister& vm); |
| 3869 |
|
| 3870 |
// Unsigned absolute difference and accumulate long (second part). |
| 3871 |
void uabal2(const VRegister& vd, |
| 3872 |
const VRegister& vn, |
| 3873 |
const VRegister& vm); |
| 3874 |
|
| 3875 |
// Signed absolute difference long. |
| 3876 |
void sabdl(const VRegister& vd, |
| 3877 |
const VRegister& vn, |
| 3878 |
const VRegister& vm); |
| 3879 |
|
| 3880 |
// Signed absolute difference long (second part). |
| 3881 |
void sabdl2(const VRegister& vd, |
| 3882 |
const VRegister& vn, |
| 3883 |
const VRegister& vm); |
| 3884 |
|
| 3885 |
// Unsigned absolute difference long. |
| 3886 |
void uabdl(const VRegister& vd, |
| 3887 |
const VRegister& vn, |
| 3888 |
const VRegister& vm); |
| 3889 |
|
| 3890 |
// Unsigned absolute difference long (second part). |
| 3891 |
void uabdl2(const VRegister& vd, |
| 3892 |
const VRegister& vn, |
| 3893 |
const VRegister& vm); |
| 3894 |
|
| 3895 |
// Polynomial multiply long. |
| 3896 |
void pmull(const VRegister& vd, |
| 3897 |
const VRegister& vn, |
| 3898 |
const VRegister& vm); |
| 3899 |
|
| 3900 |
// Polynomial multiply long (second part). |
| 3901 |
void pmull2(const VRegister& vd, |
| 3902 |
const VRegister& vn, |
| 3903 |
const VRegister& vm); |
| 3904 |
|
| 3905 |
// Signed long multiply-add. |
| 3906 |
void smlal(const VRegister& vd, |
| 3907 |
const VRegister& vn, |
| 3908 |
const VRegister& vm); |
| 3909 |
|
| 3910 |
// Signed long multiply-add (second part). |
| 3911 |
void smlal2(const VRegister& vd, |
| 3912 |
const VRegister& vn, |
| 3913 |
const VRegister& vm); |
| 3914 |
|
| 3915 |
// Unsigned long multiply-add. |
| 3916 |
void umlal(const VRegister& vd, |
| 3917 |
const VRegister& vn, |
| 3918 |
const VRegister& vm); |
| 3919 |
|
| 3920 |
// Unsigned long multiply-add (second part). |
| 3921 |
void umlal2(const VRegister& vd, |
| 3922 |
const VRegister& vn, |
| 3923 |
const VRegister& vm); |
| 3924 |
|
| 3925 |
// Signed long multiply-sub. |
| 3926 |
void smlsl(const VRegister& vd, |
| 3927 |
const VRegister& vn, |
| 3928 |
const VRegister& vm); |
| 3929 |
|
| 3930 |
// Signed long multiply-sub (second part). |
| 3931 |
void smlsl2(const VRegister& vd, |
| 3932 |
const VRegister& vn, |
| 3933 |
const VRegister& vm); |
| 3934 |
|
| 3935 |
// Unsigned long multiply-sub. |
| 3936 |
void umlsl(const VRegister& vd, |
| 3937 |
const VRegister& vn, |
| 3938 |
const VRegister& vm); |
| 3939 |
|
| 3940 |
// Unsigned long multiply-sub (second part). |
| 3941 |
void umlsl2(const VRegister& vd, |
| 3942 |
const VRegister& vn, |
| 3943 |
const VRegister& vm); |
| 3944 |
|
| 3945 |
// Signed long multiply. |
| 3946 |
void smull(const VRegister& vd, |
| 3947 |
const VRegister& vn, |
| 3948 |
const VRegister& vm); |
| 3949 |
|
| 3950 |
// Signed long multiply (second part). |
| 3951 |
void smull2(const VRegister& vd, |
| 3952 |
const VRegister& vn, |
| 3953 |
const VRegister& vm); |
| 3954 |
|
| 3955 |
// Signed saturating doubling long multiply-add. |
| 3956 |
void sqdmlal(const VRegister& vd, |
| 3957 |
const VRegister& vn, |
| 3958 |
const VRegister& vm); |
| 3959 |
|
| 3960 |
// Signed saturating doubling long multiply-add (second part). |
| 3961 |
void sqdmlal2(const VRegister& vd, |
| 3962 |
const VRegister& vn, |
| 3963 |
const VRegister& vm); |
| 3964 |
|
| 3965 |
// Signed saturating doubling long multiply-subtract. |
| 3966 |
void sqdmlsl(const VRegister& vd, |
| 3967 |
const VRegister& vn, |
| 3968 |
const VRegister& vm); |
| 3969 |
|
| 3970 |
// Signed saturating doubling long multiply-subtract (second part). |
| 3971 |
void sqdmlsl2(const VRegister& vd, |
| 3972 |
const VRegister& vn, |
| 3973 |
const VRegister& vm); |
| 3974 |
|
| 3975 |
// Signed saturating doubling long multiply. |
| 3976 |
void sqdmull(const VRegister& vd, |
| 3977 |
const VRegister& vn, |
| 3978 |
const VRegister& vm); |
| 3979 |
|
| 3980 |
// Signed saturating doubling long multiply (second part). |
| 3981 |
void sqdmull2(const VRegister& vd, |
| 3982 |
const VRegister& vn, |
| 3983 |
const VRegister& vm); |
| 3984 |
|
| 3985 |
// Signed saturating doubling multiply returning high half. |
| 3986 |
void sqdmulh(const VRegister& vd, |
| 3987 |
const VRegister& vn, |
| 3988 |
const VRegister& vm); |
| 3989 |
|
| 3990 |
// Signed saturating rounding doubling multiply returning high half. |
| 3991 |
void sqrdmulh(const VRegister& vd, |
| 3992 |
const VRegister& vn, |
| 3993 |
const VRegister& vm); |
| 3994 |
|
| 3995 |
// Signed saturating doubling multiply element returning high half. |
| 3996 |
void sqdmulh(const VRegister& vd, |
| 3997 |
const VRegister& vn, |
| 3998 |
const VRegister& vm, |
| 3999 |
int vm_index); |
| 4000 |
|
| 4001 |
// Signed saturating rounding doubling multiply element returning high half. |
| 4002 |
void sqrdmulh(const VRegister& vd, |
| 4003 |
const VRegister& vn, |
| 4004 |
const VRegister& vm, |
| 4005 |
int vm_index); |
| 4006 |
|
| 4007 |
// Unsigned long multiply long. |
| 4008 |
void umull(const VRegister& vd, |
| 4009 |
const VRegister& vn, |
| 4010 |
const VRegister& vm); |
| 4011 |
|
| 4012 |
// Unsigned long multiply (second part). |
| 4013 |
void umull2(const VRegister& vd, |
| 4014 |
const VRegister& vn, |
| 4015 |
const VRegister& vm); |
| 4016 |
|
| 4017 |
// Add narrow returning high half. |
| 4018 |
void addhn(const VRegister& vd, |
| 4019 |
const VRegister& vn, |
| 4020 |
const VRegister& vm); |
| 4021 |
|
| 4022 |
// Add narrow returning high half (second part). |
| 4023 |
void addhn2(const VRegister& vd, |
| 4024 |
const VRegister& vn, |
| 4025 |
const VRegister& vm); |
| 4026 |
|
| 4027 |
// Rounding add narrow returning high half. |
| 4028 |
void raddhn(const VRegister& vd, |
| 4029 |
const VRegister& vn, |
| 4030 |
const VRegister& vm); |
| 4031 |
|
| 4032 |
// Rounding add narrow returning high half (second part). |
| 4033 |
void raddhn2(const VRegister& vd, |
| 4034 |
const VRegister& vn, |
| 4035 |
const VRegister& vm); |
| 4036 |
|
| 4037 |
// Subtract narrow returning high half. |
| 4038 |
void subhn(const VRegister& vd, |
| 4039 |
const VRegister& vn, |
| 4040 |
const VRegister& vm); |
| 4041 |
|
| 4042 |
// Subtract narrow returning high half (second part). |
| 4043 |
void subhn2(const VRegister& vd, |
| 4044 |
const VRegister& vn, |
| 4045 |
const VRegister& vm); |
| 4046 |
|
| 4047 |
// Rounding subtract narrow returning high half. |
| 4048 |
void rsubhn(const VRegister& vd, |
| 4049 |
const VRegister& vn, |
| 4050 |
const VRegister& vm); |
| 4051 |
|
| 4052 |
// Rounding subtract narrow returning high half (second part). |
| 4053 |
void rsubhn2(const VRegister& vd, |
| 4054 |
const VRegister& vn, |
| 4055 |
const VRegister& vm); |
| 4056 |
|
| 4057 |
// FP vector multiply accumulate. |
| 4058 |
void fmla(const VRegister& vd, |
| 4059 |
const VRegister& vn, |
| 4060 |
const VRegister& vm); |
| 4061 |
|
| 4062 |
// FP vector multiply subtract. |
| 4063 |
void fmls(const VRegister& vd, |
| 4064 |
const VRegister& vn, |
| 4065 |
const VRegister& vm); |
| 4066 |
|
| 4067 |
// FP vector multiply extended. |
| 4068 |
void fmulx(const VRegister& vd, |
| 4069 |
const VRegister& vn, |
| 4070 |
const VRegister& vm); |
| 4071 |
|
| 4072 |
// FP absolute greater than or equal. |
| 4073 |
void facge(const VRegister& vd, |
| 4074 |
const VRegister& vn, |
| 4075 |
const VRegister& vm); |
| 4076 |
|
| 4077 |
// FP absolute greater than. |
| 4078 |
void facgt(const VRegister& vd, |
| 4079 |
const VRegister& vn, |
| 4080 |
const VRegister& vm); |
| 4081 |
|
| 4082 |
// FP multiply by element. |
| 4083 |
void fmul(const VRegister& vd, |
| 4084 |
const VRegister& vn, |
| 4085 |
const VRegister& vm, |
| 4086 |
int vm_index); |
| 4087 |
|
| 4088 |
// FP fused multiply-add to accumulator by element. |
| 4089 |
void fmla(const VRegister& vd, |
| 4090 |
const VRegister& vn, |
| 4091 |
const VRegister& vm, |
| 4092 |
int vm_index); |
| 4093 |
|
| 4094 |
// FP fused multiply-sub from accumulator by element. |
| 4095 |
void fmls(const VRegister& vd, |
| 4096 |
const VRegister& vn, |
| 4097 |
const VRegister& vm, |
| 4098 |
int vm_index); |
| 4099 |
|
| 4100 |
// FP multiply extended by element. |
| 4101 |
void fmulx(const VRegister& vd, |
| 4102 |
const VRegister& vn, |
| 4103 |
const VRegister& vm, |
| 4104 |
int vm_index); |
| 4105 |
|
| 4106 |
// FP compare equal. |
| 4107 |
void fcmeq(const VRegister& vd, |
| 4108 |
const VRegister& vn, |
| 4109 |
const VRegister& vm); |
| 4110 |
|
| 4111 |
// FP greater than. |
| 4112 |
void fcmgt(const VRegister& vd, |
| 4113 |
const VRegister& vn, |
| 4114 |
const VRegister& vm); |
| 4115 |
|
| 4116 |
// FP greater than or equal. |
| 4117 |
void fcmge(const VRegister& vd, |
| 4118 |
const VRegister& vn, |
| 4119 |
const VRegister& vm); |
| 4120 |
|
| 4121 |
// FP compare equal to zero. |
| 4122 |
void fcmeq(const VRegister& vd, |
| 4123 |
const VRegister& vn, |
| 4124 |
double imm); |
| 4125 |
|
| 4126 |
// FP greater than zero. |
| 4127 |
void fcmgt(const VRegister& vd, |
| 4128 |
const VRegister& vn, |
| 4129 |
double imm); |
| 4130 |
|
| 4131 |
// FP greater than or equal to zero. |
| 4132 |
void fcmge(const VRegister& vd, |
| 4133 |
const VRegister& vn, |
| 4134 |
double imm); |
| 4135 |
|
| 4136 |
// FP less than or equal to zero. |
| 4137 |
void fcmle(const VRegister& vd, |
| 4138 |
const VRegister& vn, |
| 4139 |
double imm); |
| 4140 |
|
| 4141 |
// FP less than to zero. |
| 4142 |
void fcmlt(const VRegister& vd, |
| 4143 |
const VRegister& vn, |
| 4144 |
double imm); |
| 4145 |
|
| 4146 |
// FP absolute difference. |
| 4147 |
void fabd(const VRegister& vd, |
| 4148 |
const VRegister& vn, |
| 4149 |
const VRegister& vm); |
| 4150 |
|
| 4151 |
// FP pairwise add vector. |
| 4152 |
void faddp(const VRegister& vd, |
| 4153 |
const VRegister& vn, |
| 4154 |
const VRegister& vm); |
| 4155 |
|
| 4156 |
// FP pairwise add scalar. |
| 4157 |
void faddp(const VRegister& vd, |
| 4158 |
const VRegister& vn); |
| 4159 |
|
| 4160 |
// FP pairwise maximum vector. |
| 4161 |
void fmaxp(const VRegister& vd, |
| 4162 |
const VRegister& vn, |
| 4163 |
const VRegister& vm); |
| 4164 |
|
| 4165 |
// FP pairwise maximum scalar. |
| 4166 |
void fmaxp(const VRegister& vd, |
| 4167 |
const VRegister& vn); |
| 4168 |
|
| 4169 |
// FP pairwise minimum vector. |
| 4170 |
void fminp(const VRegister& vd, |
| 4171 |
const VRegister& vn, |
| 4172 |
const VRegister& vm); |
| 4173 |
|
| 4174 |
// FP pairwise minimum scalar. |
| 4175 |
void fminp(const VRegister& vd, |
| 4176 |
const VRegister& vn); |
| 4177 |
|
| 4178 |
// FP pairwise maximum number vector. |
| 4179 |
void fmaxnmp(const VRegister& vd, |
| 4180 |
const VRegister& vn, |
| 4181 |
const VRegister& vm); |
| 4182 |
|
| 4183 |
// FP pairwise maximum number scalar. |
| 4184 |
void fmaxnmp(const VRegister& vd, |
| 4185 |
const VRegister& vn); |
| 4186 |
|
| 4187 |
// FP pairwise minimum number vector. |
| 4188 |
void fminnmp(const VRegister& vd, |
| 4189 |
const VRegister& vn, |
| 4190 |
const VRegister& vm); |
| 4191 |
|
| 4192 |
// FP pairwise minimum number scalar. |
| 4193 |
void fminnmp(const VRegister& vd, |
| 4194 |
const VRegister& vn); |
| 4195 |
|
| 4196 |
// Emit generic instructions. |
| 4197 |
// Emit raw instructions into the instruction stream. |
| 4198 |
void dci(Instr raw_inst) { Emit(raw_inst); } |
| 4199 |
|
| 4200 |
// Emit 32 bits of data into the instruction stream. |
| 4201 |
void dc32(uint32_t data) { |
| 4202 |
EmitData(&data, sizeof(data)); |
| 4203 |
} |
| 4204 |
|
| 4205 |
// Emit 64 bits of data into the instruction stream. |
| 4206 |
void dc64(uint64_t data) { |
| 4207 |
EmitData(&data, sizeof(data)); |
| 4208 |
} |
| 4209 |
|
| 4210 |
// Code generation helpers. |
| 4211 |
|
| 4212 |
// Register encoding. |
| 4213 |
static Instr Rd(CPURegister rd) { |
| 4214 |
VIXL_ASSERT(rd.code() != kSPRegInternalCode); |
| 4215 |
return rd.code() << Rd_offset; |
| 4216 |
} |
| 4217 |
|
| 4218 |
static Instr Rn(CPURegister rn) { |
| 4219 |
VIXL_ASSERT(rn.code() != kSPRegInternalCode); |
| 4220 |
return rn.code() << Rn_offset; |
| 4221 |
} |
| 4222 |
|
| 4223 |
static Instr Rm(CPURegister rm) { |
| 4224 |
VIXL_ASSERT(rm.code() != kSPRegInternalCode); |
| 4225 |
return rm.code() << Rm_offset; |
| 4226 |
} |
| 4227 |
|
| 4228 |
static Instr RmNot31(CPURegister rm) { |
| 4229 |
VIXL_ASSERT(rm.code() != kSPRegInternalCode); |
| 4230 |
VIXL_ASSERT(!rm.IsZero()); |
| 4231 |
return Rm(rm); |
| 4232 |
} |
| 4233 |
|
| 4234 |
static Instr Ra(CPURegister ra) { |
| 4235 |
VIXL_ASSERT(ra.code() != kSPRegInternalCode); |
| 4236 |
return ra.code() << Ra_offset; |
| 4237 |
} |
| 4238 |
|
| 4239 |
static Instr Rt(CPURegister rt) { |
| 4240 |
VIXL_ASSERT(rt.code() != kSPRegInternalCode); |
| 4241 |
return rt.code() << Rt_offset; |
| 4242 |
} |
| 4243 |
|
| 4244 |
static Instr Rt2(CPURegister rt2) { |
| 4245 |
VIXL_ASSERT(rt2.code() != kSPRegInternalCode); |
| 4246 |
return rt2.code() << Rt2_offset; |
| 4247 |
} |
| 4248 |
|
| 4249 |
static Instr Rs(CPURegister rs) { |
| 4250 |
VIXL_ASSERT(rs.code() != kSPRegInternalCode); |
| 4251 |
return rs.code() << Rs_offset; |
| 4252 |
} |
| 4253 |
|
| 4254 |
// These encoding functions allow the stack pointer to be encoded, and |
| 4255 |
// disallow the zero register. |
| 4256 |
static Instr RdSP(Register rd) { |
| 4257 |
VIXL_ASSERT(!rd.IsZero()); |
| 4258 |
return (rd.code() & kRegCodeMask) << Rd_offset; |
| 4259 |
} |
| 4260 |
|
| 4261 |
static Instr RnSP(Register rn) { |
| 4262 |
VIXL_ASSERT(!rn.IsZero()); |
| 4263 |
return (rn.code() & kRegCodeMask) << Rn_offset; |
| 4264 |
} |
| 4265 |
|
| 4266 |
// Flags encoding. |
| 4267 |
static Instr Flags(FlagsUpdate S) { |
| 4268 |
if (S == SetFlags) { |
| 4269 |
return 1 << FlagsUpdate_offset; |
| 4270 |
} else if (S == LeaveFlags) { |
| 4271 |
return 0 << FlagsUpdate_offset; |
| 4272 |
} |
| 4273 |
VIXL_UNREACHABLE(); |
| 4274 |
return 0; |
| 4275 |
} |
| 4276 |
|
| 4277 |
static Instr Cond(Condition cond) { |
| 4278 |
return cond << Condition_offset; |
| 4279 |
} |
| 4280 |
|
| 4281 |
// PC-relative address encoding. |
| 4282 |
static Instr ImmPCRelAddress(int imm21) { |
| 4283 |
VIXL_ASSERT(IsInt21(imm21)); |
| 4284 |
Instr imm = static_cast<Instr>(TruncateToUint21(imm21)); |
| 4285 |
Instr immhi = (imm >> ImmPCRelLo_width) << ImmPCRelHi_offset; |
| 4286 |
Instr immlo = imm << ImmPCRelLo_offset; |
| 4287 |
return (immhi & ImmPCRelHi_mask) | (immlo & ImmPCRelLo_mask); |
| 4288 |
} |
| 4289 |
|
| 4290 |
// Branch encoding. |
| 4291 |
static Instr ImmUncondBranch(int imm26) { |
| 4292 |
VIXL_ASSERT(IsInt26(imm26)); |
| 4293 |
return TruncateToUint26(imm26) << ImmUncondBranch_offset; |
| 4294 |
} |
| 4295 |
|
| 4296 |
static Instr ImmCondBranch(int imm19) { |
| 4297 |
VIXL_ASSERT(IsInt19(imm19)); |
| 4298 |
return TruncateToUint19(imm19) << ImmCondBranch_offset; |
| 4299 |
} |
| 4300 |
|
| 4301 |
static Instr ImmCmpBranch(int imm19) { |
| 4302 |
VIXL_ASSERT(IsInt19(imm19)); |
| 4303 |
return TruncateToUint19(imm19) << ImmCmpBranch_offset; |
| 4304 |
} |
| 4305 |
|
| 4306 |
static Instr ImmTestBranch(int imm14) { |
| 4307 |
VIXL_ASSERT(IsInt14(imm14)); |
| 4308 |
return TruncateToUint14(imm14) << ImmTestBranch_offset; |
| 4309 |
} |
| 4310 |
|
| 4311 |
static Instr ImmTestBranchBit(unsigned bit_pos) { |
| 4312 |
VIXL_ASSERT(IsUint6(bit_pos)); |
| 4313 |
// Subtract five from the shift offset, as we need bit 5 from bit_pos. |
| 4314 |
unsigned b5 = bit_pos << (ImmTestBranchBit5_offset - 5); |
| 4315 |
unsigned b40 = bit_pos << ImmTestBranchBit40_offset; |
| 4316 |
b5 &= ImmTestBranchBit5_mask; |
| 4317 |
b40 &= ImmTestBranchBit40_mask; |
| 4318 |
return b5 | b40; |
| 4319 |
} |
| 4320 |
|
| 4321 |
// Data Processing encoding. |
| 4322 |
static Instr SF(Register rd) { |
| 4323 |
return rd.Is64Bits() ? SixtyFourBits : ThirtyTwoBits; |
| 4324 |
} |
| 4325 |
|
| 4326 |
static Instr ImmAddSub(int imm) { |
| 4327 |
VIXL_ASSERT(IsImmAddSub(imm)); |
| 4328 |
if (IsUint12(imm)) { // No shift required. |
| 4329 |
imm <<= ImmAddSub_offset; |
| 4330 |
} else { |
| 4331 |
imm = ((imm >> 12) << ImmAddSub_offset) | (1 << ShiftAddSub_offset); |
| 4332 |
} |
| 4333 |
return imm; |
| 4334 |
} |
| 4335 |
|
| 4336 |
static Instr ImmS(unsigned imms, unsigned reg_size) { |
| 4337 |
VIXL_ASSERT(((reg_size == kXRegSize) && IsUint6(imms)) || |
| 4338 |
((reg_size == kWRegSize) && IsUint5(imms))); |
| 4339 |
USE(reg_size); |
| 4340 |
return imms << ImmS_offset; |
| 4341 |
} |
| 4342 |
|
| 4343 |
static Instr ImmR(unsigned immr, unsigned reg_size) { |
| 4344 |
VIXL_ASSERT(((reg_size == kXRegSize) && IsUint6(immr)) || |
| 4345 |
((reg_size == kWRegSize) && IsUint5(immr))); |
| 4346 |
USE(reg_size); |
| 4347 |
VIXL_ASSERT(IsUint6(immr)); |
| 4348 |
return immr << ImmR_offset; |
| 4349 |
} |
| 4350 |
|
| 4351 |
static Instr ImmSetBits(unsigned imms, unsigned reg_size) { |
| 4352 |
VIXL_ASSERT((reg_size == kWRegSize) || (reg_size == kXRegSize)); |
| 4353 |
VIXL_ASSERT(IsUint6(imms)); |
| 4354 |
VIXL_ASSERT((reg_size == kXRegSize) || IsUint6(imms + 3)); |
| 4355 |
USE(reg_size); |
| 4356 |
return imms << ImmSetBits_offset; |
| 4357 |
} |
| 4358 |
|
| 4359 |
static Instr ImmRotate(unsigned immr, unsigned reg_size) { |
| 4360 |
VIXL_ASSERT((reg_size == kWRegSize) || (reg_size == kXRegSize)); |
| 4361 |
VIXL_ASSERT(((reg_size == kXRegSize) && IsUint6(immr)) || |
| 4362 |
((reg_size == kWRegSize) && IsUint5(immr))); |
| 4363 |
USE(reg_size); |
| 4364 |
return immr << ImmRotate_offset; |
| 4365 |
} |
| 4366 |
|
| 4367 |
static Instr ImmLLiteral(int imm19) { |
| 4368 |
VIXL_ASSERT(IsInt19(imm19)); |
| 4369 |
return TruncateToUint19(imm19) << ImmLLiteral_offset; |
| 4370 |
} |
| 4371 |
|
| 4372 |
static Instr BitN(unsigned bitn, unsigned reg_size) { |
| 4373 |
VIXL_ASSERT((reg_size == kWRegSize) || (reg_size == kXRegSize)); |
| 4374 |
VIXL_ASSERT((reg_size == kXRegSize) || (bitn == 0)); |
| 4375 |
USE(reg_size); |
| 4376 |
return bitn << BitN_offset; |
| 4377 |
} |
| 4378 |
|
| 4379 |
static Instr ShiftDP(Shift shift) { |
| 4380 |
VIXL_ASSERT(shift == LSL || shift == LSR || shift == ASR || shift == ROR); |
| 4381 |
return shift << ShiftDP_offset; |
| 4382 |
} |
| 4383 |
|
| 4384 |
static Instr ImmDPShift(unsigned amount) { |
| 4385 |
VIXL_ASSERT(IsUint6(amount)); |
| 4386 |
return amount << ImmDPShift_offset; |
| 4387 |
} |
| 4388 |
|
| 4389 |
static Instr ExtendMode(Extend extend) { |
| 4390 |
return extend << ExtendMode_offset; |
| 4391 |
} |
| 4392 |
|
| 4393 |
static Instr ImmExtendShift(unsigned left_shift) { |
| 4394 |
VIXL_ASSERT(left_shift <= 4); |
| 4395 |
return left_shift << ImmExtendShift_offset; |
| 4396 |
} |
| 4397 |
|
| 4398 |
static Instr ImmCondCmp(unsigned imm) { |
| 4399 |
VIXL_ASSERT(IsUint5(imm)); |
| 4400 |
return imm << ImmCondCmp_offset; |
| 4401 |
} |
| 4402 |
|
| 4403 |
static Instr Nzcv(StatusFlags nzcv) { |
| 4404 |
return ((nzcv >> Flags_offset) & 0xf) << Nzcv_offset; |
| 4405 |
} |
| 4406 |
|
| 4407 |
// MemOperand offset encoding. |
| 4408 |
static Instr ImmLSUnsigned(int imm12) { |
| 4409 |
VIXL_ASSERT(IsUint12(imm12)); |
| 4410 |
return imm12 << ImmLSUnsigned_offset; |
| 4411 |
} |
| 4412 |
|
| 4413 |
static Instr ImmLS(int imm9) { |
| 4414 |
VIXL_ASSERT(IsInt9(imm9)); |
| 4415 |
return TruncateToUint9(imm9) << ImmLS_offset; |
| 4416 |
} |
| 4417 |
|
| 4418 |
static Instr ImmLSPair(int imm7, unsigned access_size) { |
| 4419 |
VIXL_ASSERT(((imm7 >> access_size) << access_size) == imm7); |
| 4420 |
int scaled_imm7 = imm7 >> access_size; |
| 4421 |
VIXL_ASSERT(IsInt7(scaled_imm7)); |
| 4422 |
return TruncateToUint7(scaled_imm7) << ImmLSPair_offset; |
| 4423 |
} |
| 4424 |
|
| 4425 |
static Instr ImmShiftLS(unsigned shift_amount) { |
| 4426 |
VIXL_ASSERT(IsUint1(shift_amount)); |
| 4427 |
return shift_amount << ImmShiftLS_offset; |
| 4428 |
} |
| 4429 |
|
| 4430 |
static Instr ImmPrefetchOperation(int imm5) { |
| 4431 |
VIXL_ASSERT(IsUint5(imm5)); |
| 4432 |
return imm5 << ImmPrefetchOperation_offset; |
| 4433 |
} |
| 4434 |
|
| 4435 |
static Instr ImmException(int imm16) { |
| 4436 |
VIXL_ASSERT(IsUint16(imm16)); |
| 4437 |
return imm16 << ImmException_offset; |
| 4438 |
} |
| 4439 |
|
| 4440 |
static Instr ImmSystemRegister(int imm15) { |
| 4441 |
VIXL_ASSERT(IsUint15(imm15)); |
| 4442 |
return imm15 << ImmSystemRegister_offset; |
| 4443 |
} |
| 4444 |
|
| 4445 |
static Instr ImmHint(int imm7) { |
| 4446 |
VIXL_ASSERT(IsUint7(imm7)); |
| 4447 |
return imm7 << ImmHint_offset; |
| 4448 |
} |
| 4449 |
|
| 4450 |
static Instr CRm(int imm4) { |
| 4451 |
VIXL_ASSERT(IsUint4(imm4)); |
| 4452 |
return imm4 << CRm_offset; |
| 4453 |
} |
| 4454 |
|
| 4455 |
static Instr CRn(int imm4) { |
| 4456 |
VIXL_ASSERT(IsUint4(imm4)); |
| 4457 |
return imm4 << CRn_offset; |
| 4458 |
} |
| 4459 |
|
| 4460 |
static Instr SysOp(int imm14) { |
| 4461 |
VIXL_ASSERT(IsUint14(imm14)); |
| 4462 |
return imm14 << SysOp_offset; |
| 4463 |
} |
| 4464 |
|
| 4465 |
static Instr ImmSysOp1(int imm3) { |
| 4466 |
VIXL_ASSERT(IsUint3(imm3)); |
| 4467 |
return imm3 << SysOp1_offset; |
| 4468 |
} |
| 4469 |
|
| 4470 |
static Instr ImmSysOp2(int imm3) { |
| 4471 |
VIXL_ASSERT(IsUint3(imm3)); |
| 4472 |
return imm3 << SysOp2_offset; |
| 4473 |
} |
| 4474 |
|
| 4475 |
static Instr ImmBarrierDomain(int imm2) { |
| 4476 |
VIXL_ASSERT(IsUint2(imm2)); |
| 4477 |
return imm2 << ImmBarrierDomain_offset; |
| 4478 |
} |
| 4479 |
|
| 4480 |
static Instr ImmBarrierType(int imm2) { |
| 4481 |
VIXL_ASSERT(IsUint2(imm2)); |
| 4482 |
return imm2 << ImmBarrierType_offset; |
| 4483 |
} |
| 4484 |
|
| 4485 |
// Move immediates encoding. |
| 4486 |
static Instr ImmMoveWide(uint64_t imm) { |
| 4487 |
VIXL_ASSERT(IsUint16(imm)); |
| 4488 |
return static_cast<Instr>(imm << ImmMoveWide_offset); |
| 4489 |
} |
| 4490 |
|
| 4491 |
static Instr ShiftMoveWide(int64_t shift) { |
| 4492 |
VIXL_ASSERT(IsUint2(shift)); |
| 4493 |
return static_cast<Instr>(shift << ShiftMoveWide_offset); |
| 4494 |
} |
| 4495 |
|
| 4496 |
// FP Immediates. |
| 4497 |
static Instr ImmFP32(float imm); |
| 4498 |
static Instr ImmFP64(double imm); |
| 4499 |
|
| 4500 |
// FP register type. |
| 4501 |
static Instr FPType(FPRegister fd) { |
| 4502 |
return fd.Is64Bits() ? FP64 : FP32; |
| 4503 |
} |
| 4504 |
|
| 4505 |
static Instr FPScale(unsigned scale) { |
| 4506 |
VIXL_ASSERT(IsUint6(scale)); |
| 4507 |
return scale << FPScale_offset; |
| 4508 |
} |
| 4509 |
|
| 4510 |
// Immediate field checking helpers. |
| 4511 |
static bool IsImmAddSub(int64_t immediate); |
| 4512 |
static bool IsImmConditionalCompare(int64_t immediate); |
| 4513 |
static bool IsImmFP32(float imm); |
| 4514 |
static bool IsImmFP64(double imm); |
| 4515 |
static bool IsImmLogical(uint64_t value, |
| 4516 |
unsigned width, |
| 4517 |
unsigned* n = NULL, |
| 4518 |
unsigned* imm_s = NULL, |
| 4519 |
unsigned* imm_r = NULL); |
| 4520 |
static bool IsImmLSPair(int64_t offset, unsigned access_size); |
| 4521 |
static bool IsImmLSScaled(int64_t offset, unsigned access_size); |
| 4522 |
static bool IsImmLSUnscaled(int64_t offset); |
| 4523 |
static bool IsImmMovn(uint64_t imm, unsigned reg_size); |
| 4524 |
static bool IsImmMovz(uint64_t imm, unsigned reg_size); |
| 4525 |
|
| 4526 |
// Instruction bits for vector format in data processing operations. |
| 4527 |
static Instr VFormat(VRegister vd) { |
| 4528 |
if (vd.Is64Bits()) { |
| 4529 |
switch (vd.lanes()) { |
| 4530 |
case 2: return NEON_2S; |
| 4531 |
case 4: return NEON_4H; |
| 4532 |
case 8: return NEON_8B; |
| 4533 |
default: return 0xffffffff; |
| 4534 |
} |
| 4535 |
} else { |
| 4536 |
VIXL_ASSERT(vd.Is128Bits()); |
| 4537 |
switch (vd.lanes()) { |
| 4538 |
case 2: return NEON_2D; |
| 4539 |
case 4: return NEON_4S; |
| 4540 |
case 8: return NEON_8H; |
| 4541 |
case 16: return NEON_16B; |
| 4542 |
default: return 0xffffffff; |
| 4543 |
} |
| 4544 |
} |
| 4545 |
} |
| 4546 |
|
| 4547 |
// Instruction bits for vector format in floating point data processing |
| 4548 |
// operations. |
| 4549 |
static Instr FPFormat(VRegister vd) { |
| 4550 |
if (vd.lanes() == 1) { |
| 4551 |
// Floating point scalar formats. |
| 4552 |
VIXL_ASSERT(vd.Is32Bits() || vd.Is64Bits()); |
| 4553 |
return vd.Is64Bits() ? FP64 : FP32; |
| 4554 |
} |
| 4555 |
|
| 4556 |
// Two lane floating point vector formats. |
| 4557 |
if (vd.lanes() == 2) { |
| 4558 |
VIXL_ASSERT(vd.Is64Bits() || vd.Is128Bits()); |
| 4559 |
return vd.Is128Bits() ? NEON_FP_2D : NEON_FP_2S; |
| 4560 |
} |
| 4561 |
|
| 4562 |
// Four lane floating point vector format. |
| 4563 |
VIXL_ASSERT((vd.lanes() == 4) && vd.Is128Bits()); |
| 4564 |
return NEON_FP_4S; |
| 4565 |
} |
| 4566 |
|
| 4567 |
// Instruction bits for vector format in load and store operations. |
| 4568 |
static Instr LSVFormat(VRegister vd) { |
| 4569 |
if (vd.Is64Bits()) { |
| 4570 |
switch (vd.lanes()) { |
| 4571 |
case 1: return LS_NEON_1D; |
| 4572 |
case 2: return LS_NEON_2S; |
| 4573 |
case 4: return LS_NEON_4H; |
| 4574 |
case 8: return LS_NEON_8B; |
| 4575 |
default: return 0xffffffff; |
| 4576 |
} |
| 4577 |
} else { |
| 4578 |
VIXL_ASSERT(vd.Is128Bits()); |
| 4579 |
switch (vd.lanes()) { |
| 4580 |
case 2: return LS_NEON_2D; |
| 4581 |
case 4: return LS_NEON_4S; |
| 4582 |
case 8: return LS_NEON_8H; |
| 4583 |
case 16: return LS_NEON_16B; |
| 4584 |
default: return 0xffffffff; |
| 4585 |
} |
| 4586 |
} |
| 4587 |
} |
| 4588 |
|
| 4589 |
// Instruction bits for scalar format in data processing operations. |
| 4590 |
static Instr SFormat(VRegister vd) { |
| 4591 |
VIXL_ASSERT(vd.lanes() == 1); |
| 4592 |
switch (vd.SizeInBytes()) { |
| 4593 |
case 1: return NEON_B; |
| 4594 |
case 2: return NEON_H; |
| 4595 |
case 4: return NEON_S; |
| 4596 |
case 8: return NEON_D; |
| 4597 |
default: return 0xffffffff; |
| 4598 |
} |
| 4599 |
} |
| 4600 |
|
| 4601 |
static Instr ImmNEONHLM(int index, int num_bits) { |
| 4602 |
int h, l, m; |
| 4603 |
if (num_bits == 3) { |
| 4604 |
VIXL_ASSERT(IsUint3(index)); |
| 4605 |
h = (index >> 2) & 1; |
| 4606 |
l = (index >> 1) & 1; |
| 4607 |
m = (index >> 0) & 1; |
| 4608 |
} else if (num_bits == 2) { |
| 4609 |
VIXL_ASSERT(IsUint2(index)); |
| 4610 |
h = (index >> 1) & 1; |
| 4611 |
l = (index >> 0) & 1; |
| 4612 |
m = 0; |
| 4613 |
} else { |
| 4614 |
VIXL_ASSERT(IsUint1(index) && (num_bits == 1)); |
| 4615 |
h = (index >> 0) & 1; |
| 4616 |
l = 0; |
| 4617 |
m = 0; |
| 4618 |
} |
| 4619 |
return (h << NEONH_offset) | (l << NEONL_offset) | (m << NEONM_offset); |
| 4620 |
} |
| 4621 |
|
| 4622 |
static Instr ImmNEONExt(int imm4) { |
| 4623 |
VIXL_ASSERT(IsUint4(imm4)); |
| 4624 |
return imm4 << ImmNEONExt_offset; |
| 4625 |
} |
| 4626 |
|
| 4627 |
static Instr ImmNEON5(Instr format, int index) { |
| 4628 |
VIXL_ASSERT(IsUint4(index)); |
| 4629 |
int s = LaneSizeInBytesLog2FromFormat(static_cast<VectorFormat>(format)); |
| 4630 |
int imm5 = (index << (s + 1)) | (1 << s); |
| 4631 |
return imm5 << ImmNEON5_offset; |
| 4632 |
} |
| 4633 |
|
| 4634 |
static Instr ImmNEON4(Instr format, int index) { |
| 4635 |
VIXL_ASSERT(IsUint4(index)); |
| 4636 |
int s = LaneSizeInBytesLog2FromFormat(static_cast<VectorFormat>(format)); |
| 4637 |
int imm4 = index << s; |
| 4638 |
return imm4 << ImmNEON4_offset; |
| 4639 |
} |
| 4640 |
|
| 4641 |
static Instr ImmNEONabcdefgh(int imm8) { |
| 4642 |
VIXL_ASSERT(IsUint8(imm8)); |
| 4643 |
Instr instr; |
| 4644 |
instr = ((imm8 >> 5) & 7) << ImmNEONabc_offset; |
| 4645 |
instr |= (imm8 & 0x1f) << ImmNEONdefgh_offset; |
| 4646 |
return instr; |
| 4647 |
} |
| 4648 |
|
| 4649 |
static Instr NEONCmode(int cmode) { |
| 4650 |
VIXL_ASSERT(IsUint4(cmode)); |
| 4651 |
return cmode << NEONCmode_offset; |
| 4652 |
} |
| 4653 |
|
| 4654 |
static Instr NEONModImmOp(int op) { |
| 4655 |
VIXL_ASSERT(IsUint1(op)); |
| 4656 |
return op << NEONModImmOp_offset; |
| 4657 |
} |
| 4658 |
|
| 4659 |
size_t size() const { |
| 4660 |
return SizeOfCodeGenerated(); |
| 4661 |
} |
| 4662 |
|
| 4663 |
size_t SizeOfCodeGenerated() const { |
| 4664 |
return armbuffer_.size(); |
| 4665 |
} |
| 4666 |
|
| 4667 |
PositionIndependentCodeOption pic() const { |
| 4668 |
return pic_; |
| 4669 |
} |
| 4670 |
|
| 4671 |
CPUFeatures* GetCPUFeatures() { return &cpu_features_; } |
| 4672 |
|
| 4673 |
void SetCPUFeatures(const CPUFeatures& cpu_features) { |
| 4674 |
cpu_features_ = cpu_features; |
| 4675 |
} |
| 4676 |
|
| 4677 |
bool AllowPageOffsetDependentCode() const { |
| 4678 |
return (pic() == PageOffsetDependentCode) || |
| 4679 |
(pic() == PositionDependentCode); |
| 4680 |
} |
| 4681 |
|
| 4682 |
static const Register& AppropriateZeroRegFor(const CPURegister& reg) { |
| 4683 |
return reg.Is64Bits() ? xzr : wzr; |
| 4684 |
} |
| 4685 |
|
| 4686 |
|
| 4687 |
protected: |
| 4688 |
void LoadStore(const CPURegister& rt, |
| 4689 |
const MemOperand& addr, |
| 4690 |
LoadStoreOp op, |
| 4691 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 4692 |
|
| 4693 |
void LoadStorePair(const CPURegister& rt, |
| 4694 |
const CPURegister& rt2, |
| 4695 |
const MemOperand& addr, |
| 4696 |
LoadStorePairOp op); |
| 4697 |
void LoadStoreStruct(const VRegister& vt, |
| 4698 |
const MemOperand& addr, |
| 4699 |
NEONLoadStoreMultiStructOp op); |
| 4700 |
void LoadStoreStruct1(const VRegister& vt, |
| 4701 |
int reg_count, |
| 4702 |
const MemOperand& addr); |
| 4703 |
void LoadStoreStructSingle(const VRegister& vt, |
| 4704 |
uint32_t lane, |
| 4705 |
const MemOperand& addr, |
| 4706 |
NEONLoadStoreSingleStructOp op); |
| 4707 |
void LoadStoreStructSingleAllLanes(const VRegister& vt, |
| 4708 |
const MemOperand& addr, |
| 4709 |
NEONLoadStoreSingleStructOp op); |
| 4710 |
void LoadStoreStructVerify(const VRegister& vt, |
| 4711 |
const MemOperand& addr, |
| 4712 |
Instr op); |
| 4713 |
|
| 4714 |
void Prefetch(PrefetchOperation op, |
| 4715 |
const MemOperand& addr, |
| 4716 |
LoadStoreScalingOption option = PreferScaledOffset); |
| 4717 |
|
| 4718 |
BufferOffset Logical(const Register& rd, |
| 4719 |
const Register& rn, |
| 4720 |
const Operand& operand, |
| 4721 |
LogicalOp op); |
| 4722 |
BufferOffset LogicalImmediate(const Register& rd, |
| 4723 |
const Register& rn, |
| 4724 |
unsigned n, |
| 4725 |
unsigned imm_s, |
| 4726 |
unsigned imm_r, |
| 4727 |
LogicalOp op); |
| 4728 |
|
| 4729 |
void ConditionalCompare(const Register& rn, |
| 4730 |
const Operand& operand, |
| 4731 |
StatusFlags nzcv, |
| 4732 |
Condition cond, |
| 4733 |
ConditionalCompareOp op); |
| 4734 |
|
| 4735 |
void AddSubWithCarry(const Register& rd, |
| 4736 |
const Register& rn, |
| 4737 |
const Operand& operand, |
| 4738 |
FlagsUpdate S, |
| 4739 |
AddSubWithCarryOp op); |
| 4740 |
|
| 4741 |
|
| 4742 |
// Functions for emulating operands not directly supported by the instruction |
| 4743 |
// set. |
| 4744 |
void EmitShift(const Register& rd, |
| 4745 |
const Register& rn, |
| 4746 |
Shift shift, |
| 4747 |
unsigned amount); |
| 4748 |
void EmitExtendShift(const Register& rd, |
| 4749 |
const Register& rn, |
| 4750 |
Extend extend, |
| 4751 |
unsigned left_shift); |
| 4752 |
|
| 4753 |
void AddSub(const Register& rd, |
| 4754 |
const Register& rn, |
| 4755 |
const Operand& operand, |
| 4756 |
FlagsUpdate S, |
| 4757 |
AddSubOp op); |
| 4758 |
|
| 4759 |
void NEONTable(const VRegister& vd, |
| 4760 |
const VRegister& vn, |
| 4761 |
const VRegister& vm, |
| 4762 |
NEONTableOp op); |
| 4763 |
|
| 4764 |
// Find an appropriate LoadStoreOp or LoadStorePairOp for the specified |
| 4765 |
// registers. Only simple loads are supported; sign- and zero-extension (such |
| 4766 |
// as in LDPSW_x or LDRB_w) are not supported. |
| 4767 |
static LoadStoreOp LoadOpFor(const CPURegister& rt); |
| 4768 |
static LoadStorePairOp LoadPairOpFor(const CPURegister& rt, |
| 4769 |
const CPURegister& rt2); |
| 4770 |
static LoadStoreOp StoreOpFor(const CPURegister& rt); |
| 4771 |
static LoadStorePairOp StorePairOpFor(const CPURegister& rt, |
| 4772 |
const CPURegister& rt2); |
| 4773 |
static LoadStorePairNonTemporalOp LoadPairNonTemporalOpFor( |
| 4774 |
const CPURegister& rt, const CPURegister& rt2); |
| 4775 |
static LoadStorePairNonTemporalOp StorePairNonTemporalOpFor( |
| 4776 |
const CPURegister& rt, const CPURegister& rt2); |
| 4777 |
static LoadLiteralOp LoadLiteralOpFor(const CPURegister& rt); |
| 4778 |
|
| 4779 |
// Convenience pass-through for CPU feature checks. |
| 4780 |
bool CPUHas(CPUFeatures::Feature feature0, |
| 4781 |
CPUFeatures::Feature feature1 = CPUFeatures::kNone, |
| 4782 |
CPUFeatures::Feature feature2 = CPUFeatures::kNone, |
| 4783 |
CPUFeatures::Feature feature3 = CPUFeatures::kNone) const { |
| 4784 |
return cpu_features_.Has(feature0, feature1, feature2, feature3); |
| 4785 |
} |
| 4786 |
|
| 4787 |
// Determine whether the target CPU has the specified registers, based on the |
| 4788 |
// currently-enabled CPU features. Presence of a register does not imply |
| 4789 |
// support for arbitrary operations on it. For example, CPUs with FP have H |
| 4790 |
// registers, but most half-precision operations require the FPHalf feature. |
| 4791 |
// |
| 4792 |
// These are used to check CPU features in loads and stores that have the same |
| 4793 |
// entry point for both integer and FP registers. |
| 4794 |
bool CPUHas(const CPURegister& rt) const; |
| 4795 |
bool CPUHas(const CPURegister& rt, const CPURegister& rt2) const; |
| 4796 |
|
| 4797 |
bool CPUHas(SystemRegister sysreg) const; |
| 4798 |
|
| 4799 |
private: |
| 4800 |
static uint32_t FP32ToImm8(float imm); |
| 4801 |
static uint32_t FP64ToImm8(double imm); |
| 4802 |
|
| 4803 |
// Instruction helpers. |
| 4804 |
void MoveWide(const Register& rd, |
| 4805 |
uint64_t imm, |
| 4806 |
int shift, |
| 4807 |
MoveWideImmediateOp mov_op); |
| 4808 |
BufferOffset DataProcShiftedRegister(const Register& rd, |
| 4809 |
const Register& rn, |
| 4810 |
const Operand& operand, |
| 4811 |
FlagsUpdate S, |
| 4812 |
Instr op); |
| 4813 |
void DataProcExtendedRegister(const Register& rd, |
| 4814 |
const Register& rn, |
| 4815 |
const Operand& operand, |
| 4816 |
FlagsUpdate S, |
| 4817 |
Instr op); |
| 4818 |
void LoadStorePairNonTemporal(const CPURegister& rt, |
| 4819 |
const CPURegister& rt2, |
| 4820 |
const MemOperand& addr, |
| 4821 |
LoadStorePairNonTemporalOp op); |
| 4822 |
void LoadLiteral(const CPURegister& rt, uint64_t imm, LoadLiteralOp op); |
| 4823 |
void ConditionalSelect(const Register& rd, |
| 4824 |
const Register& rn, |
| 4825 |
const Register& rm, |
| 4826 |
Condition cond, |
| 4827 |
ConditionalSelectOp op); |
| 4828 |
void DataProcessing1Source(const Register& rd, |
| 4829 |
const Register& rn, |
| 4830 |
DataProcessing1SourceOp op); |
| 4831 |
void DataProcessing3Source(const Register& rd, |
| 4832 |
const Register& rn, |
| 4833 |
const Register& rm, |
| 4834 |
const Register& ra, |
| 4835 |
DataProcessing3SourceOp op); |
| 4836 |
void FPDataProcessing1Source(const VRegister& fd, |
| 4837 |
const VRegister& fn, |
| 4838 |
FPDataProcessing1SourceOp op); |
| 4839 |
void FPDataProcessing3Source(const VRegister& fd, |
| 4840 |
const VRegister& fn, |
| 4841 |
const VRegister& fm, |
| 4842 |
const VRegister& fa, |
| 4843 |
FPDataProcessing3SourceOp op); |
| 4844 |
void NEONAcrossLanesL(const VRegister& vd, |
| 4845 |
const VRegister& vn, |
| 4846 |
NEONAcrossLanesOp op); |
| 4847 |
void NEONAcrossLanes(const VRegister& vd, |
| 4848 |
const VRegister& vn, |
| 4849 |
NEONAcrossLanesOp op); |
| 4850 |
void NEONModifiedImmShiftLsl(const VRegister& vd, |
| 4851 |
const int imm8, |
| 4852 |
const int left_shift, |
| 4853 |
NEONModifiedImmediateOp op); |
| 4854 |
void NEONModifiedImmShiftMsl(const VRegister& vd, |
| 4855 |
const int imm8, |
| 4856 |
const int shift_amount, |
| 4857 |
NEONModifiedImmediateOp op); |
| 4858 |
void NEONFP2Same(const VRegister& vd, |
| 4859 |
const VRegister& vn, |
| 4860 |
Instr vop); |
| 4861 |
void NEON3Same(const VRegister& vd, |
| 4862 |
const VRegister& vn, |
| 4863 |
const VRegister& vm, |
| 4864 |
NEON3SameOp vop); |
| 4865 |
void NEONFP3Same(const VRegister& vd, |
| 4866 |
const VRegister& vn, |
| 4867 |
const VRegister& vm, |
| 4868 |
Instr op); |
| 4869 |
void NEON3DifferentL(const VRegister& vd, |
| 4870 |
const VRegister& vn, |
| 4871 |
const VRegister& vm, |
| 4872 |
NEON3DifferentOp vop); |
| 4873 |
void NEON3DifferentW(const VRegister& vd, |
| 4874 |
const VRegister& vn, |
| 4875 |
const VRegister& vm, |
| 4876 |
NEON3DifferentOp vop); |
| 4877 |
void NEON3DifferentHN(const VRegister& vd, |
| 4878 |
const VRegister& vn, |
| 4879 |
const VRegister& vm, |
| 4880 |
NEON3DifferentOp vop); |
| 4881 |
void NEONFP2RegMisc(const VRegister& vd, |
| 4882 |
const VRegister& vn, |
| 4883 |
NEON2RegMiscOp vop, |
| 4884 |
double value = 0.0); |
| 4885 |
void NEON2RegMisc(const VRegister& vd, |
| 4886 |
const VRegister& vn, |
| 4887 |
NEON2RegMiscOp vop, |
| 4888 |
int value = 0); |
| 4889 |
void NEONFP2RegMisc(const VRegister& vd, |
| 4890 |
const VRegister& vn, |
| 4891 |
Instr op); |
| 4892 |
void NEONAddlp(const VRegister& vd, |
| 4893 |
const VRegister& vn, |
| 4894 |
NEON2RegMiscOp op); |
| 4895 |
void NEONPerm(const VRegister& vd, |
| 4896 |
const VRegister& vn, |
| 4897 |
const VRegister& vm, |
| 4898 |
NEONPermOp op); |
| 4899 |
void NEONFPByElement(const VRegister& vd, |
| 4900 |
const VRegister& vn, |
| 4901 |
const VRegister& vm, |
| 4902 |
int vm_index, |
| 4903 |
NEONByIndexedElementOp op); |
| 4904 |
void NEONByElement(const VRegister& vd, |
| 4905 |
const VRegister& vn, |
| 4906 |
const VRegister& vm, |
| 4907 |
int vm_index, |
| 4908 |
NEONByIndexedElementOp op); |
| 4909 |
void NEONByElementL(const VRegister& vd, |
| 4910 |
const VRegister& vn, |
| 4911 |
const VRegister& vm, |
| 4912 |
int vm_index, |
| 4913 |
NEONByIndexedElementOp op); |
| 4914 |
void NEONShiftImmediate(const VRegister& vd, |
| 4915 |
const VRegister& vn, |
| 4916 |
NEONShiftImmediateOp op, |
| 4917 |
int immh_immb); |
| 4918 |
void NEONShiftLeftImmediate(const VRegister& vd, |
| 4919 |
const VRegister& vn, |
| 4920 |
int shift, |
| 4921 |
NEONShiftImmediateOp op); |
| 4922 |
void NEONShiftRightImmediate(const VRegister& vd, |
| 4923 |
const VRegister& vn, |
| 4924 |
int shift, |
| 4925 |
NEONShiftImmediateOp op); |
| 4926 |
void NEONShiftImmediateL(const VRegister& vd, |
| 4927 |
const VRegister& vn, |
| 4928 |
int shift, |
| 4929 |
NEONShiftImmediateOp op); |
| 4930 |
void NEONShiftImmediateN(const VRegister& vd, |
| 4931 |
const VRegister& vn, |
| 4932 |
int shift, |
| 4933 |
NEONShiftImmediateOp op); |
| 4934 |
void NEONXtn(const VRegister& vd, |
| 4935 |
const VRegister& vn, |
| 4936 |
NEON2RegMiscOp vop); |
| 4937 |
|
| 4938 |
Instr LoadStoreStructAddrModeField(const MemOperand& addr); |
| 4939 |
|
| 4940 |
// Encode the specified MemOperand for the specified access size and scaling |
| 4941 |
// preference. |
| 4942 |
Instr LoadStoreMemOperand(const MemOperand& addr, |
| 4943 |
unsigned access_size, |
| 4944 |
LoadStoreScalingOption option); |
| 4945 |
|
| 4946 |
protected: |
| 4947 |
// Prevent generation of a literal pool for the next |maxInst| instructions. |
| 4948 |
// Guarantees instruction linearity. |
| 4949 |
class AutoBlockLiteralPool { |
| 4950 |
ARMBuffer* armbuffer_; |
| 4951 |
|
| 4952 |
public: |
| 4953 |
AutoBlockLiteralPool(Assembler* assembler, size_t maxInst) |
| 4954 |
: armbuffer_(&assembler->armbuffer_) { |
| 4955 |
armbuffer_->enterNoPool(maxInst); |
| 4956 |
} |
| 4957 |
~AutoBlockLiteralPool() { |
| 4958 |
armbuffer_->leaveNoPool(); |
| 4959 |
} |
| 4960 |
}; |
| 4961 |
|
| 4962 |
protected: |
| 4963 |
// Buffer where the code is emitted. |
| 4964 |
PositionIndependentCodeOption pic_; |
| 4965 |
|
| 4966 |
CPUFeatures cpu_features_; |
| 4967 |
|
| 4968 |
#ifdef DEBUG |
| 4969 |
bool finalized_; |
| 4970 |
#endif |
| 4971 |
}; |
| 4972 |
|
| 4973 |
} // namespace vixl |
| 4974 |
|
| 4975 |
#endif // VIXL_A64_ASSEMBLER_A64_H_ |