@@ -27,8 +27,8 @@ class BranchPredictorARM(BranchPredictor, ArchARM):
2727
2828 stop = 'udf'
2929
30- def get_cpsr (self ) -> Tuple [bool , bool , bool , bool ]:
31- """Get flags map of CPSR.
30+ def get_cond_flags (self ) -> Tuple [bool , bool , bool , bool ]:
31+ """Get condition status flags from CPSR / xPSR .
3232 """
3333
3434 cpsr = self .read_reg (self ._flags_reg )
@@ -122,9 +122,9 @@ def __parse_op(op: ArmOp, *args, **kwargs) -> Optional[int]:
122122
123123 def __is_taken (cc : int ) -> Tuple [bool , Tuple [bool , ...]]:
124124 pred = predicate [cc ]
125- cpsr = self .get_cpsr ()
125+ flags = self .get_cond_flags ()
126126
127- return pred (* cpsr ), cpsr
127+ return pred (* flags ), flags
128128
129129 # conditions predicate selector
130130 predicate : Dict [int , Callable [..., bool ]] = {
@@ -215,13 +215,13 @@ def __is_taken(cc: int) -> Tuple[bool, Tuple[bool, ...]]:
215215 where = __parse_op (operands [1 ], ** msize [suffix ])
216216
217217 elif iname in binop :
218- going , cpsr = __is_taken (insn .cc )
218+ going , flags = __is_taken (insn .cc )
219219
220220 if going :
221221 operator = binop [iname ]
222222 op1 = __parse_op (operands [1 ])
223223 op2 = __parse_op (operands [2 ])
224- carry = int (cpsr [1 ])
224+ carry = int (flags [1 ])
225225
226226 where = (op1 and op2 ) and operator (op1 , op2 , carry )
227227
0 commit comments