1// -*- mode:c++ -*- 2 3// Copyright (c) 2011-2013, 2016 ARM Limited 4// All rights reserved 5// 6// The license below extends only to copyright in the software and shall 7// not be construed as granting a license to any other intellectual 8// property including but not limited to intellectual property relating --- 314 unchanged lines hidden (view full) --- 323 machInst, 324 is_vfp_neon ? 0x1E00000 : imm, 325 is_vfp_neon ? EC_TRAPPED_SIMD_FP : EC_TRAPPED_MSR_MRS_64); 326 } 327 ''' 328 329 buildDataXImmInst("mrs", ''' 330 MiscRegIndex flat_idx = (MiscRegIndex) xc->tcBase()-> |
331 flattenRegId(RegId(MiscRegClass, op1)).index(); |
332 CPSR cpsr = Cpsr; 333 ExceptionLevel el = (ExceptionLevel) (uint8_t) cpsr.el; 334 %s 335 XDest = MiscOp1_ud; 336 ''' % (msrMrs64EnabledCheckCode % ('Read', 'true'),), 337 ["IsSerializeBefore"]) 338 339 buildDataXRegInst("mrsNZCV", 1, ''' 340 CPSR cpsr = 0; 341 cpsr.nz = CondCodesNZ; 342 cpsr.c = CondCodesC; 343 cpsr.v = CondCodesV; 344 XDest = cpsr; 345 ''') 346 347 buildDataXImmInst("msr", ''' 348 MiscRegIndex flat_idx = (MiscRegIndex) xc->tcBase()-> |
349 flattenRegId(RegId(MiscRegClass, dest)).index(); |
350 CPSR cpsr = Cpsr; 351 ExceptionLevel el = (ExceptionLevel) (uint8_t) cpsr.el; 352 %s 353 MiscDest_ud = XOp1; 354 ''' % (msrMrs64EnabledCheckCode % ('Write', 'false'),), 355 ["IsSerializeAfter", "IsNonSpeculative"]) 356 357 buildDataXRegInst("msrNZCV", 1, ''' 358 CPSR cpsr = XOp1; 359 CondCodesNZ = cpsr.nz; 360 CondCodesC = cpsr.c; 361 CondCodesV = cpsr.v; 362 ''') 363 364 msrdczva_ea_code = ''' |
365 MiscRegIndex flat_idx = (MiscRegIndex) xc->tcBase()->flattenRegId( 366 RegId(MiscRegClass, dest)).index(); |
367 CPSR cpsr = Cpsr; 368 ExceptionLevel el = (ExceptionLevel) (uint8_t) cpsr.el; 369 ''' 370 371 msrdczva_ea_code += msrMrs64EnabledCheckCode % ('Write', 'false') 372 msrdczva_ea_code += ''' 373 Request::Flags memAccessFlags = Request::CACHE_BLOCK_ZERO|ArmISA::TLB::MustBeOne; 374 EA = XBase; --- 12 unchanged lines hidden (view full) --- 387 exec_output += DCStore64Execute.subst(msrDCZVAIop); 388 exec_output += DCStore64InitiateAcc.subst(msrDCZVAIop); 389 exec_output += Store64CompleteAcc.subst(msrDCZVAIop); 390 391 392 393 buildDataXImmInst("msrSP", ''' 394 if (!canWriteAArch64SysReg( |
395 (MiscRegIndex) xc->tcBase()->flattenRegId( 396 RegId(MiscRegClass, dest)).index(), |
397 Scr64, Cpsr, xc->tcBase())) { 398 return std::make_shared<UndefinedInstruction>(machInst, false, 399 mnemonic); 400 } 401 MiscDest_ud = imm; 402 ''', optArgs = ["IsSerializeAfter", "IsNonSpeculative"]) 403 404 buildDataXImmInst("msrDAIFSet", ''' 405 if (!canWriteAArch64SysReg( |
406 (MiscRegIndex) xc->tcBase()->flattenRegId( 407 RegId(MiscRegClass, dest)).index(), |
408 Scr64, Cpsr, xc->tcBase())) { 409 return std::make_shared<UndefinedInstruction>( 410 machInst, 0, EC_TRAPPED_MSR_MRS_64, 411 mnemonic); 412 } 413 CPSR cpsr = Cpsr; 414 cpsr.daif = cpsr.daif | imm; 415 Cpsr = cpsr; 416 ''', optArgs = ["IsSerializeAfter", "IsNonSpeculative"]) 417 418 buildDataXImmInst("msrDAIFClr", ''' 419 if (!canWriteAArch64SysReg( |
420 (MiscRegIndex) xc->tcBase()->flattenRegId( 421 RegId(MiscRegClass, dest)).index(), |
422 Scr64, Cpsr, xc->tcBase())) { 423 return std::make_shared<UndefinedInstruction>( 424 machInst, 0, EC_TRAPPED_MSR_MRS_64, 425 mnemonic); 426 } 427 CPSR cpsr = Cpsr; 428 cpsr.daif = cpsr.daif & ~imm; 429 Cpsr = cpsr; --- 51 unchanged lines hidden --- |