misc.isa (7307:e22429e8f4a0) misc.isa (7315:3a635c897874)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010 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

--- 532 unchanged lines hidden (view full) ---

541 Cpsr = cpsr;
542 '''
543 setendIop = InstObjParams("setend", "Setend", "ImmOp",
544 { "code": setendCode,
545 "predicate_test": predicateTest }, [])
546 header_output += ImmOpDeclare.subst(setendIop)
547 decoder_output += ImmOpConstructor.subst(setendIop)
548 exec_output += PredOpExecute.subst(setendIop)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010 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

--- 532 unchanged lines hidden (view full) ---

541 Cpsr = cpsr;
542 '''
543 setendIop = InstObjParams("setend", "Setend", "ImmOp",
544 { "code": setendCode,
545 "predicate_test": predicateTest }, [])
546 header_output += ImmOpDeclare.subst(setendIop)
547 decoder_output += ImmOpConstructor.subst(setendIop)
548 exec_output += PredOpExecute.subst(setendIop)
549
550 cpsCode = '''
551 uint32_t mode = bits(imm, 4, 0);
552 uint32_t f = bits(imm, 5);
553 uint32_t i = bits(imm, 6);
554 uint32_t a = bits(imm, 7);
555 bool setMode = bits(imm, 8);
556 bool enable = bits(imm, 9);
557 CPSR cpsr = Cpsr;
558 if (cpsr.mode != MODE_USER) {
559 if (enable) {
560 if (f) cpsr.f = 0;
561 if (i) cpsr.i = 0;
562 if (a) cpsr.a = 0;
563 } else {
564 if (f) cpsr.f = 1;
565 if (i) cpsr.i = 1;
566 if (a) cpsr.a = 1;
567 }
568 if (setMode) {
569 cpsr.mode = mode;
570 }
571 }
572 Cpsr = cpsr;
573 '''
574 cpsIop = InstObjParams("cps", "Cps", "ImmOp",
575 { "code": cpsCode,
576 "predicate_test": predicateTest }, [])
577 header_output += ImmOpDeclare.subst(cpsIop)
578 decoder_output += ImmOpConstructor.subst(cpsIop)
579 exec_output += PredOpExecute.subst(cpsIop)
549}};
580}};