| 155 | |
| 156 | @dataclass(frozen=True) |
| 157 | class ILFlag: |
| 158 | arch: 'architecture.Architecture' |
| 159 | index: 'architecture.FlagIndex' |
| 160 | |
| 161 | def __repr__(self): |
| 162 | return f"<ILFlag: {self.name}>" |
| 163 | |
| 164 | def __str__(self): |
| 165 | return self.name |
| 166 | |
| 167 | def __int__(self): |
| 168 | return self.index |
| 169 | |
| 170 | @property |
| 171 | def temp(self) -> bool: |
| 172 | return (self.index & 0x80000000) != 0 |
| 173 | |
| 174 | @property |
| 175 | def name(self) -> 'architecture.FlagName': |
| 176 | if self.temp: |
| 177 | return architecture.FlagName(f"cond:{(self.index & 0x7fffffff)}") |
| 178 | else: |
| 179 | return architecture.FlagName(self.arch.get_flag_name(self.index)) |
| 180 | |
| 181 | |
| 182 | @dataclass(frozen=True) |
no outgoing calls
no test coverage detected