Sri
Sri

Reputation: 119

What is A, T, T in this macro function?

.macro  add_sh          rd,  rn,  rm,  sh:vararg
A       add             \rd, \rn, \rm, \sh
T       mov             \rm, \rm, \sh
T       add             \rd, \rn, \rm
.endm

What is A, T, T in this macro function?

What is the need for using these? What they meant exactly?

I hope somebody will help me regarding this.

Upvotes: 1

Views: 72

Answers (1)

Paul R
Paul R

Reputation: 213060

I would guess that this is ARM assembly code and the A and T macros are used to select which instructions to assemble depending on whether you are building (A)RM code or (T)humb code:

.macro  add_sh          rd,  rn,  rm,  sh:vararg
A       add             \rd, \rn, \rm, \sh          ;; ARM - just one instruction
T       mov             \rm, \rm, \sh               ;; Thumb - these two instructions
T       add             \rd, \rn, \rm               ;;         ...
.endm

Upvotes: 1

Related Questions