Add additional notes for conditional instructions
(instruction: string)
| 57 | |
| 58 | /** Add additional notes for conditional instructions */ |
| 59 | private getConditionalOpcode(instruction: string): AssemblyInstructionInfo | null { |
| 60 | // If the instruction is a conditional instruction |
| 61 | const isConditionalOpcode = instruction.match(ArmBaseDocumentationProvider.CONDITIONAL_INSTRUCTION_REGEXP); |
| 62 | if (!isConditionalOpcode) { |
| 63 | return null; |
| 64 | } |
| 65 | const information = this.getAsmOpcode(isConditionalOpcode[1]); |
| 66 | if (!information) return null; |
| 67 | const maybeCondition = ArmBaseDocumentationProvider.CONDITIONAL_OPCODE_TAGS[isConditionalOpcode[2]]; |
| 68 | const text = maybeCondition ? `If ${maybeCondition}: ` : ''; |
| 69 | return { |
| 70 | ...information, |
| 71 | tooltip: text + information.tooltip, |
| 72 | html: text + information.html, |
| 73 | }; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | export class Arm32DocumentationProvider extends ArmBaseDocumentationProvider { |
nothing calls this directly
no test coverage detected