Intel Computer Hardware 80200 Manuel d'utilisateur Page 241

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 289
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 240
Developers Manual March, 2003 B-13
Intel
®
80200 Processor based on Intel
®
XScale
Microarchitecture
Optimization Guide
B.3.2 Bit Field Manipulation
The Intel
®
80200 processor shift and logical operations provide a useful way of manipulating bit
fields. Bit field operations can be optimized as follows:
;Set the bit number specified by r1 in register r0
mov r2, #1
orr r0, r0, r2, asl r1
;Clear the bit number specified by r1 in register r0
mov r2, #1
bic r0, r0, r2, asl r1
;Extract the bit-value of the bit number specified by r1 of the
;value in r0 storing the value in r0
mov r1, r0, asr r1
and r0, r1, #1
;Extract the higher order 8 bits of the value in r0 storing
;the result in r1
mov r1, r0, lsr #24
Vue de la page 240
1 2 ... 236 237 238 239 240 241 242 243 244 245 246 ... 288 289

Commentaires sur ces manuels

Pas de commentaire