pred.isa (6276:11dab30a70e8) | pred.isa (6423:727622fa50e5) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2007-2008 The Florida State University 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 91 unchanged lines hidden (view full) --- 100 ''' 101 102}}; 103 104let {{ 105 def getCcCode(flagtype): 106 icReg = icImm = iv = '' 107 if flagtype == "none": | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2007-2008 The Florida State University 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 91 unchanged lines hidden (view full) --- 100 ''' 101 102}}; 103 104let {{ 105 def getCcCode(flagtype): 106 icReg = icImm = iv = '' 107 if flagtype == "none": |
108 icReg = icImm = iv = '1' | 108 icReg = icImm = 'Cpsr<29:>' 109 iv = 'Cpsr<28:>' |
109 elif flagtype == "add": 110 icReg = icImm = 'findCarry(32, resTemp, Rn, op2)' 111 iv = 'findOverflow(32, resTemp, Rn, op2)' 112 elif flagtype == "sub": 113 icReg = icImm ='findCarry(32, resTemp, Rn, ~op2)' 114 iv = 'findOverflow(32, resTemp, Rn, ~op2)' 115 elif flagtype == "rsb": 116 icReg = icImm = 'findCarry(32, resTemp, op2, ~Rn)' 117 iv = 'findOverflow(32, resTemp, op2, ~Rn)' 118 else: 119 icReg = 'shift_carry_rs(Rm, Rs, shift, Cpsr<29:>)' 120 icImm = 'shift_carry_imm(Rm, shift_size, shift, Cpsr<29:>)' 121 iv = 'Cpsr<28:>' 122 return (calcCcCode % {"icValue" : icReg, "ivValue" : iv}, 123 calcCcCode % {"icValue" : icImm, "ivValue" : iv}) 124 125 def getImmCcCode(flagtype): 126 ivValue = icValue = '' 127 if flagtype == "none": | 110 elif flagtype == "add": 111 icReg = icImm = 'findCarry(32, resTemp, Rn, op2)' 112 iv = 'findOverflow(32, resTemp, Rn, op2)' 113 elif flagtype == "sub": 114 icReg = icImm ='findCarry(32, resTemp, Rn, ~op2)' 115 iv = 'findOverflow(32, resTemp, Rn, ~op2)' 116 elif flagtype == "rsb": 117 icReg = icImm = 'findCarry(32, resTemp, op2, ~Rn)' 118 iv = 'findOverflow(32, resTemp, op2, ~Rn)' 119 else: 120 icReg = 'shift_carry_rs(Rm, Rs, shift, Cpsr<29:>)' 121 icImm = 'shift_carry_imm(Rm, shift_size, shift, Cpsr<29:>)' 122 iv = 'Cpsr<28:>' 123 return (calcCcCode % {"icValue" : icReg, "ivValue" : iv}, 124 calcCcCode % {"icValue" : icImm, "ivValue" : iv}) 125 126 def getImmCcCode(flagtype): 127 ivValue = icValue = '' 128 if flagtype == "none": |
128 icValue = ivValue = '1' | 129 icValue = 'Cpsr<29:>' 130 ivValue = 'Cpsr<28:>' |
129 elif flagtype == "add": 130 icValue = 'findCarry(32, resTemp, Rn, rotated_imm)' 131 ivValue = 'findOverflow(32, resTemp, Rn, rotated_imm)' 132 elif flagtype == "sub": 133 icValue = 'findCarry(32, resTemp, Rn, ~rotated_imm)' 134 ivValue = 'findOverflow(32, resTemp, Rn, ~rotated_imm)' 135 elif flagtype == "rsb": 136 icValue = 'findCarry(32, resTemp, rotated_imm, ~Rn)' --- 122 unchanged lines hidden --- | 131 elif flagtype == "add": 132 icValue = 'findCarry(32, resTemp, Rn, rotated_imm)' 133 ivValue = 'findOverflow(32, resTemp, Rn, rotated_imm)' 134 elif flagtype == "sub": 135 icValue = 'findCarry(32, resTemp, Rn, ~rotated_imm)' 136 ivValue = 'findOverflow(32, resTemp, Rn, ~rotated_imm)' 137 elif flagtype == "rsb": 138 icValue = 'findCarry(32, resTemp, rotated_imm, ~Rn)' --- 122 unchanged lines hidden --- |